]> git.baikalelectronics.ru Git - kernel.git/commitdiff
memblock: drop memblock_free_early_nid() and memblock_free_early()
authorMike Rapoport <rppt@linux.ibm.com>
Fri, 5 Nov 2021 20:43:13 +0000 (13:43 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 6 Nov 2021 20:30:41 +0000 (13:30 -0700)
memblock_free_early_nid() is unused and memblock_free_early() is an
alias for memblock_free().

Replace calls to memblock_free_early() with calls to memblock_free() and
remove memblock_free_early() and memblock_free_early_nid().

Link: https://lkml.kernel.org/r/20210930185031.18648-4-rppt@kernel.org
Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
Cc: Christophe Leroy <christophe.leroy@csgroup.eu>
Cc: Juergen Gross <jgross@suse.com>
Cc: Shahab Vahedi <Shahab.Vahedi@synopsys.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/mips/mm/init.c
arch/powerpc/platforms/pseries/svm.c
arch/s390/kernel/smp.c
drivers/base/arch_numa.c
drivers/s390/char/sclp_early.c
include/linux/memblock.h
kernel/dma/swiotlb.c
lib/cpumask.c
mm/percpu.c
mm/sparse.c

index 19347dc6bbf88330eb7329fd2953e78a93b98297..21a5a7ac00370962763c8df3b734d487619e9ab5 100644 (file)
@@ -529,7 +529,7 @@ static void * __init pcpu_fc_alloc(unsigned int cpu, size_t size,
 
 static void __init pcpu_fc_free(void *ptr, size_t size)
 {
-       memblock_free_early(__pa(ptr), size);
+       memblock_free(__pa(ptr), size);
 }
 
 void __init setup_per_cpu_areas(void)
index 87f001b4c4e4fa338adb323c141b9c4c0e04c02b..f12229ce7301497567ace03b0cb000c133d6cbb2 100644 (file)
@@ -56,8 +56,7 @@ void __init svm_swiotlb_init(void)
                return;
 
 
-       memblock_free_early(__pa(vstart),
-                           PAGE_ALIGN(io_tlb_nslabs << IO_TLB_SHIFT));
+       memblock_free(__pa(vstart), PAGE_ALIGN(io_tlb_nslabs << IO_TLB_SHIFT));
        panic("SVM: Cannot allocate SWIOTLB buffer");
 }
 
index 1a04e5bdf6555de99164894db4bc4a79bc9f46f3..066efd6d9345e33d25bdf8356473057c005cea36 100644 (file)
@@ -880,7 +880,7 @@ void __init smp_detect_cpus(void)
 
        /* Add CPUs present at boot */
        __smp_rescan_cpus(info, true);
-       memblock_free_early((unsigned long)info, sizeof(*info));
+       memblock_free((unsigned long)info, sizeof(*info));
 }
 
 /*
index a6491673dc1f119e0d91bd49f15d3c97975b9f7f..ade8934764f65e9e13d3c12bb7e08849d489db90 100644 (file)
@@ -166,7 +166,7 @@ static void * __init pcpu_fc_alloc(unsigned int cpu, size_t size,
 
 static void __init pcpu_fc_free(void *ptr, size_t size)
 {
-       memblock_free_early(__pa(ptr), size);
+       memblock_free(__pa(ptr), size);
 }
 
 #ifdef CONFIG_NEED_PER_CPU_PAGE_FIRST_CHUNK
index f3d5c7f4c13d29aa48be077cc9e03456316cdb1a..f01d942e1c1df0f6547dee0c8999b6db79b95246 100644 (file)
@@ -139,7 +139,7 @@ int __init sclp_early_get_core_info(struct sclp_core_info *info)
        }
        sclp_fill_core_info(info, sccb);
 out:
-       memblock_free_early((unsigned long)sccb, length);
+       memblock_free((unsigned long)sccb, length);
        return rc;
 }
 
index 34de69b3b8badcdf971cd3f34b805d1b5b23f52d..fc8183be340c6e19454b2f17e05cf55f8db8f4a1 100644 (file)
@@ -441,18 +441,6 @@ static inline void *memblock_alloc_node(phys_addr_t size,
                                      MEMBLOCK_ALLOC_ACCESSIBLE, nid);
 }
 
-static inline void memblock_free_early(phys_addr_t base,
-                                             phys_addr_t size)
-{
-       memblock_free(base, size);
-}
-
-static inline void memblock_free_early_nid(phys_addr_t base,
-                                                 phys_addr_t size, int nid)
-{
-       memblock_free(base, size);
-}
-
 static inline void memblock_free_late(phys_addr_t base, phys_addr_t size)
 {
        __memblock_free_late(base, size);
index 87c40517e82274718bd77e16cbf10f736299abb4..430d2f78d540ed788b86ca78eb02aeab6ce3211c 100644 (file)
@@ -247,7 +247,7 @@ swiotlb_init(int verbose)
        return;
 
 fail_free_mem:
-       memblock_free_early(__pa(tlb), bytes);
+       memblock_free(__pa(tlb), bytes);
 fail:
        pr_warn("Cannot allocate buffer");
 }
index c3c76b833384686e43f0b9389874625ebf30709b..045779446a18d741138a807ab68c8b2a897a458f 100644 (file)
@@ -188,7 +188,7 @@ EXPORT_SYMBOL(free_cpumask_var);
  */
 void __init free_bootmem_cpumask_var(cpumask_var_t mask)
 {
-       memblock_free_early(__pa(mask), cpumask_size());
+       memblock_free(__pa(mask), cpumask_size());
 }
 #endif
 
