Skip to content

Commit 350e88b

Browse files
rppttorvalds
authored andcommitted
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>
1 parent f27a513 commit 350e88b

File tree

16 files changed

+19
-23
lines changed

16 files changed

+19
-23
lines changed

arch/arm/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ config ARM
44
default y
55
select ARCH_32BIT_OFF_T
66
select ARCH_CLOCKSOURCE_DATA
7-
select ARCH_DISCARD_MEMBLOCK if !HAVE_ARCH_PFN_VALID && !KEXEC
87
select ARCH_HAS_DEBUG_VIRTUAL if MMU
98
select ARCH_HAS_DEVMEM_IS_ALLOWED
109
select ARCH_HAS_ELF_RANDOMIZE
@@ -22,6 +21,7 @@ config ARM
2221
select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST
2322
select ARCH_HAVE_CUSTOM_GPIO_H
2423
select ARCH_HAS_GCOV_PROFILE_ALL
24+
select ARCH_KEEP_MEMBLOCK if HAVE_ARCH_PFN_VALID || KEXEC
2525
select ARCH_MIGHT_HAVE_PC_PARPORT
2626
select ARCH_NO_SG_CHAIN if !ARM_HAS_SG_CHAIN
2727
select ARCH_OPTIONAL_KERNEL_RWX if ARCH_HAS_STRICT_KERNEL_RWX

arch/arm64/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ config ARM64
6060
select ARCH_INLINE_SPIN_UNLOCK_BH if !PREEMPT
6161
select ARCH_INLINE_SPIN_UNLOCK_IRQ if !PREEMPT
6262
select ARCH_INLINE_SPIN_UNLOCK_IRQRESTORE if !PREEMPT
63+
select ARCH_KEEP_MEMBLOCK
6364
select ARCH_USE_CMPXCHG_LOCKREF
6465
select ARCH_USE_QUEUED_RWLOCKS
6566
select ARCH_USE_QUEUED_SPINLOCKS

arch/hexagon/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ config HEXAGON
2222
select GENERIC_IRQ_SHOW
2323
select HAVE_ARCH_KGDB
2424
select HAVE_ARCH_TRACEHOOK
25-
select ARCH_DISCARD_MEMBLOCK
2625
select NEED_SG_DMA_LENGTH
2726
select NO_IOPORT_MAP
2827
select GENERIC_IOMAP

arch/ia64/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ config IA64
3333
select ARCH_HAS_DMA_COHERENT_TO_PFN if SWIOTLB
3434
select ARCH_HAS_SYNC_DMA_FOR_CPU if SWIOTLB
3535
select VIRT_TO_BUS
36-
select ARCH_DISCARD_MEMBLOCK
3736
select GENERIC_IRQ_PROBE
3837
select GENERIC_PENDING_IRQ if SMP
3938
select GENERIC_IRQ_SHOW

arch/m68k/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ config M68K
2626
select MODULES_USE_ELF_RELA
2727
select OLD_SIGSUSPEND3
2828
select OLD_SIGACTION
29-
select ARCH_DISCARD_MEMBLOCK
3029
select MMU_GATHER_NO_RANGE if MMU
3130

3231
config CPU_BIG_ENDIAN

arch/mips/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ config MIPS
55
select ARCH_32BIT_OFF_T if !64BIT
66
select ARCH_BINFMT_ELF_STATE if MIPS_FP_SUPPORT
77
select ARCH_CLOCKSOURCE_DATA
8-
select ARCH_DISCARD_MEMBLOCK
98
select ARCH_HAS_ELF_RANDOMIZE
109
select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST
1110
select ARCH_HAS_UBSAN_SANITIZE_ALL

arch/nios2/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ config NIOS2
2323
select SPARSE_IRQ
2424
select USB_ARCH_HAS_HCD if USB_SUPPORT
2525
select CPU_NO_EFFICIENT_FFS
26-
select ARCH_DISCARD_MEMBLOCK
2726
select MMU_GATHER_NO_RANGE if MMU
2827

2928
config GENERIC_CSUM

arch/powerpc/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ config PPC
137137
select ARCH_HAS_UBSAN_SANITIZE_ALL
138138
select ARCH_HAS_ZONE_DEVICE if PPC_BOOK3S_64
139139
select ARCH_HAVE_NMI_SAFE_CMPXCHG
140+
select ARCH_KEEP_MEMBLOCK
140141
select ARCH_MIGHT_HAVE_PC_PARPORT
141142
select ARCH_MIGHT_HAVE_PC_SERIO
142143
select ARCH_OPTIONAL_KERNEL_RWX if ARCH_HAS_STRICT_KERNEL_RWX

arch/s390/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ config S390
100100
select ARCH_INLINE_WRITE_UNLOCK_BH
101101
select ARCH_INLINE_WRITE_UNLOCK_IRQ
102102
select ARCH_INLINE_WRITE_UNLOCK_IRQRESTORE
103+
select ARCH_KEEP_MEMBLOCK
103104
select ARCH_SAVE_PAGE_KEYS if HIBERNATION
104105
select ARCH_SUPPORTS_ATOMIC_RMW
105106
select ARCH_SUPPORTS_NUMA_BALANCING

arch/sh/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ config SUPERH
1010
select DMA_DECLARE_COHERENT
1111
select HAVE_IDE if HAS_IOPORT_MAP
1212
select HAVE_MEMBLOCK_NODE_MAP
13-
select ARCH_DISCARD_MEMBLOCK
1413
select HAVE_OPROFILE
1514
select HAVE_ARCH_TRACEHOOK
1615
select HAVE_PERF_EVENTS

0 commit comments

Comments
 (0)