diff options
author | Mike Rapoport <rppt@linux.vnet.ibm.com> | 2018-10-30 18:07:44 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-10-31 11:54:15 -0400 |
commit | aca52c39838910605b1063a2243f553aa2a02d5c (patch) | |
tree | 4b878e206fd30fb9033bb234e35b7fcae4352c6c | |
parent | b4a991ec584b3ce333342c431c3cc4fef8a690d7 (diff) |
mm: remove CONFIG_HAVE_MEMBLOCK
All architecures use memblock for early memory management. There is no need
for the CONFIG_HAVE_MEMBLOCK configuration option.
[rppt@linux.vnet.ibm.com: of/fdt: fixup #ifdefs]
Link: http://lkml.kernel.org/r/20180919103457.GA20545@rapoport-lnx
[rppt@linux.vnet.ibm.com: csky: fixups after bootmem removal]
Link: http://lkml.kernel.org/r/20180926112744.GC4628@rapoport-lnx
[rppt@linux.vnet.ibm.com: remove stale #else and the code it protects]
Link: http://lkml.kernel.org/r/1538067825-24835-1-git-send-email-rppt@linux.vnet.ibm.com
Link: http://lkml.kernel.org/r/1536927045-23536-4-git-send-email-rppt@linux.vnet.ibm.com
Signed-off-by: Mike Rapoport <rppt@linux.vnet.ibm.com>
Acked-by: Michal Hocko <mhocko@suse.com>
Tested-by: Jonathan Cameron <jonathan.cameron@huawei.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>
40 files changed, 11 insertions, 199 deletions
diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig index 04de6be101bc..5b4f88363453 100644 --- a/arch/alpha/Kconfig +++ b/arch/alpha/Kconfig | |||
@@ -31,7 +31,6 @@ config ALPHA | |||
31 | select ODD_RT_SIGACTION | 31 | select ODD_RT_SIGACTION |
32 | select OLD_SIGSUSPEND | 32 | select OLD_SIGSUSPEND |
33 | select CPU_NO_EFFICIENT_FFS if !ALPHA_EV67 | 33 | select CPU_NO_EFFICIENT_FFS if !ALPHA_EV67 |
34 | select HAVE_MEMBLOCK | ||
35 | help | 34 | help |
36 | The Alpha is a 64-bit general-purpose processor designed and | 35 | The Alpha is a 64-bit general-purpose processor designed and |
37 | marketed by the Digital Equipment Corporation of blessed memory, | 36 | marketed by the Digital Equipment Corporation of blessed memory, |
diff --git a/arch/arc/Kconfig b/arch/arc/Kconfig index 56995f356f69..c9e2a1323536 100644 --- a/arch/arc/Kconfig +++ b/arch/arc/Kconfig | |||
@@ -37,7 +37,6 @@ config ARC | |||
37 | select HAVE_KERNEL_LZMA | 37 | select HAVE_KERNEL_LZMA |
38 | select HAVE_KPROBES | 38 | select HAVE_KPROBES |
39 | select HAVE_KRETPROBES | 39 | select HAVE_KRETPROBES |
40 | select HAVE_MEMBLOCK | ||
41 | select HAVE_MOD_ARCH_SPECIFIC | 40 | select HAVE_MOD_ARCH_SPECIFIC |
42 | select HAVE_OPROFILE | 41 | select HAVE_OPROFILE |
43 | select HAVE_PERF_EVENTS | 42 | select HAVE_PERF_EVENTS |
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 37d4c40f405a..91be74d8df65 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -82,7 +82,6 @@ config ARM | |||
82 | select HAVE_KERNEL_XZ | 82 | select HAVE_KERNEL_XZ |
83 | select HAVE_KPROBES if !XIP_KERNEL && !CPU_ENDIAN_BE32 && !CPU_V7M | 83 | select HAVE_KPROBES if !XIP_KERNEL && !CPU_ENDIAN_BE32 && !CPU_V7M |
84 | select HAVE_KRETPROBES if (HAVE_KPROBES) | 84 | select HAVE_KRETPROBES if (HAVE_KPROBES) |
85 | select HAVE_MEMBLOCK | ||
86 | select HAVE_MOD_ARCH_SPECIFIC | 85 | select HAVE_MOD_ARCH_SPECIFIC |
87 | select HAVE_NMI | 86 | select HAVE_NMI |
88 | select HAVE_OPROFILE if (HAVE_PERF_EVENTS) | 87 | select HAVE_OPROFILE if (HAVE_PERF_EVENTS) |
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index a8f36c7041ff..787d7850e064 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig | |||
@@ -139,7 +139,6 @@ config ARM64 | |||
139 | select HAVE_GENERIC_DMA_COHERENT | 139 | select HAVE_GENERIC_DMA_COHERENT |
140 | select HAVE_HW_BREAKPOINT if PERF_EVENTS | 140 | select HAVE_HW_BREAKPOINT if PERF_EVENTS |
141 | select HAVE_IRQ_TIME_ACCOUNTING | 141 | select HAVE_IRQ_TIME_ACCOUNTING |
142 | select HAVE_MEMBLOCK | ||
143 | select HAVE_MEMBLOCK_NODE_MAP if NUMA | 142 | select HAVE_MEMBLOCK_NODE_MAP if NUMA |
144 | select HAVE_NMI | 143 | select HAVE_NMI |
145 | select HAVE_PATA_PLATFORM | 144 | select HAVE_PATA_PLATFORM |
diff --git a/arch/c6x/Kconfig b/arch/c6x/Kconfig index f65a084607fd..84420109113d 100644 --- a/arch/c6x/Kconfig +++ b/arch/c6x/Kconfig | |||
@@ -13,7 +13,6 @@ config C6X | |||
13 | select GENERIC_ATOMIC64 | 13 | select GENERIC_ATOMIC64 |
14 | select GENERIC_IRQ_SHOW | 14 | select GENERIC_IRQ_SHOW |
15 | select HAVE_ARCH_TRACEHOOK | 15 | select HAVE_ARCH_TRACEHOOK |
16 | select HAVE_MEMBLOCK | ||
17 | select SPARSE_IRQ | 16 | select SPARSE_IRQ |
18 | select IRQ_DOMAIN | 17 | select IRQ_DOMAIN |
19 | select OF | 18 | select OF |
diff --git a/arch/csky/Kconfig b/arch/csky/Kconfig index 46966f576249..cb64f8dacd08 100644 --- a/arch/csky/Kconfig +++ b/arch/csky/Kconfig | |||
@@ -36,7 +36,6 @@ config CSKY | |||
36 | select HAVE_C_RECORDMCOUNT | 36 | select HAVE_C_RECORDMCOUNT |
37 | select HAVE_DMA_API_DEBUG | 37 | select HAVE_DMA_API_DEBUG |
38 | select HAVE_DMA_CONTIGUOUS | 38 | select HAVE_DMA_CONTIGUOUS |
39 | select HAVE_MEMBLOCK | ||
40 | select MAY_HAVE_SPARSE_IRQ | 39 | select MAY_HAVE_SPARSE_IRQ |
41 | select MODULES_USE_ELF_RELA if MODULES | 40 | select MODULES_USE_ELF_RELA if MODULES |
42 | select OF | 41 | select OF |
diff --git a/arch/csky/kernel/setup.c b/arch/csky/kernel/setup.c index a5e3ab1d5360..dff8b89444ec 100644 --- a/arch/csky/kernel/setup.c +++ b/arch/csky/kernel/setup.c | |||
@@ -3,7 +3,6 @@ | |||
3 | 3 | ||
4 | #include <linux/console.h> | 4 | #include <linux/console.h> |
5 | #include <linux/memblock.h> | 5 | #include <linux/memblock.h> |
6 | #include <linux/bootmem.h> | ||
7 | #include <linux/initrd.h> | 6 | #include <linux/initrd.h> |
8 | #include <linux/of.h> | 7 | #include <linux/of.h> |
9 | #include <linux/of_fdt.h> | 8 | #include <linux/of_fdt.h> |
diff --git a/arch/csky/mm/highmem.c b/arch/csky/mm/highmem.c index e168ac087ccb..53b1bfa4c462 100644 --- a/arch/csky/mm/highmem.c +++ b/arch/csky/mm/highmem.c | |||
@@ -4,7 +4,7 @@ | |||
4 | #include <linux/module.h> | 4 | #include <linux/module.h> |
5 | #include <linux/highmem.h> | 5 | #include <linux/highmem.h> |
6 | #include <linux/smp.h> | 6 | #include <linux/smp.h> |
7 | #include <linux/bootmem.h> | 7 | #include <linux/memblock.h> |
8 | #include <asm/fixmap.h> | 8 | #include <asm/fixmap.h> |
9 | #include <asm/tlbflush.h> | 9 | #include <asm/tlbflush.h> |
10 | #include <asm/cacheflush.h> | 10 | #include <asm/cacheflush.h> |
@@ -140,7 +140,7 @@ static void __init fixrange_init(unsigned long start, unsigned long end, | |||
140 | pmd = (pmd_t *)pud; | 140 | pmd = (pmd_t *)pud; |
141 | for (; (k < PTRS_PER_PMD) && (vaddr != end); pmd++, k++) { | 141 | for (; (k < PTRS_PER_PMD) && (vaddr != end); pmd++, k++) { |
142 | if (pmd_none(*pmd)) { | 142 | if (pmd_none(*pmd)) { |
143 | pte = (pte_t *) alloc_bootmem_low_pages(PAGE_SIZE); | 143 | pte = (pte_t *) memblock_alloc_low(PAGE_SIZE, PAGE_SIZE); |
144 | set_pmd(pmd, __pmd(__pa(pte))); | 144 | set_pmd(pmd, __pmd(__pa(pte))); |
145 | BUG_ON(pte != pte_offset_kernel(pmd, 0)); | 145 | BUG_ON(pte != pte_offset_kernel(pmd, 0)); |
146 | } | 146 | } |
diff --git a/arch/csky/mm/init.c b/arch/csky/mm/init.c index ce2711e050ad..dc07c078f9b8 100644 --- a/arch/csky/mm/init.c +++ b/arch/csky/mm/init.c | |||
@@ -14,7 +14,6 @@ | |||
14 | #include <linux/ptrace.h> | 14 | #include <linux/ptrace.h> |
15 | #include <linux/mman.h> | 15 | #include <linux/mman.h> |
16 | #include <linux/mm.h> | 16 | #include <linux/mm.h> |
17 | #include <linux/bootmem.h> | ||
18 | #include <linux/highmem.h> | 17 | #include <linux/highmem.h> |
19 | #include <linux/memblock.h> | 18 | #include <linux/memblock.h> |
20 | #include <linux/swap.h> | 19 | #include <linux/swap.h> |
@@ -47,7 +46,7 @@ void __init mem_init(void) | |||
47 | #endif | 46 | #endif |
48 | high_memory = (void *) __va(max_low_pfn << PAGE_SHIFT); | 47 | high_memory = (void *) __va(max_low_pfn << PAGE_SHIFT); |
49 | 48 | ||
50 | free_all_bootmem(); | 49 | memblock_free_all(); |
51 | 50 | ||
52 | #ifdef CONFIG_HIGHMEM | 51 | #ifdef CONFIG_HIGHMEM |
53 | for (tmp = highstart_pfn; tmp < highend_pfn; tmp++) { | 52 | for (tmp = highstart_pfn; tmp < highend_pfn; tmp++) { |
diff --git a/arch/h8300/Kconfig b/arch/h8300/Kconfig index 5e89d40be8cd..d19c6b16cd5d 100644 --- a/arch/h8300/Kconfig +++ b/arch/h8300/Kconfig | |||
@@ -15,7 +15,6 @@ config H8300 | |||
15 | select OF | 15 | select OF |
16 | select OF_IRQ | 16 | select OF_IRQ |
17 | select OF_EARLY_FLATTREE | 17 | select OF_EARLY_FLATTREE |
18 | select HAVE_MEMBLOCK | ||
19 | select TIMER_OF | 18 | select TIMER_OF |
20 | select H8300_TMR8 | 19 | select H8300_TMR8 |
21 | select HAVE_KERNEL_GZIP | 20 | select HAVE_KERNEL_GZIP |
diff --git a/arch/hexagon/Kconfig b/arch/hexagon/Kconfig index 7823f15e17b2..2b688af379e6 100644 --- a/arch/hexagon/Kconfig +++ b/arch/hexagon/Kconfig | |||
@@ -21,7 +21,6 @@ config HEXAGON | |||
21 | select GENERIC_IRQ_SHOW | 21 | select GENERIC_IRQ_SHOW |
22 | select HAVE_ARCH_KGDB | 22 | select HAVE_ARCH_KGDB |
23 | select HAVE_ARCH_TRACEHOOK | 23 | select HAVE_ARCH_TRACEHOOK |
24 | select HAVE_MEMBLOCK | ||
25 | select ARCH_DISCARD_MEMBLOCK | 24 | select ARCH_DISCARD_MEMBLOCK |
26 | select NEED_SG_DMA_LENGTH | 25 | select NEED_SG_DMA_LENGTH |
27 | select NO_IOPORT_MAP | 26 | select NO_IOPORT_MAP |
diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig index 2bf4ef792f2c..36773def6920 100644 --- a/arch/ia64/Kconfig +++ b/arch/ia64/Kconfig | |||
@@ -26,7 +26,6 @@ config IA64 | |||
26 | select HAVE_FUNCTION_TRACER | 26 | select HAVE_FUNCTION_TRACER |
27 | select TTY | 27 | select TTY |
28 | select HAVE_ARCH_TRACEHOOK | 28 | select HAVE_ARCH_TRACEHOOK |
29 | select HAVE_MEMBLOCK | ||
30 | select HAVE_MEMBLOCK_NODE_MAP | 29 | select HAVE_MEMBLOCK_NODE_MAP |
31 | select HAVE_VIRT_CPU_ACCOUNTING | 30 | select HAVE_VIRT_CPU_ACCOUNTING |
32 | select ARCH_HAS_DMA_MARK_CLEAN | 31 | select ARCH_HAS_DMA_MARK_CLEAN |
diff --git a/arch/m68k/Kconfig b/arch/m68k/Kconfig index 26edf2542295..1bc9f1ba759a 100644 --- a/arch/m68k/Kconfig +++ b/arch/m68k/Kconfig | |||
@@ -27,7 +27,6 @@ config M68K | |||
27 | select OLD_SIGSUSPEND3 | 27 | select OLD_SIGSUSPEND3 |
28 | select OLD_SIGACTION | 28 | select OLD_SIGACTION |
29 | select DMA_DIRECT_OPS if HAS_DMA | 29 | select DMA_DIRECT_OPS if HAS_DMA |
30 | select HAVE_MEMBLOCK | ||
31 | select ARCH_DISCARD_MEMBLOCK | 30 | select ARCH_DISCARD_MEMBLOCK |
32 | 31 | ||
33 | config CPU_BIG_ENDIAN | 32 | config CPU_BIG_ENDIAN |
diff --git a/arch/microblaze/Kconfig b/arch/microblaze/Kconfig index 5c2777bb5555..effed2efd306 100644 --- a/arch/microblaze/Kconfig +++ b/arch/microblaze/Kconfig | |||
@@ -28,7 +28,6 @@ config MICROBLAZE | |||
28 | select HAVE_FTRACE_MCOUNT_RECORD | 28 | select HAVE_FTRACE_MCOUNT_RECORD |
29 | select HAVE_FUNCTION_GRAPH_TRACER | 29 | select HAVE_FUNCTION_GRAPH_TRACER |
30 | select HAVE_FUNCTION_TRACER | 30 | select HAVE_FUNCTION_TRACER |
31 | select HAVE_MEMBLOCK | ||
32 | select HAVE_MEMBLOCK_NODE_MAP | 31 | select HAVE_MEMBLOCK_NODE_MAP |
33 | select HAVE_OPROFILE | 32 | select HAVE_OPROFILE |
34 | select IRQ_DOMAIN | 33 | select IRQ_DOMAIN |
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index 366934157632..8272ea4c7264 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig | |||
@@ -60,7 +60,6 @@ config MIPS | |||
60 | select HAVE_IRQ_TIME_ACCOUNTING | 60 | select HAVE_IRQ_TIME_ACCOUNTING |
61 | select HAVE_KPROBES | 61 | select HAVE_KPROBES |
62 | select HAVE_KRETPROBES | 62 | select HAVE_KRETPROBES |
63 | select HAVE_MEMBLOCK | ||
64 | select HAVE_MEMBLOCK_NODE_MAP | 63 | select HAVE_MEMBLOCK_NODE_MAP |
65 | select HAVE_MOD_ARCH_SPECIFIC | 64 | select HAVE_MOD_ARCH_SPECIFIC |
66 | select HAVE_NMI | 65 | select HAVE_NMI |
diff --git a/arch/nds32/Kconfig b/arch/nds32/Kconfig index 93c0b587ee23..7a04adacb2f0 100644 --- a/arch/nds32/Kconfig +++ b/arch/nds32/Kconfig | |||
@@ -29,7 +29,6 @@ config NDS32 | |||
29 | select HANDLE_DOMAIN_IRQ | 29 | select HANDLE_DOMAIN_IRQ |
30 | select HAVE_ARCH_TRACEHOOK | 30 | select HAVE_ARCH_TRACEHOOK |
31 | select HAVE_DEBUG_KMEMLEAK | 31 | select HAVE_DEBUG_KMEMLEAK |
32 | select HAVE_MEMBLOCK | ||
33 | select HAVE_REGS_AND_STACK_ACCESS_API | 32 | select HAVE_REGS_AND_STACK_ACCESS_API |
34 | select IRQ_DOMAIN | 33 | select IRQ_DOMAIN |
35 | select LOCKDEP_SUPPORT | 34 | select LOCKDEP_SUPPORT |
diff --git a/arch/nios2/Kconfig b/arch/nios2/Kconfig index b01febeb5ce3..7e95506e957a 100644 --- a/arch/nios2/Kconfig +++ b/arch/nios2/Kconfig | |||
@@ -23,7 +23,6 @@ config NIOS2 | |||
23 | select SPARSE_IRQ | 23 | select SPARSE_IRQ |
24 | select USB_ARCH_HAS_HCD if USB_SUPPORT | 24 | select USB_ARCH_HAS_HCD if USB_SUPPORT |
25 | select CPU_NO_EFFICIENT_FFS | 25 | select CPU_NO_EFFICIENT_FFS |
26 | select HAVE_MEMBLOCK | ||
27 | select ARCH_DISCARD_MEMBLOCK | 26 | select ARCH_DISCARD_MEMBLOCK |
28 | 27 | ||
29 | config GENERIC_CSUM | 28 | config GENERIC_CSUM |
diff --git a/arch/openrisc/Kconfig b/arch/openrisc/Kconfig index cbfaf15f9d70..285f7d05c8ed 100644 --- a/arch/openrisc/Kconfig +++ b/arch/openrisc/Kconfig | |||
@@ -12,7 +12,6 @@ config OPENRISC | |||
12 | select OF_EARLY_FLATTREE | 12 | select OF_EARLY_FLATTREE |
13 | select IRQ_DOMAIN | 13 | select IRQ_DOMAIN |
14 | select HANDLE_DOMAIN_IRQ | 14 | select HANDLE_DOMAIN_IRQ |
15 | select HAVE_MEMBLOCK | ||
16 | select GPIOLIB | 15 | select GPIOLIB |
17 | select HAVE_ARCH_TRACEHOOK | 16 | select HAVE_ARCH_TRACEHOOK |
18 | select SPARSE_IRQ | 17 | select SPARSE_IRQ |
diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig index 7418ebeeb4a4..92a339ee28b3 100644 --- a/arch/parisc/Kconfig +++ b/arch/parisc/Kconfig | |||
@@ -15,7 +15,6 @@ config PARISC | |||
15 | select RTC_CLASS | 15 | select RTC_CLASS |
16 | select RTC_DRV_GENERIC | 16 | select RTC_DRV_GENERIC |
17 | select INIT_ALL_POSSIBLE | 17 | select INIT_ALL_POSSIBLE |
18 | select HAVE_MEMBLOCK | ||
19 | select BUG | 18 | select BUG |
20 | select BUILDTIME_EXTABLE_SORT | 19 | select BUILDTIME_EXTABLE_SORT |
21 | select HAVE_PERF_EVENTS | 20 | select HAVE_PERF_EVENTS |
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index 5798ffb1379b..2d51b2bd4aa1 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig | |||
@@ -206,7 +206,6 @@ config PPC | |||
206 | select HAVE_KRETPROBES | 206 | select HAVE_KRETPROBES |
207 | select HAVE_LD_DEAD_CODE_DATA_ELIMINATION | 207 | select HAVE_LD_DEAD_CODE_DATA_ELIMINATION |
208 | select HAVE_LIVEPATCH if HAVE_DYNAMIC_FTRACE_WITH_REGS | 208 | select HAVE_LIVEPATCH if HAVE_DYNAMIC_FTRACE_WITH_REGS |
209 | select HAVE_MEMBLOCK | ||
210 | select HAVE_MEMBLOCK_NODE_MAP | 209 | select HAVE_MEMBLOCK_NODE_MAP |
211 | select HAVE_MOD_ARCH_SPECIFIC | 210 | select HAVE_MOD_ARCH_SPECIFIC |
212 | select HAVE_NMI if PERF_EVENTS || (PPC64 && PPC_BOOK3S) | 211 | select HAVE_NMI if PERF_EVENTS || (PPC64 && PPC_BOOK3S) |
diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig index f7c6b7cf124a..d86842c21710 100644 --- a/arch/riscv/Kconfig +++ b/arch/riscv/Kconfig | |||
@@ -28,7 +28,6 @@ config RISCV | |||
28 | select GENERIC_STRNLEN_USER | 28 | select GENERIC_STRNLEN_USER |
29 | select GENERIC_SMP_IDLE_THREAD | 29 | select GENERIC_SMP_IDLE_THREAD |
30 | select GENERIC_ATOMIC64 if !64BIT || !RISCV_ISA_A | 30 | select GENERIC_ATOMIC64 if !64BIT || !RISCV_ISA_A |
31 | select HAVE_MEMBLOCK | ||
32 | select HAVE_MEMBLOCK_NODE_MAP | 31 | select HAVE_MEMBLOCK_NODE_MAP |
33 | select HAVE_DMA_CONTIGUOUS | 32 | select HAVE_DMA_CONTIGUOUS |
34 | select HAVE_FUTEX_CMPXCHG if FUTEX | 33 | select HAVE_FUTEX_CMPXCHG if FUTEX |
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig index c7af83a15b2d..5173366af8f3 100644 --- a/arch/s390/Kconfig +++ b/arch/s390/Kconfig | |||
@@ -163,7 +163,6 @@ config S390 | |||
163 | select HAVE_LIVEPATCH | 163 | select HAVE_LIVEPATCH |
164 | select HAVE_PERF_REGS | 164 | select HAVE_PERF_REGS |
165 | select HAVE_PERF_USER_STACK_DUMP | 165 | select HAVE_PERF_USER_STACK_DUMP |
166 | select HAVE_MEMBLOCK | ||
167 | select HAVE_MEMBLOCK_NODE_MAP | 166 | select HAVE_MEMBLOCK_NODE_MAP |
168 | select HAVE_MEMBLOCK_PHYS_MAP | 167 | select HAVE_MEMBLOCK_PHYS_MAP |
169 | select HAVE_MOD_ARCH_SPECIFIC | 168 | select HAVE_MOD_ARCH_SPECIFIC |
diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig index 7aaea9690e18..f82a4da7adf3 100644 --- a/arch/sh/Kconfig +++ b/arch/sh/Kconfig | |||
@@ -9,7 +9,6 @@ config SUPERH | |||
9 | select CLKDEV_LOOKUP | 9 | select CLKDEV_LOOKUP |
10 | select DMA_DIRECT_OPS | 10 | select DMA_DIRECT_OPS |
11 | select HAVE_IDE if HAS_IOPORT_MAP | 11 | select HAVE_IDE if HAS_IOPORT_MAP |
12 | select HAVE_MEMBLOCK | ||
13 | select HAVE_MEMBLOCK_NODE_MAP | 12 | select HAVE_MEMBLOCK_NODE_MAP |
14 | select ARCH_DISCARD_MEMBLOCK | 13 | select ARCH_DISCARD_MEMBLOCK |
15 | select HAVE_OPROFILE | 14 | select HAVE_OPROFILE |
diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig index 98c0996f3c2c..490b2c95c212 100644 --- a/arch/sparc/Kconfig +++ b/arch/sparc/Kconfig | |||
@@ -45,7 +45,6 @@ config SPARC | |||
45 | select LOCKDEP_SMALL if LOCKDEP | 45 | select LOCKDEP_SMALL if LOCKDEP |
46 | select NEED_DMA_MAP_STATE | 46 | select NEED_DMA_MAP_STATE |
47 | select NEED_SG_DMA_LENGTH | 47 | select NEED_SG_DMA_LENGTH |
48 | select HAVE_MEMBLOCK | ||
49 | 48 | ||
50 | config SPARC32 | 49 | config SPARC32 |
51 | def_bool !64BIT | 50 | def_bool !64BIT |
diff --git a/arch/um/Kconfig b/arch/um/Kconfig index ce3d56299b28..6b9938919f0b 100644 --- a/arch/um/Kconfig +++ b/arch/um/Kconfig | |||
@@ -12,7 +12,6 @@ config UML | |||
12 | select HAVE_UID16 | 12 | select HAVE_UID16 |
13 | select HAVE_FUTEX_CMPXCHG if FUTEX | 13 | select HAVE_FUTEX_CMPXCHG if FUTEX |
14 | select HAVE_DEBUG_KMEMLEAK | 14 | select HAVE_DEBUG_KMEMLEAK |
15 | select HAVE_MEMBLOCK | ||
16 | select GENERIC_IRQ_SHOW | 15 | select GENERIC_IRQ_SHOW |
17 | select GENERIC_CPU_DEVICES | 16 | select GENERIC_CPU_DEVICES |
18 | select GENERIC_CLOCKEVENTS | 17 | select GENERIC_CLOCKEVENTS |
diff --git a/arch/unicore32/Kconfig b/arch/unicore32/Kconfig index 3a3b40f79558..a4c05159dca5 100644 --- a/arch/unicore32/Kconfig +++ b/arch/unicore32/Kconfig | |||
@@ -5,7 +5,6 @@ config UNICORE32 | |||
5 | select ARCH_MIGHT_HAVE_PC_PARPORT | 5 | select ARCH_MIGHT_HAVE_PC_PARPORT |
6 | select ARCH_MIGHT_HAVE_PC_SERIO | 6 | select ARCH_MIGHT_HAVE_PC_SERIO |
7 | select DMA_DIRECT_OPS | 7 | select DMA_DIRECT_OPS |
8 | select HAVE_MEMBLOCK | ||
9 | select HAVE_GENERIC_DMA_COHERENT | 8 | select HAVE_GENERIC_DMA_COHERENT |
10 | select HAVE_KERNEL_GZIP | 9 | select HAVE_KERNEL_GZIP |
11 | select HAVE_KERNEL_BZIP2 | 10 | select HAVE_KERNEL_BZIP2 |
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 0354f52ef30e..c51c989c19c0 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig | |||
@@ -169,7 +169,6 @@ config X86 | |||
169 | select HAVE_KRETPROBES | 169 | select HAVE_KRETPROBES |
170 | select HAVE_KVM | 170 | select HAVE_KVM |
171 | select HAVE_LIVEPATCH if X86_64 | 171 | select HAVE_LIVEPATCH if X86_64 |
172 | select HAVE_MEMBLOCK | ||
173 | select HAVE_MEMBLOCK_NODE_MAP | 172 | select HAVE_MEMBLOCK_NODE_MAP |
174 | select HAVE_MIXED_BREAKPOINTS_REGS | 173 | select HAVE_MIXED_BREAKPOINTS_REGS |
175 | select HAVE_MOD_ARCH_SPECIFIC | 174 | select HAVE_MOD_ARCH_SPECIFIC |
diff --git a/arch/xtensa/Kconfig b/arch/xtensa/Kconfig index df43d2e76842..60c141af222b 100644 --- a/arch/xtensa/Kconfig +++ b/arch/xtensa/Kconfig | |||
@@ -28,7 +28,6 @@ config XTENSA | |||
28 | select HAVE_FUTEX_CMPXCHG if !MMU | 28 | select HAVE_FUTEX_CMPXCHG if !MMU |
29 | select HAVE_HW_BREAKPOINT if PERF_EVENTS | 29 | select HAVE_HW_BREAKPOINT if PERF_EVENTS |
30 | select HAVE_IRQ_TIME_ACCOUNTING | 30 | select HAVE_IRQ_TIME_ACCOUNTING |
31 | select HAVE_MEMBLOCK | ||
32 | select HAVE_OPROFILE | 31 | select HAVE_OPROFILE |
33 | select HAVE_PERF_EVENTS | 32 | select HAVE_PERF_EVENTS |
34 | select HAVE_STACKPROTECTOR | 33 | select HAVE_STACKPROTECTOR |
diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c index 76c83c1ffeda..4f915cea6f75 100644 --- a/drivers/of/fdt.c +++ b/drivers/of/fdt.c | |||
@@ -1115,7 +1115,6 @@ int __init early_init_dt_scan_chosen(unsigned long node, const char *uname, | |||
1115 | return 1; | 1115 | return 1; |
1116 | } | 1116 | } |
1117 | 1117 | ||
1118 | #ifdef CONFIG_HAVE_MEMBLOCK | ||
1119 | #ifndef MIN_MEMBLOCK_ADDR | 1118 | #ifndef MIN_MEMBLOCK_ADDR |
1120 | #define MIN_MEMBLOCK_ADDR __pa(PAGE_OFFSET) | 1119 | #define MIN_MEMBLOCK_ADDR __pa(PAGE_OFFSET) |
1121 | #endif | 1120 | #endif |
@@ -1178,26 +1177,6 @@ int __init __weak early_init_dt_reserve_memory_arch(phys_addr_t base, | |||
1178 | return memblock_reserve(base, size); | 1177 | return memblock_reserve(base, size); |
1179 | } | 1178 | } |
1180 | 1179 | ||
1181 | #else | ||
1182 | void __init __weak early_init_dt_add_memory_arch(u64 base, u64 size) | ||
1183 | { | ||
1184 | WARN_ON(1); | ||
1185 | } | ||
1186 | |||
1187 | int __init __weak early_init_dt_mark_hotplug_memory_arch(u64 base, u64 size) | ||
1188 | { | ||
1189 | return -ENOSYS; | ||
1190 | } | ||
1191 | |||
1192 | int __init __weak early_init_dt_reserve_memory_arch(phys_addr_t base, | ||
1193 | phys_addr_t size, bool nomap) | ||
1194 | { | ||
1195 | pr_err("Reserved memory not supported, ignoring range %pa - %pa%s\n", | ||
1196 | &base, &size, nomap ? " (nomap)" : ""); | ||
1197 | return -ENOSYS; | ||
1198 | } | ||
1199 | #endif | ||
1200 | |||
1201 | static void * __init early_init_dt_alloc_memory_arch(u64 size, u64 align) | 1180 | static void * __init early_init_dt_alloc_memory_arch(u64 size, u64 align) |
1202 | { | 1181 | { |
1203 | return memblock_virt_alloc(size, align); | 1182 | return memblock_virt_alloc(size, align); |
diff --git a/drivers/of/of_reserved_mem.c b/drivers/of/of_reserved_mem.c index 895c83e0c7b6..d6255c276a41 100644 --- a/drivers/of/of_reserved_mem.c +++ b/drivers/of/of_reserved_mem.c | |||
@@ -20,13 +20,12 @@ | |||
20 | #include <linux/of_reserved_mem.h> | 20 | #include <linux/of_reserved_mem.h> |
21 | #include <linux/sort.h> | 21 | #include <linux/sort.h> |
22 | #include <linux/slab.h> | 22 | #include <linux/slab.h> |
23 | #include <linux/memblock.h> | ||
23 | 24 | ||
24 | #define MAX_RESERVED_REGIONS 32 | 25 | #define MAX_RESERVED_REGIONS 32 |
25 | static struct reserved_mem reserved_mem[MAX_RESERVED_REGIONS]; | 26 | static struct reserved_mem reserved_mem[MAX_RESERVED_REGIONS]; |
26 | static int reserved_mem_count; | 27 | static int reserved_mem_count; |
27 | 28 | ||
28 | #if defined(CONFIG_HAVE_MEMBLOCK) | ||
29 | #include <linux/memblock.h> | ||
30 | int __init __weak early_init_dt_alloc_reserved_memory_arch(phys_addr_t size, | 29 | int __init __weak early_init_dt_alloc_reserved_memory_arch(phys_addr_t size, |
31 | phys_addr_t align, phys_addr_t start, phys_addr_t end, bool nomap, | 30 | phys_addr_t align, phys_addr_t start, phys_addr_t end, bool nomap, |
32 | phys_addr_t *res_base) | 31 | phys_addr_t *res_base) |
@@ -54,16 +53,6 @@ int __init __weak early_init_dt_alloc_reserved_memory_arch(phys_addr_t size, | |||
54 | return memblock_remove(base, size); | 53 | return memblock_remove(base, size); |
55 | return 0; | 54 | return 0; |
56 | } | 55 | } |
57 | #else | ||
58 | int __init __weak early_init_dt_alloc_reserved_memory_arch(phys_addr_t size, | ||
59 | phys_addr_t align, phys_addr_t start, phys_addr_t end, bool nomap, | ||
60 | phys_addr_t *res_base) | ||
61 | { | ||
62 | pr_err("Reserved memory not supported, ignoring region 0x%llx%s\n", | ||
63 | size, nomap ? " (nomap)" : ""); | ||
64 | return -ENOSYS; | ||
65 | } | ||
66 | #endif | ||
67 | 56 | ||
68 | /** | 57 | /** |
69 | * res_mem_save_node() - save fdt node for second pass initialization | 58 | * res_mem_save_node() - save fdt node for second pass initialization |
diff --git a/drivers/staging/android/ion/Kconfig b/drivers/staging/android/ion/Kconfig index c16dd16afe6a..0fdda6f62953 100644 --- a/drivers/staging/android/ion/Kconfig +++ b/drivers/staging/android/ion/Kconfig | |||
@@ -1,6 +1,6 @@ | |||
1 | menuconfig ION | 1 | menuconfig ION |
2 | bool "Ion Memory Manager" | 2 | bool "Ion Memory Manager" |
3 | depends on HAVE_MEMBLOCK && HAS_DMA && MMU | 3 | depends on HAS_DMA && MMU |
4 | select GENERIC_ALLOCATOR | 4 | select GENERIC_ALLOCATOR |
5 | select DMA_SHARED_BUFFER | 5 | select DMA_SHARED_BUFFER |
6 | help | 6 | help |
diff --git a/fs/pstore/Kconfig b/fs/pstore/Kconfig index 503086f7f7c1..0d19d191ae70 100644 --- a/fs/pstore/Kconfig +++ b/fs/pstore/Kconfig | |||
@@ -141,7 +141,6 @@ config PSTORE_RAM | |||
141 | tristate "Log panic/oops to a RAM buffer" | 141 | tristate "Log panic/oops to a RAM buffer" |
142 | depends on PSTORE | 142 | depends on PSTORE |
143 | depends on HAS_IOMEM | 143 | depends on HAS_IOMEM |
144 | depends on HAVE_MEMBLOCK | ||
145 | select REED_SOLOMON | 144 | select REED_SOLOMON |
146 | select REED_SOLOMON_ENC8 | 145 | select REED_SOLOMON_ENC8 |
147 | select REED_SOLOMON_DEC8 | 146 | select REED_SOLOMON_DEC8 |
diff --git a/include/linux/bootmem.h b/include/linux/bootmem.h index 1f005b5c1555..ee61ac355104 100644 --- a/include/linux/bootmem.h +++ b/include/linux/bootmem.h | |||
@@ -132,9 +132,6 @@ extern void *__alloc_bootmem_low_node(pg_data_t *pgdat, | |||
132 | #define alloc_bootmem_low_pages_node(pgdat, x) \ | 132 | #define alloc_bootmem_low_pages_node(pgdat, x) \ |
133 | __alloc_bootmem_low_node(pgdat, x, PAGE_SIZE, 0) | 133 | __alloc_bootmem_low_node(pgdat, x, PAGE_SIZE, 0) |
134 | 134 | ||
135 | |||
136 | #if defined(CONFIG_HAVE_MEMBLOCK) | ||
137 | |||
138 | /* FIXME: use MEMBLOCK_ALLOC_* variants here */ | 135 | /* FIXME: use MEMBLOCK_ALLOC_* variants here */ |
139 | #define BOOTMEM_ALLOC_ACCESSIBLE 0 | 136 | #define BOOTMEM_ALLOC_ACCESSIBLE 0 |
140 | #define BOOTMEM_ALLOC_ANYWHERE (~(phys_addr_t)0) | 137 | #define BOOTMEM_ALLOC_ANYWHERE (~(phys_addr_t)0) |
@@ -234,115 +231,6 @@ static inline void __init memblock_free_late( | |||
234 | __memblock_free_late(base, size); | 231 | __memblock_free_late(base, size); |
235 | } | 232 | } |
236 | 233 | ||
237 | #else | ||
238 | |||
239 | #define BOOTMEM_ALLOC_ACCESSIBLE 0 | ||
240 | |||
241 | |||
242 | /* Fall back to all the existing bootmem APIs */ | ||
243 | static inline void * __init memblock_virt_alloc( | ||
244 | phys_addr_t size, phys_addr_t align) | ||
245 | { | ||
246 | if (!align) | ||
247 | align = SMP_CACHE_BYTES; | ||
248 | return __alloc_bootmem(size, align, BOOTMEM_LOW_LIMIT); | ||
249 | } | ||
250 | |||
251 | static inline void * __init memblock_virt_alloc_raw( | ||
252 | phys_addr_t size, phys_addr_t align) | ||
253 | { | ||
254 | if (!align) | ||
255 | align = SMP_CACHE_BYTES; | ||
256 | return __alloc_bootmem_nopanic(size, align, BOOTMEM_LOW_LIMIT); | ||
257 | } | ||
258 | |||
259 | static inline void * __init memblock_virt_alloc_nopanic( | ||
260 | phys_addr_t size, phys_addr_t align) | ||
261 | { | ||
262 | if (!align) | ||
263 | align = SMP_CACHE_BYTES; | ||
264 | return __alloc_bootmem_nopanic(size, align, BOOTMEM_LOW_LIMIT); | ||
265 | } | ||
266 | |||
267 | static inline void * __init memblock_virt_alloc_low( | ||
268 | phys_addr_t size, phys_addr_t align) | ||
269 | { | ||
270 | if (!align) | ||
271 | align = SMP_CACHE_BYTES; | ||
272 | return __alloc_bootmem_low(size, align, 0); | ||
273 | } | ||
274 | |||
275 | static inline void * __init memblock_virt_alloc_low_nopanic( | ||
276 | phys_addr_t size, phys_addr_t align) | ||
277 | { | ||
278 | if (!align) | ||
279 | align = SMP_CACHE_BYTES; | ||
280 | return __alloc_bootmem_low_nopanic(size, align, 0); | ||
281 | } | ||
282 | |||
283 | static inline void * __init memblock_virt_alloc_from_nopanic( | ||
284 | phys_addr_t size, phys_addr_t align, phys_addr_t min_addr) | ||
285 | { | ||
286 | return __alloc_bootmem_nopanic(size, align, min_addr); | ||
287 | } | ||
288 | |||
289 | static inline void * __init memblock_virt_alloc_node( | ||
290 | phys_addr_t size, int nid) | ||
291 | { | ||
292 | return __alloc_bootmem_node(NODE_DATA(nid), size, SMP_CACHE_BYTES, | ||
293 | BOOTMEM_LOW_LIMIT); | ||
294 | } | ||
295 | |||
296 | static inline void * __init memblock_virt_alloc_node_nopanic( | ||
297 | phys_addr_t size, int nid) | ||
298 | { | ||
299 | return __alloc_bootmem_node_nopanic(NODE_DATA(nid), size, | ||
300 | SMP_CACHE_BYTES, | ||
301 | BOOTMEM_LOW_LIMIT); | ||
302 | } | ||
303 | |||
304 | static inline void * __init memblock_virt_alloc_try_nid(phys_addr_t size, | ||
305 | phys_addr_t align, phys_addr_t min_addr, phys_addr_t max_addr, int nid) | ||
306 | { | ||
307 | return __alloc_bootmem_node_high(NODE_DATA(nid), size, align, | ||
308 | min_addr); | ||
309 | } | ||
310 | |||
311 | static inline void * __init memblock_virt_alloc_try_nid_raw( | ||
312 | phys_addr_t size, phys_addr_t align, | ||
313 | phys_addr_t min_addr, phys_addr_t max_addr, int nid) | ||
314 | { | ||
315 | return ___alloc_bootmem_node_nopanic(NODE_DATA(nid), size, align, | ||
316 | min_addr, max_addr); | ||
317 | } | ||
318 | |||
319 | static inline void * __init memblock_virt_alloc_try_nid_nopanic( | ||
320 | phys_addr_t size, phys_addr_t align, | ||
321 | phys_addr_t min_addr, phys_addr_t max_addr, int nid) | ||
322 | { | ||
323 | return ___alloc_bootmem_node_nopanic(NODE_DATA(nid), size, align, | ||
324 | min_addr, max_addr); | ||
325 | } | ||
326 | |||
327 | static inline void __init memblock_free_early( | ||
328 | phys_addr_t base, phys_addr_t size) | ||
329 | { | ||
330 | free_bootmem(base, size); | ||
331 | } | ||
332 | |||
333 | static inline void __init memblock_free_early_nid( | ||
334 | phys_addr_t base, phys_addr_t size, int nid) | ||
335 | { | ||
336 | free_bootmem_node(NODE_DATA(nid), base, size); | ||
337 | } | ||
338 | |||
339 | static inline void __init memblock_free_late( | ||
340 | phys_addr_t base, phys_addr_t size) | ||
341 | { | ||
342 | free_bootmem_late(base, size); | ||
343 | } | ||
344 | #endif /* defined(CONFIG_HAVE_MEMBLOCK) */ | ||
345 | |||
346 | extern void *alloc_large_system_hash(const char *tablename, | 234 | extern void *alloc_large_system_hash(const char *tablename, |
347 | unsigned long bucketsize, | 235 | unsigned long bucketsize, |
348 | unsigned long numentries, | 236 | unsigned long numentries, |
diff --git a/include/linux/memblock.h b/include/linux/memblock.h index 2acdd046df2d..224d27363cca 100644 --- a/include/linux/memblock.h +++ b/include/linux/memblock.h | |||
@@ -2,7 +2,6 @@ | |||
2 | #define _LINUX_MEMBLOCK_H | 2 | #define _LINUX_MEMBLOCK_H |
3 | #ifdef __KERNEL__ | 3 | #ifdef __KERNEL__ |
4 | 4 | ||
5 | #ifdef CONFIG_HAVE_MEMBLOCK | ||
6 | /* | 5 | /* |
7 | * Logical memory blocks. | 6 | * Logical memory blocks. |
8 | * | 7 | * |
@@ -440,12 +439,6 @@ static inline void early_memtest(phys_addr_t start, phys_addr_t end) | |||
440 | { | 439 | { |
441 | } | 440 | } |
442 | #endif | 441 | #endif |
443 | #else | ||
444 | static inline phys_addr_t memblock_alloc(phys_addr_t size, phys_addr_t align) | ||
445 | { | ||
446 | return 0; | ||
447 | } | ||
448 | #endif /* CONFIG_HAVE_MEMBLOCK */ | ||
449 | 442 | ||
450 | #endif /* __KERNEL__ */ | 443 | #endif /* __KERNEL__ */ |
451 | 444 | ||
diff --git a/include/linux/mm.h b/include/linux/mm.h index 1e52b8fd1685..fcf9cc9d535f 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -2163,7 +2163,7 @@ extern int __meminit __early_pfn_to_nid(unsigned long pfn, | |||
2163 | struct mminit_pfnnid_cache *state); | 2163 | struct mminit_pfnnid_cache *state); |
2164 | #endif | 2164 | #endif |
2165 | 2165 | ||
2166 | #if defined(CONFIG_HAVE_MEMBLOCK) && !defined(CONFIG_FLAT_NODE_MEM_MAP) | 2166 | #if !defined(CONFIG_FLAT_NODE_MEM_MAP) |
2167 | void zero_resv_unavail(void); | 2167 | void zero_resv_unavail(void); |
2168 | #else | 2168 | #else |
2169 | static inline void zero_resv_unavail(void) {} | 2169 | static inline void zero_resv_unavail(void) {} |
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index e0ba05e6f6bd..1af29b8224fd 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug | |||
@@ -1292,7 +1292,7 @@ config DEBUG_KOBJECT | |||
1292 | depends on DEBUG_KERNEL | 1292 | depends on DEBUG_KERNEL |
1293 | help | 1293 | help |
1294 | If you say Y here, some extra kobject debugging messages will be sent | 1294 | If you say Y here, some extra kobject debugging messages will be sent |
1295 | to the syslog. | 1295 | to the syslog. |
1296 | 1296 | ||
1297 | config DEBUG_KOBJECT_RELEASE | 1297 | config DEBUG_KOBJECT_RELEASE |
1298 | bool "kobject release debugging" | 1298 | bool "kobject release debugging" |
@@ -1980,7 +1980,6 @@ endif # RUNTIME_TESTING_MENU | |||
1980 | 1980 | ||
1981 | config MEMTEST | 1981 | config MEMTEST |
1982 | bool "Memtest" | 1982 | bool "Memtest" |
1983 | depends on HAVE_MEMBLOCK | ||
1984 | ---help--- | 1983 | ---help--- |
1985 | This option adds a kernel parameter 'memtest', which allows memtest | 1984 | This option adds a kernel parameter 'memtest', which allows memtest |
1986 | to be set. | 1985 | to be set. |
diff --git a/mm/Kconfig b/mm/Kconfig index f7cb608f9ab2..d85e39da47ae 100644 --- a/mm/Kconfig +++ b/mm/Kconfig | |||
@@ -127,9 +127,6 @@ config SPARSEMEM_VMEMMAP | |||
127 | pfn_to_page and page_to_pfn operations. This is the most | 127 | pfn_to_page and page_to_pfn operations. This is the most |
128 | efficient option when sufficient kernel resources are available. | 128 | efficient option when sufficient kernel resources are available. |
129 | 129 | ||
130 | config HAVE_MEMBLOCK | ||
131 | bool | ||
132 | |||
133 | config HAVE_MEMBLOCK_NODE_MAP | 130 | config HAVE_MEMBLOCK_NODE_MAP |
134 | bool | 131 | bool |
135 | 132 | ||
@@ -478,7 +475,7 @@ config FRONTSWAP | |||
478 | 475 | ||
479 | config CMA | 476 | config CMA |
480 | bool "Contiguous Memory Allocator" | 477 | bool "Contiguous Memory Allocator" |
481 | depends on HAVE_MEMBLOCK && MMU | 478 | depends on MMU |
482 | select MIGRATION | 479 | select MIGRATION |
483 | select MEMORY_ISOLATION | 480 | select MEMORY_ISOLATION |
484 | help | 481 | help |
diff --git a/mm/Makefile b/mm/Makefile index ea5333886593..ca3c844d7a56 100644 --- a/mm/Makefile +++ b/mm/Makefile | |||
@@ -43,11 +43,11 @@ obj-y := filemap.o mempool.o oom_kill.o fadvise.o \ | |||
43 | 43 | ||
44 | obj-y += init-mm.o | 44 | obj-y += init-mm.o |
45 | obj-y += nobootmem.o | 45 | obj-y += nobootmem.o |
46 | obj-y += memblock.o | ||
46 | 47 | ||
47 | ifdef CONFIG_MMU | 48 | ifdef CONFIG_MMU |
48 | obj-$(CONFIG_ADVISE_SYSCALLS) += madvise.o | 49 | obj-$(CONFIG_ADVISE_SYSCALLS) += madvise.o |
49 | endif | 50 | endif |
50 | obj-$(CONFIG_HAVE_MEMBLOCK) += memblock.o | ||
51 | 51 | ||
52 | obj-$(CONFIG_SWAP) += page_io.o swap_state.o swapfile.o swap_slots.o | 52 | obj-$(CONFIG_SWAP) += page_io.o swap_state.o swapfile.o swap_slots.o |
53 | obj-$(CONFIG_FRONTSWAP) += frontswap.o | 53 | obj-$(CONFIG_FRONTSWAP) += frontswap.o |
diff --git a/mm/nobootmem.c b/mm/nobootmem.c index 439af3b765a7..d4d0cd474087 100644 --- a/mm/nobootmem.c +++ b/mm/nobootmem.c | |||
@@ -23,10 +23,6 @@ | |||
23 | 23 | ||
24 | #include "internal.h" | 24 | #include "internal.h" |
25 | 25 | ||
26 | #ifndef CONFIG_HAVE_MEMBLOCK | ||
27 | #error CONFIG_HAVE_MEMBLOCK not defined | ||
28 | #endif | ||
29 | |||
30 | #ifndef CONFIG_NEED_MULTIPLE_NODES | 26 | #ifndef CONFIG_NEED_MULTIPLE_NODES |
31 | struct pglist_data __refdata contig_page_data; | 27 | struct pglist_data __refdata contig_page_data; |
32 | EXPORT_SYMBOL(contig_page_data); | 28 | EXPORT_SYMBOL(contig_page_data); |
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 863d46da6586..59d171f84445 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c | |||
@@ -6508,8 +6508,7 @@ void __init free_area_init_node(int nid, unsigned long *zones_size, | |||
6508 | free_area_init_core(pgdat); | 6508 | free_area_init_core(pgdat); |
6509 | } | 6509 | } |
6510 | 6510 | ||
6511 | #if defined(CONFIG_HAVE_MEMBLOCK) && !defined(CONFIG_FLAT_NODE_MEM_MAP) | 6511 | #if !defined(CONFIG_FLAT_NODE_MEM_MAP) |
6512 | |||
6513 | /* | 6512 | /* |
6514 | * Zero all valid struct pages in range [spfn, epfn), return number of struct | 6513 | * Zero all valid struct pages in range [spfn, epfn), return number of struct |
6515 | * pages zeroed | 6514 | * pages zeroed |
@@ -6569,7 +6568,7 @@ void __init zero_resv_unavail(void) | |||
6569 | if (pgcnt) | 6568 | if (pgcnt) |
6570 | pr_info("Zeroed struct page in unavailable ranges: %lld pages", pgcnt); | 6569 | pr_info("Zeroed struct page in unavailable ranges: %lld pages", pgcnt); |
6571 | } | 6570 | } |
6572 | #endif /* CONFIG_HAVE_MEMBLOCK && !CONFIG_FLAT_NODE_MEM_MAP */ | 6571 | #endif /* !CONFIG_FLAT_NODE_MEM_MAP */ |
6573 | 6572 | ||
6574 | #ifdef CONFIG_HAVE_MEMBLOCK_NODE_MAP | 6573 | #ifdef CONFIG_HAVE_MEMBLOCK_NODE_MAP |
6575 | 6574 | ||