index e0a986818903dc7cc4b49b2f54749c24a636ff85..f58318cb04c02ab5646398c891c5e1241833199e 100644 (file)
@@ -2472,7 +2472,7 @@ struct pcpu_alloc_info * __init pcpu_alloc_alloc_info(int nr_groups,
  */
 void __init pcpu_free_alloc_info(struct pcpu_alloc_info *ai)
 {
-       memblock_free_early(__pa(ai), ai->__ai_size);
+       memblock_free(__pa(ai), ai->__ai_size);
 }
 
 /**
@@ -3134,7 +3134,7 @@ out_free_areas:
 out_free:
        pcpu_free_alloc_info(ai);
        if (areas)
-               memblock_free_early(__pa(areas), areas_size);
+               memblock_free(__pa(areas), areas_size);
        return rc;
 }
 #endif /* BUILD_EMBED_FIRST_CHUNK */
@@ -3256,7 +3256,7 @@ enomem:
                free_fn(page_address(pages[j]), PAGE_SIZE);
        rc = -ENOMEM;
 out_free_ar:
-       memblock_free_early(__pa(pages), pages_size);
+       memblock_free(__pa(pages), pages_size);
        pcpu_free_alloc_info(ai);
        return rc;
 }
@@ -3286,7 +3286,7 @@ static void * __init pcpu_dfl_fc_alloc(unsigned int cpu, size_t size,
 
 static void __init pcpu_dfl_fc_free(void *ptr, size_t size)
 {
-       memblock_free_early(__pa(ptr), size);
+       memblock_free(__pa(ptr), size);
 }
 
 void __init setup_per_cpu_areas(void)
index 120bc8ea5293e60bcb5dd91f22467767dd959892..55fea0c2f927e5561395ba2fc7cf8cdde83fa90b 100644 (file)
@@ -451,7 +451,7 @@ static void *sparsemap_buf_end __meminitdata;
 static inline void __meminit sparse_buffer_free(unsigned long size)
 {
        WARN_ON(!sparsemap_buf || size == 0);
-       memblock_free_early(__pa(sparsemap_buf), size);
+       memblock_free(__pa(sparsemap_buf), size);
 }
 
 static void __init sparse_buffer_init(unsigned long size, int nid)