mm: remove CONFIG_NO_BOOTMEM
authorMike Rapoport <rppt@linux.vnet.ibm.com>
Tue, 30 Oct 2018 22:07:40 +0000 (15:07 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 31 Oct 2018 15:54:14 +0000 (08:54 -0700)
All achitectures select NO_BOOTMEM which essentially becomes 'Y' for any
kernel configuration and therefore it can be removed.

[alexander.h.duyck@linux.intel.com: remove now defunct NO_BOOTMEM from depends list for deferred init]
Link: http://lkml.kernel.org/r/20180925201814.3576.15105.stgit@localhost.localdomain
Link: http://lkml.kernel.org/r/1536927045-23536-3-git-send-email-rppt@linux.vnet.ibm.com
Signed-off-by: Mike Rapoport <rppt@linux.vnet.ibm.com>
Signed-off-by: Alexander Duyck <alexander.h.duyck@linux.intel.com>
Acked-by: Michal Hocko <mhocko@suse.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Chris Zankel <chris@zankel.net>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Greentime Hu <green.hu@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Guan Xuetao <gxt@pku.edu.cn>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "James E.J. Bottomley" <jejb@parisc-linux.org>
Cc: Jonas Bonn <jonas@southpole.se>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Ley Foon Tan <lftan@altera.com>
Cc: Mark Salter <msalter@redhat.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Matt Turner <mattst88@gmail.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Michal Simek <monstr@monstr.eu>
Cc: Palmer Dabbelt <palmer@sifive.com>
Cc: Paul Burton <paul.burton@mips.com>
Cc: Richard Kuo <rkuo@codeaurora.org>
Cc: Richard Weinberger <richard@nod.at>
Cc: Rich Felker <dalias@libc.org>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Serge Semin <fancer.lancer@gmail.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Vineet Gupta <vgupta@synopsys.com>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
29 files changed:
arch/alpha/Kconfig
arch/arc/Kconfig
arch/arm/Kconfig
arch/arm64/Kconfig
arch/csky/Kconfig
arch/h8300/Kconfig
arch/hexagon/Kconfig
arch/ia64/Kconfig
arch/m68k/Kconfig
arch/microblaze/Kconfig
arch/mips/Kconfig
arch/nds32/Kconfig
arch/nios2/Kconfig
arch/openrisc/Kconfig
arch/parisc/Kconfig
arch/powerpc/Kconfig
arch/riscv/Kconfig
arch/s390/Kconfig
arch/sh/Kconfig
arch/sparc/Kconfig
arch/um/Kconfig
arch/unicore32/Kconfig
arch/x86/Kconfig
arch/xtensa/Kconfig
include/linux/bootmem.h
include/linux/mmzone.h
mm/Kconfig
mm/Makefile
mm/memblock.c

index 620b0a711ee41bab77a949b7ce6b4845fb169172..04de6be101bc21f30191beafd126f629626187d0 100644 (file)
@@ -32,7 +32,6 @@ config ALPHA
        select OLD_SIGSUSPEND
        select CPU_NO_EFFICIENT_FFS if !ALPHA_EV67
        select HAVE_MEMBLOCK
-       select NO_BOOTMEM
        help
          The Alpha is a 64-bit general-purpose processor designed and
          marketed by the Digital Equipment Corporation of blessed memory,
index e98c6b8e6186ed0a2da278860f3ecaa904014759..56995f356f6968e77972a58f7a045ec93184cfb2 100644 (file)
@@ -44,7 +44,6 @@ config ARC
        select HANDLE_DOMAIN_IRQ
        select IRQ_DOMAIN
        select MODULES_USE_ELF_RELA
-       select NO_BOOTMEM
        select OF
        select OF_EARLY_FLATTREE
        select OF_RESERVED_MEM
index b8c6062ca0c11650677b427098c2cefffcf49956..37d4c40f405a6325ad3d36654a2e64a8a9da0e83 100644 (file)
@@ -100,7 +100,6 @@ config ARM
        select IRQ_FORCED_THREADING
        select MODULES_USE_ELF_REL
        select NEED_DMA_MAP_STATE
-       select NO_BOOTMEM
        select OF_EARLY_FLATTREE if OF
        select OF_RESERVED_MEM if OF
        select OLD_SIGACTION
index 964f682a2b7b0b8da41248665d09980a1808983e..a8f36c7041ff1582c0e3adc47344664aa3e15d38 100644 (file)
@@ -161,7 +161,6 @@ config ARM64
        select MULTI_IRQ_HANDLER
        select NEED_DMA_MAP_STATE
        select NEED_SG_DMA_LENGTH
-       select NO_BOOTMEM
        select OF
        select OF_EARLY_FLATTREE
        select OF_RESERVED_MEM
index 0a0558567eaaa7bc00cb30a418b840f871c4b12d..46966f5762498cb61930bbf3e279dbd2f1a63cc8 100644 (file)
@@ -39,7 +39,6 @@ config CSKY
        select HAVE_MEMBLOCK
        select MAY_HAVE_SPARSE_IRQ
        select MODULES_USE_ELF_RELA if MODULES
-       select NO_BOOTMEM
        select OF
        select OF_EARLY_FLATTREE
        select OF_RESERVED_MEM
index 0b334b671e90c95f817a8638a89655f7f717c4d8..5e89d40be8cd9764bb3c8e80dc7cbcfa3f2ce959 100644 (file)
@@ -16,7 +16,6 @@ config H8300
        select OF_IRQ
        select OF_EARLY_FLATTREE
        select HAVE_MEMBLOCK
-       select NO_BOOTMEM
        select TIMER_OF
        select H8300_TMR8
        select HAVE_KERNEL_GZIP
index 7b25d7c8fa49c6d444a79910e93ce9661ffdc00a..7823f15e17b2954445bce8b533d4839b405c5c5d 100644 (file)
@@ -23,7 +23,6 @@ config HEXAGON
        select HAVE_ARCH_TRACEHOOK
        select HAVE_MEMBLOCK
        select ARCH_DISCARD_MEMBLOCK
-       select NO_BOOTMEM
        select NEED_SG_DMA_LENGTH
        select NO_IOPORT_MAP
        select GENERIC_IOMAP
index 8b4a0c1748c03feb1529a32977ea3a72ad5fa867..2bf4ef792f2cea3442b115e9e7db10b3be89794f 100644 (file)
@@ -28,7 +28,6 @@ config IA64
        select HAVE_ARCH_TRACEHOOK
        select HAVE_MEMBLOCK
        select HAVE_MEMBLOCK_NODE_MAP
-       select NO_BOOTMEM
        select HAVE_VIRT_CPU_ACCOUNTING
        select ARCH_HAS_DMA_MARK_CLEAN
        select ARCH_HAS_SG_CHAIN
index c7b2a8d60a41e00711a9ab9589a6af1d7afeb2a1..26edf2542295bc8468a38321a2e0f6ff2423bcd0 100644 (file)
@@ -29,7 +29,6 @@ config M68K
        select DMA_DIRECT_OPS if HAS_DMA
        select HAVE_MEMBLOCK
        select ARCH_DISCARD_MEMBLOCK
-       select NO_BOOTMEM
 
 config CPU_BIG_ENDIAN
        def_bool y
index 164a4857737a0cf38fa0ba9e406517021ee3bdb8..5c2777bb55555997a44806ad20c12300759a0858 100644 (file)
@@ -28,7 +28,6 @@ config MICROBLAZE
        select HAVE_FTRACE_MCOUNT_RECORD
        select HAVE_FUNCTION_GRAPH_TRACER
        select HAVE_FUNCTION_TRACER
-       select NO_BOOTMEM
        select HAVE_MEMBLOCK
        select HAVE_MEMBLOCK_NODE_MAP
        select HAVE_OPROFILE
index 80778b40f8faedf1daf4bd674f63e5da64212691..36693415763216a26b093dbb131c984ba7f097f8 100644 (file)
@@ -78,7 +78,6 @@ config MIPS
        select RTC_LIB
        select SYSCTL_EXCEPTION_TRACE
        select VIRT_TO_BUS
-       select NO_BOOTMEM
 
 menu "Machine selection"
 
index 56992330026a6b078bf4286d4d45921bf2b275f8..93c0b587ee23ab46f0fdc80349cd9ce27dec68e9 100644 (file)
@@ -36,7 +36,6 @@ config NDS32
        select MODULES_USE_ELF_RELA
        select OF
        select OF_EARLY_FLATTREE
-       select NO_BOOTMEM
        select NO_IOPORT_MAP
        select RTC_LIB
        select THREAD_INFO_IN_TASK
index 2df0c57f28334a7aec2678c4d9ffc3dd75b39b12..b01febeb5ce3ffe932cbf136133aab9c3db53535 100644 (file)
@@ -25,7 +25,6 @@ config NIOS2
        select CPU_NO_EFFICIENT_FFS
        select HAVE_MEMBLOCK
        select ARCH_DISCARD_MEMBLOCK
-       select NO_BOOTMEM
 
 config GENERIC_CSUM
        def_bool y
index a655ae280637be50b0484ed362b70d91779bad59..cbfaf15f9d70fe7748a259352af1b57f9304b095 100644 (file)
@@ -32,7 +32,6 @@ config OPENRISC
        select HAVE_DEBUG_STACKOVERFLOW
        select OR1K_PIC
        select CPU_NO_EFFICIENT_FFS if !OPENRISC_HAVE_INST_FF1
-       select NO_BOOTMEM
        select ARCH_USE_QUEUED_SPINLOCKS
        select ARCH_USE_QUEUED_RWLOCKS
        select OMPIC if SMP
index f1cd12afd943c888f4a1a89a4fa10c598e6e0a77..7418ebeeb4a4d104745f380b30f3ac8d272f9a96 100644 (file)
@@ -16,7 +16,6 @@ config PARISC
        select RTC_DRV_GENERIC
        select INIT_ALL_POSSIBLE
        select HAVE_MEMBLOCK
-       select NO_BOOTMEM
        select BUG
        select BUILDTIME_EXTABLE_SORT
        select HAVE_PERF_EVENTS
index e84943d24e5c7c38e5235a65e9c3f0b60c634dc5..5798ffb1379b56d142f6e6d3f4cd90897615c50a 100644 (file)
@@ -231,7 +231,6 @@ config PPC
        select MODULES_USE_ELF_RELA
        select NEED_DMA_MAP_STATE               if PPC64 || NOT_COHERENT_CACHE
        select NEED_SG_DMA_LENGTH
-       select NO_BOOTMEM
        select OF
        select OF_EARLY_FLATTREE
        select OF_RESERVED_MEM
index fe451348ae571371f25887a1cfaa9616f43eef7c..f7c6b7cf124a13f66d1f792ab547d1dbf9a344fc 100644 (file)
@@ -35,7 +35,6 @@ config RISCV
        select HAVE_GENERIC_DMA_COHERENT
        select HAVE_PERF_EVENTS
        select IRQ_DOMAIN
-       select NO_BOOTMEM
        select RISCV_ISA_A if SMP
        select SPARSE_IRQ
        select SYSCTL_EXCEPTION_TRACE
index 8b25e1f45b2749c1472e6b1247082b3c24d023b6..c7af83a15b2d4d99b5a2be2d80424c16e8999dfa 100644 (file)
@@ -175,7 +175,6 @@ config S390
        select HAVE_SYSCALL_TRACEPOINTS
        select HAVE_VIRT_CPU_ACCOUNTING
        select MODULES_USE_ELF_RELA
-       select NO_BOOTMEM
        select OLD_SIGACTION
        select OLD_SIGSUSPEND3
        select SPARSE_IRQ
index 475d786a65b0722a2b663c109f0e25945a2b82de..7aaea9690e18c641549cc4a37537356904b55873 100644 (file)
@@ -11,7 +11,6 @@ config SUPERH
        select HAVE_IDE if HAS_IOPORT_MAP
        select HAVE_MEMBLOCK
        select HAVE_MEMBLOCK_NODE_MAP
-       select NO_BOOTMEM
        select ARCH_DISCARD_MEMBLOCK
        select HAVE_OPROFILE
        select HAVE_GENERIC_DMA_COHERENT
index 7e2aa59fcc2969ff55c33c57ddaf9b46407487f4..98c0996f3c2c3017835c7e7757ed51c5b97b15d5 100644 (file)
@@ -46,7 +46,6 @@ config SPARC
        select NEED_DMA_MAP_STATE
        select NEED_SG_DMA_LENGTH
        select HAVE_MEMBLOCK
-       select NO_BOOTMEM
 
 config SPARC32
        def_bool !64BIT
index 10c15b8853ae5a56c2d4a200c80ceef956b690eb..ce3d56299b2850d6d6cdff8b79ee0a07fed78d1c 100644 (file)
@@ -13,7 +13,6 @@ config UML
        select HAVE_FUTEX_CMPXCHG if FUTEX
        select HAVE_DEBUG_KMEMLEAK
        select HAVE_MEMBLOCK
-       select NO_BOOTMEM
        select GENERIC_IRQ_SHOW
        select GENERIC_CPU_DEVICES
        select GENERIC_CLOCKEVENTS
index 0c5111b206bd8e8b2cdf7ea87d38ce664eba55f6..3a3b40f795589220c7183227de470033bb5316fd 100644 (file)
@@ -6,7 +6,6 @@ config UNICORE32
        select ARCH_MIGHT_HAVE_PC_SERIO
        select DMA_DIRECT_OPS
        select HAVE_MEMBLOCK
-       select NO_BOOTMEM
        select HAVE_GENERIC_DMA_COHERENT
        select HAVE_KERNEL_GZIP
        select HAVE_KERNEL_BZIP2
index ffebfc3f43c184e33ded12c24f3085ea96b7ed28..0354f52ef30ea778b1ef7c1a0c00d7957cc6dea3 100644 (file)
@@ -834,9 +834,6 @@ config JAILHOUSE_GUEST
 
 endif #HYPERVISOR_GUEST
 
-config NO_BOOTMEM
-       def_bool y
-
 source "arch/x86/Kconfig.cpu"
 
 config HPET_TIMER
index ea5d8d03e53b8bfa16a4b5547321f99024631746..df43d2e7684270fc19b01ea106ba8de3ef68da20 100644 (file)
@@ -34,7 +34,6 @@ config XTENSA
        select HAVE_STACKPROTECTOR
        select IRQ_DOMAIN
        select MODULES_USE_ELF_RELA
-       select NO_BOOTMEM
        select PERF_USE_VMALLOC
        select VIRT_TO_BUS
        help
index 42515195d7d8ba8ce14913a16cfb9075db656866..1f005b5c1555866307009cdddece71467a35a2f7 100644 (file)
@@ -26,34 +26,6 @@ extern unsigned long max_pfn;
  */
 extern unsigned long long max_possible_pfn;
 
-#ifndef CONFIG_NO_BOOTMEM
-/**
- * struct bootmem_data - per-node information used by the bootmem allocator
- * @node_min_pfn: the starting physical address of the node's memory
- * @node_low_pfn: the end physical address of the directly addressable memory
- * @node_bootmem_map: is a bitmap pointer - the bits represent all physical
- *                   memory pages (including holes) on the node.
- * @last_end_off: the offset within the page of the end of the last allocation;
- *                if 0, the page used is full
- * @hint_idx: the PFN of the page used with the last allocation;
- *            together with using this with the @last_end_offset field,
- *            a test can be made to see if allocations can be merged
- *            with the page used for the last allocation rather than
- *            using up a full new page.
- * @list: list entry in the linked list ordered by the memory addresses
- */
-typedef struct bootmem_data {
-       unsigned long node_min_pfn;
-       unsigned long node_low_pfn;
-       void *node_bootmem_map;
-       unsigned long last_end_off;
-       unsigned long hint_idx;
-       struct list_head list;
-} bootmem_data_t;
-
-extern bootmem_data_t bootmem_node_data[];
-#endif
-
 extern unsigned long bootmem_bootmap_pages(unsigned long);
 
 extern unsigned long init_bootmem_node(pg_data_t *pgdat,
@@ -125,12 +97,8 @@ extern void *__alloc_bootmem_low_node(pg_data_t *pgdat,
                                      unsigned long align,
                                      unsigned long goal) __malloc;
 
-#ifdef CONFIG_NO_BOOTMEM
 /* We are using top down, so it is safe to use 0 here */
 #define BOOTMEM_LOW_LIMIT 0
-#else
-#define BOOTMEM_LOW_LIMIT __pa(MAX_DMA_ADDRESS)
-#endif
 
 #ifndef ARCH_LOW_ADDRESS_LIMIT
 #define ARCH_LOW_ADDRESS_LIMIT  0xffffffffUL
@@ -165,7 +133,7 @@ extern void *__alloc_bootmem_low_node(pg_data_t *pgdat,
        __alloc_bootmem_low_node(pgdat, x, PAGE_SIZE, 0)
 
 
-#if defined(CONFIG_HAVE_MEMBLOCK) && defined(CONFIG_NO_BOOTMEM)
+#if defined(CONFIG_HAVE_MEMBLOCK)
 
 /* FIXME: use MEMBLOCK_ALLOC_* variants here */
 #define BOOTMEM_ALLOC_ACCESSIBLE       0
@@ -373,7 +341,7 @@ static inline void __init memblock_free_late(
 {
        free_bootmem_late(base, size);
 }
-#endif /* defined(CONFIG_HAVE_MEMBLOCK) && defined(CONFIG_NO_BOOTMEM) */
+#endif /* defined(CONFIG_HAVE_MEMBLOCK) */
 
 extern void *alloc_large_system_hash(const char *tablename,
                                     unsigned long bucketsize,
index 9f0caccd58332011e8b256abcfc14185e1e3fb35..847705a6d0ec2dba2a82ca87bba54c797bb0b956 100644 (file)
@@ -633,9 +633,6 @@ typedef struct pglist_data {
        struct page_ext *node_page_ext;
 #endif
 #endif
-#ifndef CONFIG_NO_BOOTMEM
-       struct bootmem_data *bdata;
-#endif
 #if defined(CONFIG_MEMORY_HOTPLUG) || defined(CONFIG_DEFERRED_STRUCT_PAGE_INIT)
        /*
         * Must be held any time you expect node_start_pfn, node_present_pages
@@ -869,7 +866,7 @@ static inline int is_highmem_idx(enum zone_type idx)
 }
 
 /**
- * is_highmem - helper function to quickly check if a struct zone is a 
+ * is_highmem - helper function to quickly check if a struct zone is a
  *              highmem zone or not.  This is an attempt to keep references
  *              to ZONE_{DMA/NORMAL/HIGHMEM/etc} in general code to a minimum.
  * @zone - pointer to struct zone variable
index 02301a89089eb80098e1c3efda4aef5b7e5e758e..f7cb608f9ab205324655ce9ed2c613484be7e0c1 100644 (file)
@@ -142,9 +142,6 @@ config HAVE_GENERIC_GUP
 config ARCH_DISCARD_MEMBLOCK
        bool
 
-config NO_BOOTMEM
-       bool
-
 config MEMORY_ISOLATION
        bool
 
@@ -634,7 +631,6 @@ config MAX_STACK_SIZE_MB
 config DEFERRED_STRUCT_PAGE_INIT
        bool "Defer initialisation of struct pages to kthreads"
        default n
-       depends on NO_BOOTMEM
        depends on SPARSEMEM
        depends on !NEED_PER_CPU_KM
        depends on 64BIT
index 6485d5745dd7cde92379861e6995af47a1f4abab..ea5333886593b04da5b375a8f02c0d924a9c1510 100644 (file)
@@ -42,12 +42,7 @@ obj-y                        := filemap.o mempool.o oom_kill.o fadvise.o \
                           debug.o $(mmu-y)
 
 obj-y += init-mm.o
-
-ifdef CONFIG_NO_BOOTMEM
-       obj-y           += nobootmem.o
-else
-       obj-y           += bootmem.o
-endif
+obj-y += nobootmem.o
 
 ifdef CONFIG_MMU
        obj-$(CONFIG_ADVISE_SYSCALLS)   += madvise.o
index a85315083b5a8d1fbba19329a5b77dc7fe3b6da3..d6897fbe021ffe8f305894f58ac3d13aec094968 100644 (file)
@@ -1318,7 +1318,6 @@ phys_addr_t __init memblock_alloc_try_nid(phys_addr_t size, phys_addr_t align, i
        return memblock_alloc_base(size, align, MEMBLOCK_ALLOC_ACCESSIBLE);
 }
 
-#if defined(CONFIG_NO_BOOTMEM)
 /**
  * memblock_virt_alloc_internal - allocate boot memory block
  * @size: size of memory block to be allocated in bytes
@@ -1524,7 +1523,6 @@ void * __init memblock_virt_alloc_try_nid(
              __func__, (u64)size, (u64)align, nid, &min_addr, &max_addr);
        return NULL;
 }
-#endif
 
 /**
  * __memblock_free_early - free boot memory block