summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorMike Rapoport <rppt@linux.ibm.com>2019-05-13 20:22:59 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2019-05-14 12:47:50 -0400
commit350e88bad4964da6feabee02a1a70381bcdb087e (patch)
tree7bfbd4c2a090c7885899ea4a8858b7b7100824a6 /arch
parentf27a5136f70a8c90e8b30a983b6f54540742f849 (diff)
mm: memblock: make keeping memblock memory opt-in rather than opt-out
Most architectures do not need the memblock memory after the page allocator is initialized, but only few enable ARCH_DISCARD_MEMBLOCK in the arch Kconfig. Replacing ARCH_DISCARD_MEMBLOCK with ARCH_KEEP_MEMBLOCK and inverting the logic makes it clear which architectures actually use memblock after system initialization and skips the necessity to add ARCH_DISCARD_MEMBLOCK to the architectures that are still missing that option. Link: http://lkml.kernel.org/r/1556102150-32517-1-git-send-email-rppt@linux.ibm.com Signed-off-by: Mike Rapoport <rppt@linux.ibm.com> Acked-by: Michael Ellerman <mpe@ellerman.id.au> (powerpc) Cc: Russell King <linux@armlinux.org.uk> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Will Deacon <will.deacon@arm.com> Cc: Richard Kuo <rkuo@codeaurora.org> Cc: Tony Luck <tony.luck@intel.com> Cc: Fenghua Yu <fenghua.yu@intel.com> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: Paul Burton <paul.burton@mips.com> Cc: James Hogan <jhogan@kernel.org> Cc: Ley Foon Tan <lftan@altera.com> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: Heiko Carstens <heiko.carstens@de.ibm.com> Cc: Yoshinori Sato <ysato@users.sourceforge.jp> Cc: Rich Felker <dalias@libc.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@redhat.com> Cc: Borislav Petkov <bp@alien8.de> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Eric Biederman <ebiederm@xmission.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/Kconfig2
-rw-r--r--arch/arm64/Kconfig1
-rw-r--r--arch/hexagon/Kconfig1
-rw-r--r--arch/ia64/Kconfig1
-rw-r--r--arch/m68k/Kconfig1
-rw-r--r--arch/mips/Kconfig1
-rw-r--r--arch/nios2/Kconfig1
-rw-r--r--arch/powerpc/Kconfig1
-rw-r--r--arch/s390/Kconfig1
-rw-r--r--arch/sh/Kconfig1
-rw-r--r--arch/x86/Kconfig1
11 files changed, 4 insertions, 8 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index a11dfcc2a130..5fd344bd06b9 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -4,7 +4,6 @@ config ARM
4 default y 4 default y
5 select ARCH_32BIT_OFF_T 5 select ARCH_32BIT_OFF_T
6 select ARCH_CLOCKSOURCE_DATA 6 select ARCH_CLOCKSOURCE_DATA
7 select ARCH_DISCARD_MEMBLOCK if !HAVE_ARCH_PFN_VALID && !KEXEC
8 select ARCH_HAS_DEBUG_VIRTUAL if MMU 7 select ARCH_HAS_DEBUG_VIRTUAL if MMU
9 select ARCH_HAS_DEVMEM_IS_ALLOWED 8 select ARCH_HAS_DEVMEM_IS_ALLOWED
10 select ARCH_HAS_ELF_RANDOMIZE 9 select ARCH_HAS_ELF_RANDOMIZE
@@ -22,6 +21,7 @@ config ARM
22 select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST 21 select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST
23 select ARCH_HAVE_CUSTOM_GPIO_H 22 select ARCH_HAVE_CUSTOM_GPIO_H
24 select ARCH_HAS_GCOV_PROFILE_ALL 23 select ARCH_HAS_GCOV_PROFILE_ALL
24 select ARCH_KEEP_MEMBLOCK if HAVE_ARCH_PFN_VALID || KEXEC
25 select ARCH_MIGHT_HAVE_PC_PARPORT 25 select ARCH_MIGHT_HAVE_PC_PARPORT
26 select ARCH_NO_SG_CHAIN if !ARM_HAS_SG_CHAIN 26 select ARCH_NO_SG_CHAIN if !ARM_HAS_SG_CHAIN
27 select ARCH_OPTIONAL_KERNEL_RWX if ARCH_HAS_STRICT_KERNEL_RWX 27 select ARCH_OPTIONAL_KERNEL_RWX if ARCH_HAS_STRICT_KERNEL_RWX
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index 7a1aa53d188d..69a59a5d1143 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -60,6 +60,7 @@ config ARM64
60 select ARCH_INLINE_SPIN_UNLOCK_BH if !PREEMPT 60 select ARCH_INLINE_SPIN_UNLOCK_BH if !PREEMPT
61 select ARCH_INLINE_SPIN_UNLOCK_IRQ if !PREEMPT 61 select ARCH_INLINE_SPIN_UNLOCK_IRQ if !PREEMPT
62 select ARCH_INLINE_SPIN_UNLOCK_IRQRESTORE if !PREEMPT 62 select ARCH_INLINE_SPIN_UNLOCK_IRQRESTORE if !PREEMPT
63 select ARCH_KEEP_MEMBLOCK
63 select ARCH_USE_CMPXCHG_LOCKREF 64 select ARCH_USE_CMPXCHG_LOCKREF
64 select ARCH_USE_QUEUED_RWLOCKS 65 select ARCH_USE_QUEUED_RWLOCKS
65 select ARCH_USE_QUEUED_SPINLOCKS 66 select ARCH_USE_QUEUED_SPINLOCKS
diff --git a/arch/hexagon/Kconfig b/arch/hexagon/Kconfig
index 3e54a53208d5..b7d404bbaa0f 100644
--- a/arch/hexagon/Kconfig
+++ b/arch/hexagon/Kconfig
@@ -22,7 +22,6 @@ config HEXAGON
22 select GENERIC_IRQ_SHOW 22 select GENERIC_IRQ_SHOW
23 select HAVE_ARCH_KGDB 23 select HAVE_ARCH_KGDB
24 select HAVE_ARCH_TRACEHOOK 24 select HAVE_ARCH_TRACEHOOK
25 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
28 select GENERIC_IOMAP 27 select GENERIC_IOMAP
diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig
index 73a26f04644e..7468d8e50467 100644
--- a/arch/ia64/Kconfig
+++ b/arch/ia64/Kconfig
@@ -33,7 +33,6 @@ config IA64
33 select ARCH_HAS_DMA_COHERENT_TO_PFN if SWIOTLB 33 select ARCH_HAS_DMA_COHERENT_TO_PFN if SWIOTLB
34 select ARCH_HAS_SYNC_DMA_FOR_CPU if SWIOTLB 34 select ARCH_HAS_SYNC_DMA_FOR_CPU if SWIOTLB
35 select VIRT_TO_BUS 35 select VIRT_TO_BUS
36 select ARCH_DISCARD_MEMBLOCK
37 select GENERIC_IRQ_PROBE 36 select GENERIC_IRQ_PROBE
38 select GENERIC_PENDING_IRQ if SMP 37 select GENERIC_PENDING_IRQ if SMP
39 select GENERIC_IRQ_SHOW 38 select GENERIC_IRQ_SHOW
diff --git a/arch/m68k/Kconfig b/arch/m68k/Kconfig
index fe5cc2da6d10..218e037ef901 100644
--- a/arch/m68k/Kconfig
+++ b/arch/m68k/Kconfig
@@ -26,7 +26,6 @@ config M68K
26 select MODULES_USE_ELF_RELA 26 select MODULES_USE_ELF_RELA
27 select OLD_SIGSUSPEND3 27 select OLD_SIGSUSPEND3
28 select OLD_SIGACTION 28 select OLD_SIGACTION
29 select ARCH_DISCARD_MEMBLOCK
30 select MMU_GATHER_NO_RANGE if MMU 29 select MMU_GATHER_NO_RANGE if MMU
31 30
32config CPU_BIG_ENDIAN 31config CPU_BIG_ENDIAN
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index ff8cff9fcf54..677e5bfeff47 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -5,7 +5,6 @@ config MIPS
5 select ARCH_32BIT_OFF_T if !64BIT 5 select ARCH_32BIT_OFF_T if !64BIT
6 select ARCH_BINFMT_ELF_STATE if MIPS_FP_SUPPORT 6 select ARCH_BINFMT_ELF_STATE if MIPS_FP_SUPPORT
7 select ARCH_CLOCKSOURCE_DATA 7 select ARCH_CLOCKSOURCE_DATA
8 select ARCH_DISCARD_MEMBLOCK
9 select ARCH_HAS_ELF_RANDOMIZE 8 select ARCH_HAS_ELF_RANDOMIZE
10 select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST 9 select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST
11 select ARCH_HAS_UBSAN_SANITIZE_ALL 10 select ARCH_HAS_UBSAN_SANITIZE_ALL
diff --git a/arch/nios2/Kconfig b/arch/nios2/Kconfig
index ea37394ff3ea..26a9c760a98b 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 ARCH_DISCARD_MEMBLOCK
27 select MMU_GATHER_NO_RANGE if MMU 26 select MMU_GATHER_NO_RANGE if MMU
28 27
29config GENERIC_CSUM 28config GENERIC_CSUM
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index d7996cfaceca..8c1c636308c8 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -137,6 +137,7 @@ config PPC
137 select ARCH_HAS_UBSAN_SANITIZE_ALL 137 select ARCH_HAS_UBSAN_SANITIZE_ALL
138 select ARCH_HAS_ZONE_DEVICE if PPC_BOOK3S_64 138 select ARCH_HAS_ZONE_DEVICE if PPC_BOOK3S_64
139 select ARCH_HAVE_NMI_SAFE_CMPXCHG 139 select ARCH_HAVE_NMI_SAFE_CMPXCHG
140 select ARCH_KEEP_MEMBLOCK
140 select ARCH_MIGHT_HAVE_PC_PARPORT 141 select ARCH_MIGHT_HAVE_PC_PARPORT
141 select ARCH_MIGHT_HAVE_PC_SERIO 142 select ARCH_MIGHT_HAVE_PC_SERIO
142 select ARCH_OPTIONAL_KERNEL_RWX if ARCH_HAS_STRICT_KERNEL_RWX 143 select ARCH_OPTIONAL_KERNEL_RWX if ARCH_HAS_STRICT_KERNEL_RWX
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig
index d0c046af65fa..109243fdb6ec 100644
--- a/arch/s390/Kconfig
+++ b/arch/s390/Kconfig
@@ -100,6 +100,7 @@ config S390
100 select ARCH_INLINE_WRITE_UNLOCK_BH 100 select ARCH_INLINE_WRITE_UNLOCK_BH
101 select ARCH_INLINE_WRITE_UNLOCK_IRQ 101 select ARCH_INLINE_WRITE_UNLOCK_IRQ
102 select ARCH_INLINE_WRITE_UNLOCK_IRQRESTORE 102 select ARCH_INLINE_WRITE_UNLOCK_IRQRESTORE
103 select ARCH_KEEP_MEMBLOCK
103 select ARCH_SAVE_PAGE_KEYS if HIBERNATION 104 select ARCH_SAVE_PAGE_KEYS if HIBERNATION
104 select ARCH_SUPPORTS_ATOMIC_RMW 105 select ARCH_SUPPORTS_ATOMIC_RMW
105 select ARCH_SUPPORTS_NUMA_BALANCING 106 select ARCH_SUPPORTS_NUMA_BALANCING
diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig
index 2a77033e1e7c..b77f512bb176 100644
--- a/arch/sh/Kconfig
+++ b/arch/sh/Kconfig
@@ -10,7 +10,6 @@ config SUPERH
10 select DMA_DECLARE_COHERENT 10 select DMA_DECLARE_COHERENT
11 select HAVE_IDE if HAS_IOPORT_MAP 11 select HAVE_IDE if HAS_IOPORT_MAP
12 select HAVE_MEMBLOCK_NODE_MAP 12 select HAVE_MEMBLOCK_NODE_MAP
13 select ARCH_DISCARD_MEMBLOCK
14 select HAVE_OPROFILE 13 select HAVE_OPROFILE
15 select HAVE_ARCH_TRACEHOOK 14 select HAVE_ARCH_TRACEHOOK
16 select HAVE_PERF_EVENTS 15 select HAVE_PERF_EVENTS
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index f21bc56e5d7b..818b361094ed 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -47,7 +47,6 @@ config X86
47 select ARCH_32BIT_OFF_T if X86_32 47 select ARCH_32BIT_OFF_T if X86_32
48 select ARCH_CLOCKSOURCE_DATA 48 select ARCH_CLOCKSOURCE_DATA
49 select ARCH_CLOCKSOURCE_INIT 49 select ARCH_CLOCKSOURCE_INIT
50 select ARCH_DISCARD_MEMBLOCK
51 select ARCH_HAS_ACPI_TABLE_UPGRADE if ACPI 50 select ARCH_HAS_ACPI_TABLE_UPGRADE if ACPI
52 select ARCH_HAS_DEBUG_VIRTUAL 51 select ARCH_HAS_DEBUG_VIRTUAL
53 select ARCH_HAS_DEVMEM_IS_ALLOWED 52 select ARCH_HAS_DEVMEM_IS_ALLOWED