LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 11/11] s390: don't redefined the HAS_IOMEM symbol
From: Christoph Hellwig @ 2019-02-13 17:40 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: linux-xtensa, linux-s390, linux-kbuild, linux-kernel, linux-riscv,
	linuxppc-dev
In-Reply-To: <20190213174005.28785-1-hch@lst.de>

Rely on the common defintion instead.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 arch/s390/Kconfig | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig
index 9a25e19364f5..0f62e33ffcb2 100644
--- a/arch/s390/Kconfig
+++ b/arch/s390/Kconfig
@@ -159,6 +159,7 @@ config S390
 	select MODULES_USE_ELF_RELA
 	select NEED_DMA_MAP_STATE	if PCI
 	select NEED_SG_DMA_LENGTH	if PCI
+	select NO_IOMEM			if !PCI
 	select OLD_SIGACTION
 	select OLD_SIGSUSPEND3
 	select PCI_DOMAINS		if PCI
@@ -708,9 +709,6 @@ config PCI_NR_FUNCTIONS
 
 endif	# PCI
 
-config HAS_IOMEM
-	def_bool PCI
-
 config CHSC_SCH
 	def_tristate m
 	prompt "Support for CHSC subchannels"
-- 
2.20.1


^ permalink raw reply related

* [PATCH 10/11] lib: consolidate the GENERIC_HWEIGHT symbol
From: Christoph Hellwig @ 2019-02-13 17:40 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: linux-xtensa, linux-s390, linux-kbuild, linux-kernel, linux-riscv,
	linuxppc-dev
In-Reply-To: <20190213174005.28785-1-hch@lst.de>

Introduce a new ARCH_HAS_HWEIGHT symbol for alpha and ia64, and just
default to the generic version otherwise.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 arch/alpha/Kconfig      | 5 +----
 arch/arc/Kconfig        | 3 ---
 arch/arm/Kconfig        | 4 ----
 arch/arm64/Kconfig      | 3 ---
 arch/c6x/Kconfig        | 3 ---
 arch/csky/Kconfig       | 3 ---
 arch/h8300/Kconfig      | 3 ---
 arch/hexagon/Kconfig    | 3 ---
 arch/ia64/Kconfig       | 1 +
 arch/m68k/Kconfig       | 4 ----
 arch/microblaze/Kconfig | 3 ---
 arch/mips/Kconfig       | 4 ----
 arch/nds32/Kconfig      | 3 ---
 arch/nios2/Kconfig      | 3 ---
 arch/openrisc/Kconfig   | 3 ---
 arch/parisc/Kconfig     | 4 ----
 arch/powerpc/Kconfig    | 4 ----
 arch/riscv/Kconfig      | 3 ---
 arch/s390/Kconfig       | 3 ---
 arch/sh/Kconfig         | 3 ---
 arch/sparc/Kconfig      | 4 ----
 arch/unicore32/Kconfig  | 3 ---
 arch/x86/Kconfig        | 3 ---
 arch/x86/um/Kconfig     | 3 ---
 arch/xtensa/Kconfig     | 3 ---
 lib/Kconfig             | 7 +++++++
 26 files changed, 9 insertions(+), 79 deletions(-)

diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig
index 65b5514e5a7f..a549c53563e8 100644
--- a/arch/alpha/Kconfig
+++ b/arch/alpha/Kconfig
@@ -2,6 +2,7 @@
 config ALPHA
 	bool
 	default y
+	select ARCH_HAS_HWEIGHT if ALPHA_EV67
 	select ARCH_MIGHT_HAVE_PC_PARPORT
 	select ARCH_MIGHT_HAVE_PC_SERIO
 	select ARCH_NO_PREEMPT
@@ -446,10 +447,6 @@ config ALPHA_IRONGATE
 	depends on ALPHA_NAUTILUS
 	default y
 
-config GENERIC_HWEIGHT
-	bool
-	default y if !ALPHA_EV67
-
 config ALPHA_AVANTI
 	bool
 	depends on ALPHA_XL || ALPHA_AVANTI_CH
diff --git a/arch/arc/Kconfig b/arch/arc/Kconfig
index 6476404b98b8..8bf4c0f7cc1d 100644
--- a/arch/arc/Kconfig
+++ b/arch/arc/Kconfig
@@ -72,9 +72,6 @@ config MMU
 config NO_IOPORT_MAP
 	def_bool y
 
-config GENERIC_HWEIGHT
-	def_bool y
-
 config HAVE_ARCH_TRANSPARENT_HUGEPAGE
 	def_bool y
 	depends on ARC_MMU_V4
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index c230fb1e09ba..b47825767e3d 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -182,10 +182,6 @@ config ARCH_HAS_BANDGAP
 config FIX_EARLYCON_MEM
 	def_bool y if MMU
 
-config GENERIC_HWEIGHT
-	bool
-	default y
-
 config ARCH_MAY_HAVE_PC_FDC
 	bool
 
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index 7cc3334aba29..98c3776ccf6b 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -237,9 +237,6 @@ config ILLEGAL_POINTER_VALUE
 	hex
 	default 0xdead000000000000
 
-config GENERIC_HWEIGHT
-	def_bool y
-
 config ZONE_DMA32
 	def_bool y
 
diff --git a/arch/c6x/Kconfig b/arch/c6x/Kconfig
index 19b145ef7d92..c439d2f46af0 100644
--- a/arch/c6x/Kconfig
+++ b/arch/c6x/Kconfig
@@ -28,9 +28,6 @@ config MMU
 config FPU
 	def_bool n
 
-config GENERIC_HWEIGHT
-	def_bool y
-
 config C6X_BIG_KERNEL
 	bool "Build a big kernel"
 	help
diff --git a/arch/csky/Kconfig b/arch/csky/Kconfig
index c0a49cbd3df0..14a9905e99a4 100644
--- a/arch/csky/Kconfig
+++ b/arch/csky/Kconfig
@@ -84,9 +84,6 @@ config CPU_NO_USER_BKPT
 	  instruction exception.
 	  In kernel we parse the *regs->pc to determine whether to send SIGTRAP or not.
 
-config GENERIC_HWEIGHT
-	def_bool y
-
 config MMU
 	def_bool y
 
diff --git a/arch/h8300/Kconfig b/arch/h8300/Kconfig
index 4f5a1efab822..77ce104bb42e 100644
--- a/arch/h8300/Kconfig
+++ b/arch/h8300/Kconfig
@@ -27,9 +27,6 @@ config H8300
 config CPU_BIG_ENDIAN
 	def_bool y
 
-config GENERIC_HWEIGHT
-	def_bool y
-
 config NO_IOPORT_MAP
 	def_bool y
 
diff --git a/arch/hexagon/Kconfig b/arch/hexagon/Kconfig
index 7a01f4c5a4f6..fb2996063d5a 100644
--- a/arch/hexagon/Kconfig
+++ b/arch/hexagon/Kconfig
@@ -61,9 +61,6 @@ config MMU
 config GENERIC_IRQ_PROBE
 	def_bool y
 
-config GENERIC_HWEIGHT
-	def_bool y
-
 menu "Machine selection"
 
 choice
diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig
index fc44c046953e..c9eb106b1f4c 100644
--- a/arch/ia64/Kconfig
+++ b/arch/ia64/Kconfig
@@ -8,6 +8,7 @@ menu "Processor type and features"
 
 config IA64
 	bool
+	select ARCH_HAS_HWEIGHT
 	select ARCH_MIGHT_HAVE_PC_PARPORT
 	select ARCH_MIGHT_HAVE_PC_SERIO
 	select ACPI if (!IA64_HP_SIM)
diff --git a/arch/m68k/Kconfig b/arch/m68k/Kconfig
index 1bf6abaea604..91b150b6572c 100644
--- a/arch/m68k/Kconfig
+++ b/arch/m68k/Kconfig
@@ -38,10 +38,6 @@ config ARCH_HAS_ILOG2_U32
 config ARCH_HAS_ILOG2_U64
 	bool
 
-config GENERIC_HWEIGHT
-	bool
-	default y
-
 config TIME_LOW_RES
 	bool
 	default y
diff --git a/arch/microblaze/Kconfig b/arch/microblaze/Kconfig
index d8907d6f969c..0185ac1f0268 100644
--- a/arch/microblaze/Kconfig
+++ b/arch/microblaze/Kconfig
@@ -71,9 +71,6 @@ config ARCH_HAS_ILOG2_U32
 config ARCH_HAS_ILOG2_U64
 	def_bool n
 
-config GENERIC_HWEIGHT
-	def_bool y
-
 source "arch/microblaze/Kconfig.platform"
 
 menu "Processor type and features"
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index bd0c9be7e7cf..04e041cac595 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -1042,10 +1042,6 @@ source "arch/mips/paravirt/Kconfig"
 
 endmenu
 
-config GENERIC_HWEIGHT
-	bool
-	default y
-
 config SCHED_OMIT_FRAME_POINTER
 	bool
 	default y
diff --git a/arch/nds32/Kconfig b/arch/nds32/Kconfig
index 7b3a36705aa8..979661f0ab51 100644
--- a/arch/nds32/Kconfig
+++ b/arch/nds32/Kconfig
@@ -50,9 +50,6 @@ config NDS32
 	help
 	  Andes(nds32) Linux support.
 
-config GENERIC_HWEIGHT
-        def_bool y
-
 config GENERIC_LOCKBREAK
         def_bool y
 	depends on PREEMPT
diff --git a/arch/nios2/Kconfig b/arch/nios2/Kconfig
index 11ef63217ebe..a0485f5f0db0 100644
--- a/arch/nios2/Kconfig
+++ b/arch/nios2/Kconfig
@@ -27,9 +27,6 @@ config NIOS2
 	select CPU_NO_EFFICIENT_FFS
 	select ARCH_DISCARD_MEMBLOCK
 
-config GENERIC_HWEIGHT
-	def_bool y
-
 config NO_IOPORT_MAP
 	def_bool y
 
diff --git a/arch/openrisc/Kconfig b/arch/openrisc/Kconfig
index 15d7df402c19..dc026973e6f6 100644
--- a/arch/openrisc/Kconfig
+++ b/arch/openrisc/Kconfig
@@ -46,9 +46,6 @@ config CPU_BIG_ENDIAN
 config MMU
 	def_bool y
 
-config GENERIC_HWEIGHT
-	def_bool y
-
 config NO_IOPORT_MAP
 	def_bool y
 
diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig
index 42282b8e086d..7d5ded83c180 100644
--- a/arch/parisc/Kconfig
+++ b/arch/parisc/Kconfig
@@ -86,10 +86,6 @@ config ARCH_HAS_ILOG2_U64
 	bool
 	default n
 
-config GENERIC_HWEIGHT
-	bool
-	default y
-
 config TIME_LOW_RES
 	bool
 	depends on SMP
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index a0e9207893c8..8dd4d2b24fdb 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -96,10 +96,6 @@ config GENERIC_LOCKBREAK
 	default y
 	depends on SMP && PREEMPT
 
-config GENERIC_HWEIGHT
-	bool
-	default y
-
 config ARCH_HAS_DMA_SET_COHERENT_MASK
         bool
 
diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
index 2b173a48bdbc..0acdd7aaaaea 100644
--- a/arch/riscv/Kconfig
+++ b/arch/riscv/Kconfig
@@ -69,9 +69,6 @@ config PAGE_OFFSET
 	default 0xffffffff80000000 if 64BIT && MAXPHYSMEM_2GB
 	default 0xffffffe000000000 if 64BIT && MAXPHYSMEM_128GB
 
-config GENERIC_HWEIGHT
-	def_bool y
-
 config PGTABLE_LEVELS
 	int
 	default 3 if 64BIT
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig
index 2a5c12be633e..9a25e19364f5 100644
--- a/arch/s390/Kconfig
+++ b/arch/s390/Kconfig
@@ -14,9 +14,6 @@ config ARCH_HAS_ILOG2_U32
 config ARCH_HAS_ILOG2_U64
 	def_bool n
 
-config GENERIC_HWEIGHT
-	def_bool y
-
 config GENERIC_LOCKBREAK
 	def_bool y if SMP && PREEMPT
 
diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig
index 3d0bd7fbe11a..af6a40af1702 100644
--- a/arch/sh/Kconfig
+++ b/arch/sh/Kconfig
@@ -94,9 +94,6 @@ config ARCH_DEFCONFIG
 	default "arch/sh/configs/shx3_defconfig" if SUPERH32
 	default "arch/sh/configs/cayman_defconfig" if SUPERH64
 
-config GENERIC_HWEIGHT
-	def_bool y
-
 config GENERIC_LOCKBREAK
 	def_bool y
 	depends on SMP && PREEMPT
diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig
index 58270c021b01..78135ac357ed 100644
--- a/arch/sparc/Kconfig
+++ b/arch/sparc/Kconfig
@@ -187,10 +187,6 @@ config NR_CPUS
 
 source "kernel/Kconfig.hz"
 
-config GENERIC_HWEIGHT
-	bool
-	default y
-
 config ARCH_MAY_HAVE_PC_FDC
 	bool
 	default y
diff --git a/arch/unicore32/Kconfig b/arch/unicore32/Kconfig
index 9de1d983a99a..e69a8c3232e1 100644
--- a/arch/unicore32/Kconfig
+++ b/arch/unicore32/Kconfig
@@ -38,9 +38,6 @@ config ARCH_HAS_ILOG2_U32
 config ARCH_HAS_ILOG2_U64
 	bool
 
-config GENERIC_HWEIGHT
-	def_bool y
-
 config ARCH_MAY_HAVE_PC_FDC
 	bool
 
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index f4cb31174e1b..7a9347c7448e 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -255,9 +255,6 @@ config GENERIC_ISA_DMA
 	def_bool y
 	depends on ISA_DMA_API
 
-config GENERIC_HWEIGHT
-	def_bool y
-
 config ARCH_MAY_HAVE_PC_FDC
 	def_bool y
 	depends on ISA_DMA_API
diff --git a/arch/x86/um/Kconfig b/arch/x86/um/Kconfig
index f5a8cded3ca4..1628a54af003 100644
--- a/arch/x86/um/Kconfig
+++ b/arch/x86/um/Kconfig
@@ -49,6 +49,3 @@ config ARCH_HAS_SC_SIGNALS
 
 config ARCH_REUSE_HOST_VSYSCALL_AREA
 	def_bool !64BIT
-
-config GENERIC_HWEIGHT
-	def_bool y
diff --git a/arch/xtensa/Kconfig b/arch/xtensa/Kconfig
index d02c25184ca0..ff57afdeda04 100644
--- a/arch/xtensa/Kconfig
+++ b/arch/xtensa/Kconfig
@@ -47,9 +47,6 @@ config XTENSA
 	  with reasonable minimum requirements.  The Xtensa Linux project has
 	  a home page at <http://www.linux-xtensa.org/>.
 
-config GENERIC_HWEIGHT
-	def_bool y
-
 config ARCH_HAS_ILOG2_U32
 	def_bool n
 
diff --git a/lib/Kconfig b/lib/Kconfig
index bd2e7e74c321..91019f26d0a8 100644
--- a/lib/Kconfig
+++ b/lib/Kconfig
@@ -35,6 +35,13 @@ config RATIONAL
 config GENERIC_CSUM
 	bool
 
+config ARCH_HAS_HWEIGHT
+	bool
+
+config GENERIC_HWEIGHT
+	default y if !ARCH_HAS_HWEIGHT
+	bool
+
 config GENERIC_STRNCPY_FROM_USER
 	bool
 
-- 
2.20.1


^ permalink raw reply related

* [PATCH 09/11] lib: consolidate the GENERIC_CSUM symbol
From: Christoph Hellwig @ 2019-02-13 17:40 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: linux-xtensa, linux-s390, linux-kbuild, linux-kernel, linux-riscv,
	linuxppc-dev
In-Reply-To: <20190213174005.28785-1-hch@lst.de>

Add one definition to lib/Kconfig and let the architectures
select if it supported.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 arch/arc/Kconfig        | 4 +---
 arch/arm64/Kconfig      | 4 +---
 arch/csky/Kconfig       | 4 +---
 arch/h8300/Kconfig      | 4 +---
 arch/hexagon/Kconfig    | 4 +---
 arch/m68k/Kconfig       | 3 ---
 arch/microblaze/Kconfig | 4 +---
 arch/mips/Kconfig       | 5 +----
 arch/nds32/Kconfig      | 4 +---
 arch/nios2/Kconfig      | 4 +---
 arch/openrisc/Kconfig   | 6 +-----
 arch/powerpc/Kconfig    | 3 ---
 arch/riscv/Kconfig      | 4 +---
 arch/sh/Kconfig         | 5 +----
 arch/unicore32/Kconfig  | 3 ---
 lib/Kconfig             | 3 +++
 16 files changed, 15 insertions(+), 49 deletions(-)

diff --git a/arch/arc/Kconfig b/arch/arc/Kconfig
index e965383c05d7..6476404b98b8 100644
--- a/arch/arc/Kconfig
+++ b/arch/arc/Kconfig
@@ -20,6 +20,7 @@ config ARC
 	select GENERIC_CALIBRATE_DELAY
 	select GENERIC_ATOMIC64 if !ISA_ARCV2 || !(ARC_HAS_LL64 && ARC_HAS_LLSC)
 	select GENERIC_CLOCKEVENTS
+	select GENERIC_CSUM
 	select GENERIC_FIND_FIRST_BIT
 	# for now, we don't need GENERIC_IRQ_PROBE, CONFIG_GENERIC_IRQ_CHIP
 	select GENERIC_IRQ_SHOW
@@ -59,9 +60,6 @@ config ARCH_HAS_CACHE_LINE_SIZE
 config SCHED_OMIT_FRAME_POINTER
 	def_bool y
 
-config GENERIC_CSUM
-	def_bool y
-
 config ARCH_DISCONTIGMEM_ENABLE
 	def_bool n
 
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index 913b2ca7ec22..7cc3334aba29 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -91,6 +91,7 @@ config ARM64
 	select GENERIC_CLOCKEVENTS
 	select GENERIC_CLOCKEVENTS_BROADCAST
 	select GENERIC_CPU_AUTOPROBE
+	select GENERIC_CSUM
 	select GENERIC_EARLY_IOREMAP
 	select GENERIC_IDLE_POLL_SETUP
 	select GENERIC_IRQ_MULTI_HANDLER
@@ -239,9 +240,6 @@ config ILLEGAL_POINTER_VALUE
 config GENERIC_HWEIGHT
 	def_bool y
 
-config GENERIC_CSUM
-        def_bool y
-
 config ZONE_DMA32
 	def_bool y
 
diff --git a/arch/csky/Kconfig b/arch/csky/Kconfig
index 4085ba807e0c..c0a49cbd3df0 100644
--- a/arch/csky/Kconfig
+++ b/arch/csky/Kconfig
@@ -12,6 +12,7 @@ config CSKY
 	select HANDLE_DOMAIN_IRQ
 	select DW_APB_TIMER_OF
 	select GENERIC_CALIBRATE_DELAY
+	select GENERIC_CSUM
 	select GENERIC_LIB_ASHLDI3
 	select GENERIC_LIB_ASHRDI3
 	select GENERIC_LIB_LSHRDI3
@@ -83,9 +84,6 @@ config CPU_NO_USER_BKPT
 	  instruction exception.
 	  In kernel we parse the *regs->pc to determine whether to send SIGTRAP or not.
 
-config GENERIC_CSUM
-	def_bool y
-
 config GENERIC_HWEIGHT
 	def_bool y
 
diff --git a/arch/h8300/Kconfig b/arch/h8300/Kconfig
index ba33326e7c54..4f5a1efab822 100644
--- a/arch/h8300/Kconfig
+++ b/arch/h8300/Kconfig
@@ -9,6 +9,7 @@ config H8300
 	select GENERIC_CPU_DEVICES
 	select MODULES_USE_ELF_RELA
 	select GENERIC_CLOCKEVENTS
+	select GENERIC_CSUM
 	select CLKDEV_LOOKUP
 	select COMMON_CLK
 	select ARCH_WANT_FRAME_POINTERS
@@ -32,9 +33,6 @@ config GENERIC_HWEIGHT
 config NO_IOPORT_MAP
 	def_bool y
 
-config GENERIC_CSUM
-        def_bool y
-
 config HZ
 	int
 	default 100
diff --git a/arch/hexagon/Kconfig b/arch/hexagon/Kconfig
index 5eb4f48506b6..7a01f4c5a4f6 100644
--- a/arch/hexagon/Kconfig
+++ b/arch/hexagon/Kconfig
@@ -19,6 +19,7 @@ config HEXAGON
 	select HAVE_PERF_EVENTS
 	# GENERIC_ALLOCATOR is used by dma_alloc_coherent()
 	select GENERIC_ALLOCATOR
+	select GENERIC_CSUM
 	select GENERIC_IRQ_SHOW
 	select HAVE_ARCH_KGDB
 	select HAVE_ARCH_TRACEHOOK
@@ -54,9 +55,6 @@ config EARLY_PRINTK
 config MMU
 	def_bool y
 
-config GENERIC_CSUM
-	def_bool y
-
 #
 # Use the generic interrupt handling code in kernel/irq/:
 #
diff --git a/arch/m68k/Kconfig b/arch/m68k/Kconfig
index ed03da5430d9..1bf6abaea604 100644
--- a/arch/m68k/Kconfig
+++ b/arch/m68k/Kconfig
@@ -42,9 +42,6 @@ config GENERIC_HWEIGHT
 	bool
 	default y
 
-config GENERIC_CSUM
-	bool
-
 config TIME_LOW_RES
 	bool
 	default y
diff --git a/arch/microblaze/Kconfig b/arch/microblaze/Kconfig
index 65a44727a7a2..d8907d6f969c 100644
--- a/arch/microblaze/Kconfig
+++ b/arch/microblaze/Kconfig
@@ -16,6 +16,7 @@ config MICROBLAZE
 	select GENERIC_CALIBRATE_DELAY
 	select GENERIC_CLOCKEVENTS
 	select GENERIC_CPU_DEVICES
+	select GENERIC_CSUM
 	select GENERIC_IDLE_POLL_SETUP
 	select GENERIC_IRQ_PROBE
 	select GENERIC_IRQ_SHOW
@@ -73,9 +74,6 @@ config ARCH_HAS_ILOG2_U64
 config GENERIC_HWEIGHT
 	def_bool y
 
-config GENERIC_CSUM
-	def_bool y
-
 source "arch/microblaze/Kconfig.platform"
 
 menu "Processor type and features"
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index 530eaf950744..bd0c9be7e7cf 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -23,6 +23,7 @@ config MIPS
 	select GENERIC_CLOCKEVENTS
 	select GENERIC_CMOS_UPDATE
 	select GENERIC_CPU_AUTOPROBE
+	select GENERIC_CSUM if !CPU_HAS_LOAD_STORE_LR
 	select GENERIC_IOMAP
 	select GENERIC_IRQ_PROBE
 	select GENERIC_IRQ_SHOW
@@ -1146,10 +1147,6 @@ config MIPS_MACHINE
 config NO_IOPORT_MAP
 	def_bool n
 
-config GENERIC_CSUM
-	bool
-	default y if !CPU_HAS_LOAD_STORE_LR
-
 config GENERIC_ISA_DMA
 	bool
 	select ZONE_DMA if GENERIC_ISA_DMA_SUPPORT_BROKEN=n
diff --git a/arch/nds32/Kconfig b/arch/nds32/Kconfig
index 38135bf98a6f..7b3a36705aa8 100644
--- a/arch/nds32/Kconfig
+++ b/arch/nds32/Kconfig
@@ -15,6 +15,7 @@ config NDS32
 	select GENERIC_CALIBRATE_DELAY
 	select GENERIC_CPU_DEVICES
 	select GENERIC_CLOCKEVENTS
+	select GENERIC_CSUM
 	select GENERIC_IRQ_CHIP
 	select GENERIC_IRQ_SHOW
 	select GENERIC_LIB_ASHLDI3
@@ -49,9 +50,6 @@ config NDS32
 	help
 	  Andes(nds32) Linux support.
 
-config GENERIC_CSUM
-        def_bool y
-
 config GENERIC_HWEIGHT
         def_bool y
 
diff --git a/arch/nios2/Kconfig b/arch/nios2/Kconfig
index 10320e023594..11ef63217ebe 100644
--- a/arch/nios2/Kconfig
+++ b/arch/nios2/Kconfig
@@ -9,6 +9,7 @@ config NIOS2
 	select GENERIC_CALIBRATE_DELAY
 	select GENERIC_CLOCKEVENTS
 	select GENERIC_CPU_DEVICES
+	select GENERIC_CSUM
 	select GENERIC_IRQ_PROBE
 	select GENERIC_IRQ_SHOW
 	select GENERIC_STRNCPY_FROM_USER
@@ -26,9 +27,6 @@ config NIOS2
 	select CPU_NO_EFFICIENT_FFS
 	select ARCH_DISCARD_MEMBLOCK
 
-config GENERIC_CSUM
-	def_bool y
-
 config GENERIC_HWEIGHT
 	def_bool y
 
diff --git a/arch/openrisc/Kconfig b/arch/openrisc/Kconfig
index 6cb7632fa5b0..15d7df402c19 100644
--- a/arch/openrisc/Kconfig
+++ b/arch/openrisc/Kconfig
@@ -23,6 +23,7 @@ config OPENRISC
 	select GENERIC_ATOMIC64
 	select GENERIC_CLOCKEVENTS
 	select GENERIC_CLOCKEVENTS_BROADCAST
+	select GENERIC_CSUM
 	select GENERIC_STRNCPY_FROM_USER
 	select GENERIC_STRNLEN_USER
 	select GENERIC_SMP_IDLE_THREAD
@@ -51,11 +52,6 @@ config GENERIC_HWEIGHT
 config NO_IOPORT_MAP
 	def_bool y
 
-# For now, use generic checksum functions
-#These can be reimplemented in assembly later if so inclined
-config GENERIC_CSUM
-        def_bool y
-
 menu "Processor type and features"
 
 choice
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index 1684017fa496..a0e9207893c8 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -237,9 +237,6 @@ config PPC_BARRIER_NOSPEC
     default y
     depends on PPC_BOOK3S_64 || PPC_FSL_BOOK3E
 
-config GENERIC_CSUM
-	def_bool n
-
 config EARLY_PRINTK
 	bool
 	default y
diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
index c410ed896567..2b173a48bdbc 100644
--- a/arch/riscv/Kconfig
+++ b/arch/riscv/Kconfig
@@ -24,6 +24,7 @@ config RISCV
 	select GENERIC_CALIBRATE_DELAY
 	select GENERIC_CLOCKEVENTS
 	select GENERIC_CPU_DEVICES
+	select GENERIC_CSUM
 	select GENERIC_IRQ_SHOW
 	select GENERIC_PCI_IOMAP
 	select GENERIC_SCHED_CLOCK
@@ -68,9 +69,6 @@ config PAGE_OFFSET
 	default 0xffffffff80000000 if 64BIT && MAXPHYSMEM_2GB
 	default 0xffffffe000000000 if 64BIT && MAXPHYSMEM_128GB
 
-config GENERIC_CSUM
-	def_bool y
-
 config GENERIC_HWEIGHT
 	def_bool y
 
diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig
index 92d16cab61f3..3d0bd7fbe11a 100644
--- a/arch/sh/Kconfig
+++ b/arch/sh/Kconfig
@@ -85,6 +85,7 @@ config SUPERH32
 
 config SUPERH64
 	def_bool "$(ARCH)" = "sh64"
+	select GENERIC_CSUM
 	select HAVE_EXIT_THREAD
 	select KALLSYMS
 
@@ -93,10 +94,6 @@ config ARCH_DEFCONFIG
 	default "arch/sh/configs/shx3_defconfig" if SUPERH32
 	default "arch/sh/configs/cayman_defconfig" if SUPERH64
 
-config GENERIC_CSUM
-	def_bool y
-	depends on SUPERH64
-
 config GENERIC_HWEIGHT
 	def_bool y
 
diff --git a/arch/unicore32/Kconfig b/arch/unicore32/Kconfig
index 52b4d48e351a..9de1d983a99a 100644
--- a/arch/unicore32/Kconfig
+++ b/arch/unicore32/Kconfig
@@ -29,9 +29,6 @@ config UNICORE32
 	  designs licensed by PKUnity Ltd.
 	  Please see web page at <http://www.pkunity.com/>.
 
-config GENERIC_CSUM
-	def_bool y
-
 config NO_IOPORT_MAP
 	bool
 
diff --git a/lib/Kconfig b/lib/Kconfig
index a827d214d866..bd2e7e74c321 100644
--- a/lib/Kconfig
+++ b/lib/Kconfig
@@ -32,6 +32,9 @@ config HAVE_ARCH_BITREVERSE
 config RATIONAL
 	bool
 
+config GENERIC_CSUM
+	bool
+
 config GENERIC_STRNCPY_FROM_USER
 	bool
 
-- 
2.20.1


^ permalink raw reply related

* [PATCH 08/11] lib: consolidate the GENERIC_BUG symbol
From: Christoph Hellwig @ 2019-02-13 17:40 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: linux-xtensa, linux-s390, linux-kbuild, linux-kernel, linux-riscv,
	linuxppc-dev
In-Reply-To: <20190213174005.28785-1-hch@lst.de>

And just let the architectures that want it select the symbol.
Same for GENERIC_BUG_RELATIVE_POINTERS.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 arch/arm/Kconfig     |  5 +----
 arch/arm64/Kconfig   | 10 ++--------
 arch/c6x/Kconfig     |  5 +----
 arch/hexagon/Kconfig |  5 +----
 arch/parisc/Kconfig  |  6 +-----
 arch/powerpc/Kconfig |  6 +-----
 arch/riscv/Kconfig   | 10 ++--------
 arch/s390/Kconfig    |  8 ++------
 arch/sh/Kconfig      |  5 +----
 arch/x86/Kconfig     | 10 ++--------
 lib/Kconfig          |  6 ++++++
 11 files changed, 20 insertions(+), 56 deletions(-)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 96780ab64a2e..c230fb1e09ba 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -36,6 +36,7 @@ config ARM
 	select GENERIC_ALLOCATOR
 	select GENERIC_ARCH_TOPOLOGY if ARM_CPU_TOPOLOGY
 	select GENERIC_ATOMIC64 if CPU_V7M || CPU_V6 || !CPU_32v6K || !AEABI
+	select GENERIC_BUG if BUG
 	select GENERIC_CALIBRATE_DELAY
 	select GENERIC_CLOCKEVENTS_BROADCAST if SMP
 	select GENERIC_CPU_AUTOPROBE
@@ -256,10 +257,6 @@ config PHYS_OFFSET
 	  Please provide the physical address corresponding to the
 	  location of main memory in your system.
 
-config GENERIC_BUG
-	def_bool y
-	depends on BUG
-
 config PGTABLE_LEVELS
 	int
 	default 3 if ARM_LPAE
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index c39dac831f08..913b2ca7ec22 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -85,6 +85,8 @@ config ARM64
 	select FRAME_POINTER
 	select GENERIC_ALLOCATOR
 	select GENERIC_ARCH_TOPOLOGY
+	select GENERIC_BUG if BUG
+	select GENERIC_BUG_RELATIVE_POINTERS
 	select GENERIC_CALIBRATE_DELAY
 	select GENERIC_CLOCKEVENTS
 	select GENERIC_CLOCKEVENTS_BROADCAST
@@ -234,14 +236,6 @@ config ILLEGAL_POINTER_VALUE
 	hex
 	default 0xdead000000000000
 
-config GENERIC_BUG
-	def_bool y
-	depends on BUG
-
-config GENERIC_BUG_RELATIVE_POINTERS
-	def_bool y
-	depends on GENERIC_BUG
-
 config GENERIC_HWEIGHT
 	def_bool y
 
diff --git a/arch/c6x/Kconfig b/arch/c6x/Kconfig
index d5f382830f49..19b145ef7d92 100644
--- a/arch/c6x/Kconfig
+++ b/arch/c6x/Kconfig
@@ -10,6 +10,7 @@ config C6X
 	select ARCH_HAS_SYNC_DMA_FOR_DEVICE
 	select CLKDEV_LOOKUP
 	select GENERIC_ATOMIC64
+	select GENERIC_BUG if BUG
 	select GENERIC_CALIBRATE_DELAY
 	select GENERIC_IRQ_SHOW
 	select HAVE_ARCH_TRACEHOOK
@@ -30,10 +31,6 @@ config FPU
 config GENERIC_HWEIGHT
 	def_bool y
 
-config GENERIC_BUG
-	def_bool y
-	depends on BUG
-
 config C6X_BIG_KERNEL
 	bool "Build a big kernel"
 	help
diff --git a/arch/hexagon/Kconfig b/arch/hexagon/Kconfig
index 425217c98a77..5eb4f48506b6 100644
--- a/arch/hexagon/Kconfig
+++ b/arch/hexagon/Kconfig
@@ -14,6 +14,7 @@ config HEXAGON
 	# select GPIOLIB
 	# select HAVE_CLK
 	# select GENERIC_PENDING_IRQ if SMP
+	select GENERIC_BUG if BUG
 	select GENERIC_ATOMIC64
 	select HAVE_PERF_EVENTS
 	# GENERIC_ALLOCATOR is used by dma_alloc_coherent()
@@ -65,10 +66,6 @@ config GENERIC_IRQ_PROBE
 config GENERIC_HWEIGHT
 	def_bool y
 
-config GENERIC_BUG
-	def_bool y
-	depends on BUG
-
 menu "Machine selection"
 
 choice
diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig
index fcbc67b6b830..42282b8e086d 100644
--- a/arch/parisc/Kconfig
+++ b/arch/parisc/Kconfig
@@ -27,6 +27,7 @@ config PARISC
 	select HAVE_KERNEL_LZO
 	select HAVE_KERNEL_XZ
 	select GENERIC_ATOMIC64 if !64BIT
+	select GENERIC_BUG if BUG
 	select GENERIC_CALIBRATE_DELAY
 	select GENERIC_IRQ_PROBE
 	select GENERIC_PCI_IOMAP
@@ -85,11 +86,6 @@ config ARCH_HAS_ILOG2_U64
 	bool
 	default n
 
-config GENERIC_BUG
-	bool
-	default y
-	depends on BUG
-
 config GENERIC_HWEIGHT
 	bool
 	default y
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index 8b9f3639555f..1684017fa496 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -142,6 +142,7 @@ config PPC
 	select EDAC_ATOMIC_SCRUB
 	select EDAC_SUPPORT
 	select GENERIC_ATOMIC64			if PPC32
+	select GENERIC_BUG			if BUG
 	select GENERIC_CLOCKEVENTS
 	select GENERIC_CLOCKEVENTS_BROADCAST	if SMP
 	select GENERIC_CMOS_UPDATE
@@ -283,11 +284,6 @@ config AUDIT_ARCH
 	bool
 	default y
 
-config GENERIC_BUG
-	bool
-	default y
-	depends on BUG
-
 config SYS_SUPPORTS_APM_EMULATION
 	default y if PMAC_APM_EMU
 	bool
diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
index 732614eb3683..c410ed896567 100644
--- a/arch/riscv/Kconfig
+++ b/arch/riscv/Kconfig
@@ -19,6 +19,8 @@ config RISCV
 	select ARCH_WANT_FRAME_POINTERS
 	select CLONE_BACKWARDS
 	select COMMON_CLK
+	select GENERIC_BUG if BUG
+	select GENERIC_BUG_RELATIVE_POINTERS if 64BIT
 	select GENERIC_CALIBRATE_DELAY
 	select GENERIC_CLOCKEVENTS
 	select GENERIC_CPU_DEVICES
@@ -66,14 +68,6 @@ config PAGE_OFFSET
 	default 0xffffffff80000000 if 64BIT && MAXPHYSMEM_2GB
 	default 0xffffffe000000000 if 64BIT && MAXPHYSMEM_128GB
 
-config GENERIC_BUG
-	def_bool y
-	depends on BUG
-	select GENERIC_BUG_RELATIVE_POINTERS if 64BIT
-
-config GENERIC_BUG_RELATIVE_POINTERS
-	bool
-
 config GENERIC_CSUM
 	def_bool y
 
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig
index 15ccdd04814e..2a5c12be633e 100644
--- a/arch/s390/Kconfig
+++ b/arch/s390/Kconfig
@@ -17,12 +17,6 @@ config ARCH_HAS_ILOG2_U64
 config GENERIC_HWEIGHT
 	def_bool y
 
-config GENERIC_BUG
-	def_bool y if BUG
-
-config GENERIC_BUG_RELATIVE_POINTERS
-	def_bool y
-
 config GENERIC_LOCKBREAK
 	def_bool y if SMP && PREEMPT
 
@@ -103,6 +97,8 @@ config S390
 	select BUILDTIME_EXTABLE_SORT
 	select CLONE_BACKWARDS2
 	select DYNAMIC_FTRACE if FUNCTION_TRACER
+	select GENERIC_BUG if BUG
+	select GENERIC_BUG_RELATIVE_POINTERS
 	select GENERIC_CLOCKEVENTS
 	select GENERIC_CPU_AUTOPROBE
 	select GENERIC_CPU_DEVICES if !SMP
diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig
index 01d09a4637d9..92d16cab61f3 100644
--- a/arch/sh/Kconfig
+++ b/arch/sh/Kconfig
@@ -35,6 +35,7 @@ config SUPERH
 	select LOCKDEP_SUPPORT
 	select RTC_LIB
 	select GENERIC_ATOMIC64
+	select GENERIC_BUG if BUG && SUPERH32
 	select GENERIC_IRQ_SHOW
 	select GENERIC_SMP_IDLE_THREAD
 	select GENERIC_IDLE_POLL_SETUP
@@ -92,10 +93,6 @@ config ARCH_DEFCONFIG
 	default "arch/sh/configs/shx3_defconfig" if SUPERH32
 	default "arch/sh/configs/cayman_defconfig" if SUPERH64
 
-config GENERIC_BUG
-	def_bool y
-	depends on BUG && SUPERH32
-
 config GENERIC_CSUM
 	def_bool y
 	depends on SUPERH64
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 1bd4f19b6b28..f4cb31174e1b 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -91,6 +91,8 @@ config X86
 	select DCACHE_WORD_ACCESS
 	select EDAC_ATOMIC_SCRUB
 	select EDAC_SUPPORT
+	select GENERIC_BUG			if BUG
+	select GENERIC_BUG_RELATIVE_POINTERS	if X86_64
 	select GENERIC_CALIBRATE_DELAY
 	select GENERIC_CLOCKEVENTS
 	select GENERIC_CLOCKEVENTS_BROADCAST	if X86_64 || (X86_32 && X86_LOCAL_APIC)
@@ -253,14 +255,6 @@ config GENERIC_ISA_DMA
 	def_bool y
 	depends on ISA_DMA_API
 
-config GENERIC_BUG
-	def_bool y
-	depends on BUG
-	select GENERIC_BUG_RELATIVE_POINTERS if X86_64
-
-config GENERIC_BUG_RELATIVE_POINTERS
-	bool
-
 config GENERIC_HWEIGHT
 	def_bool y
 
diff --git a/lib/Kconfig b/lib/Kconfig
index a9e56539bd11..a827d214d866 100644
--- a/lib/Kconfig
+++ b/lib/Kconfig
@@ -615,6 +615,12 @@ config STRING_SELFTEST
 
 endmenu
 
+config GENERIC_BUG
+	bool
+
+config GENERIC_BUG_RELATIVE_POINTERS
+	bool
+
 config GENERIC_LIB_ASHLDI3
 	bool
 
-- 
2.20.1


^ permalink raw reply related

* [PATCH 07/11] init: consolidate the GENERIC_CALIBRATE_DELAY symbol
From: Christoph Hellwig @ 2019-02-13 17:40 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: linux-xtensa, linux-s390, linux-kbuild, linux-kernel, linux-riscv,
	linuxppc-dev
In-Reply-To: <20190213174005.28785-1-hch@lst.de>

Add one definition to init/Kconfig and let the architectures select it
if supported.  The only complication is xtensa, where it is a user
visible option - we introduce a xtensa-specific symbol instead to work
around this.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 arch/alpha/Kconfig      | 5 +----
 arch/arc/Kconfig        | 4 +---
 arch/arm/Kconfig        | 5 +----
 arch/arm64/Kconfig      | 4 +---
 arch/c6x/Kconfig        | 4 +---
 arch/csky/Kconfig       | 4 +---
 arch/ia64/Kconfig       | 5 +----
 arch/m68k/Kconfig       | 5 +----
 arch/microblaze/Kconfig | 4 +---
 arch/mips/Kconfig       | 5 +----
 arch/nds32/Kconfig      | 4 +---
 arch/nios2/Kconfig      | 4 +---
 arch/parisc/Kconfig     | 5 +----
 arch/riscv/Kconfig      | 4 +---
 arch/sh/Kconfig         | 3 ---
 arch/sparc/Kconfig      | 5 +----
 arch/um/Kconfig         | 5 +----
 arch/unicore32/Kconfig  | 4 +---
 arch/x86/Kconfig        | 4 +---
 arch/xtensa/Kconfig     | 3 ++-
 init/Kconfig            | 3 +++
 21 files changed, 23 insertions(+), 66 deletions(-)

diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig
index 474202d89b25..65b5514e5a7f 100644
--- a/arch/alpha/Kconfig
+++ b/arch/alpha/Kconfig
@@ -25,6 +25,7 @@ config ALPHA
 	select ARCH_WANT_IPC_PARSE_VERSION
 	select ARCH_HAVE_NMI_SAFE_CMPXCHG
 	select AUDIT_ARCH
+	select GENERIC_CALIBRATE_DELAY
 	select GENERIC_CLOCKEVENTS
 	select GENERIC_CPU_VULNERABILITIES
 	select GENERIC_SMP_IDLE_THREAD
@@ -58,10 +59,6 @@ config ARCH_HAS_ILOG2_U64
 	bool
 	default n
 
-config GENERIC_CALIBRATE_DELAY
-	bool
-	default y
-
 config ZONE_DMA
 	bool
 	default y
diff --git a/arch/arc/Kconfig b/arch/arc/Kconfig
index b1d6f297e448..e965383c05d7 100644
--- a/arch/arc/Kconfig
+++ b/arch/arc/Kconfig
@@ -17,6 +17,7 @@ config ARC
 	select BUILDTIME_EXTABLE_SORT
 	select CLONE_BACKWARDS
 	select COMMON_CLK
+	select GENERIC_CALIBRATE_DELAY
 	select GENERIC_ATOMIC64 if !ISA_ARCV2 || !(ARC_HAS_LL64 && ARC_HAS_LLSC)
 	select GENERIC_CLOCKEVENTS
 	select GENERIC_FIND_FIRST_BIT
@@ -73,9 +74,6 @@ config MMU
 config NO_IOPORT_MAP
 	def_bool y
 
-config GENERIC_CALIBRATE_DELAY
-	def_bool y
-
 config GENERIC_HWEIGHT
 	def_bool y
 
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index d6e7713a71ae..96780ab64a2e 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -36,6 +36,7 @@ config ARM
 	select GENERIC_ALLOCATOR
 	select GENERIC_ARCH_TOPOLOGY if ARM_CPU_TOPOLOGY
 	select GENERIC_ATOMIC64 if CPU_V7M || CPU_V6 || !CPU_32v6K || !AEABI
+	select GENERIC_CALIBRATE_DELAY
 	select GENERIC_CLOCKEVENTS_BROADCAST if SMP
 	select GENERIC_CPU_AUTOPROBE
 	select GENERIC_EARLY_IOREMAP
@@ -184,10 +185,6 @@ config GENERIC_HWEIGHT
 	bool
 	default y
 
-config GENERIC_CALIBRATE_DELAY
-	bool
-	default y
-
 config ARCH_MAY_HAVE_PC_FDC
 	bool
 
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index f3d3e48aff26..c39dac831f08 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -85,6 +85,7 @@ config ARM64
 	select FRAME_POINTER
 	select GENERIC_ALLOCATOR
 	select GENERIC_ARCH_TOPOLOGY
+	select GENERIC_CALIBRATE_DELAY
 	select GENERIC_CLOCKEVENTS
 	select GENERIC_CLOCKEVENTS_BROADCAST
 	select GENERIC_CPU_AUTOPROBE
@@ -247,9 +248,6 @@ config GENERIC_HWEIGHT
 config GENERIC_CSUM
         def_bool y
 
-config GENERIC_CALIBRATE_DELAY
-	def_bool y
-
 config ZONE_DMA32
 	def_bool y
 
diff --git a/arch/c6x/Kconfig b/arch/c6x/Kconfig
index f11465554ecf..d5f382830f49 100644
--- a/arch/c6x/Kconfig
+++ b/arch/c6x/Kconfig
@@ -10,6 +10,7 @@ config C6X
 	select ARCH_HAS_SYNC_DMA_FOR_DEVICE
 	select CLKDEV_LOOKUP
 	select GENERIC_ATOMIC64
+	select GENERIC_CALIBRATE_DELAY
 	select GENERIC_IRQ_SHOW
 	select HAVE_ARCH_TRACEHOOK
 	select SPARSE_IRQ
@@ -26,9 +27,6 @@ config MMU
 config FPU
 	def_bool n
 
-config GENERIC_CALIBRATE_DELAY
-	def_bool y
-
 config GENERIC_HWEIGHT
 	def_bool y
 
diff --git a/arch/csky/Kconfig b/arch/csky/Kconfig
index 3c3de7ac95bf..4085ba807e0c 100644
--- a/arch/csky/Kconfig
+++ b/arch/csky/Kconfig
@@ -11,6 +11,7 @@ config CSKY
 	select IRQ_DOMAIN
 	select HANDLE_DOMAIN_IRQ
 	select DW_APB_TIMER_OF
+	select GENERIC_CALIBRATE_DELAY
 	select GENERIC_LIB_ASHLDI3
 	select GENERIC_LIB_ASHRDI3
 	select GENERIC_LIB_LSHRDI3
@@ -82,9 +83,6 @@ config CPU_NO_USER_BKPT
 	  instruction exception.
 	  In kernel we parse the *regs->pc to determine whether to send SIGTRAP or not.
 
-config GENERIC_CALIBRATE_DELAY
-	def_bool y
-
 config GENERIC_CSUM
 	def_bool y
 
diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig
index 8c14b669d194..fc44c046953e 100644
--- a/arch/ia64/Kconfig
+++ b/arch/ia64/Kconfig
@@ -34,6 +34,7 @@ config IA64
 	select ARCH_HAS_SYNC_DMA_FOR_CPU if SWIOTLB
 	select VIRT_TO_BUS
 	select ARCH_DISCARD_MEMBLOCK
+	select GENERIC_CALIBRATE_DELAY
 	select GENERIC_IRQ_PROBE
 	select GENERIC_PENDING_IRQ if SMP
 	select GENERIC_IRQ_SHOW
@@ -87,10 +88,6 @@ config HUGETLB_PAGE_SIZE_VARIABLE
 	depends on HUGETLB_PAGE
 	default y
 
-config GENERIC_CALIBRATE_DELAY
-	bool
-	default y
-
 config HAVE_SETUP_PER_CPU_AREA
 	def_bool y
 
diff --git a/arch/m68k/Kconfig b/arch/m68k/Kconfig
index 6ace0b2cd5fe..ed03da5430d9 100644
--- a/arch/m68k/Kconfig
+++ b/arch/m68k/Kconfig
@@ -14,6 +14,7 @@ config M68K
 	select HAVE_UID16
 	select VIRT_TO_BUS
 	select ARCH_HAVE_NMI_SAFE_CMPXCHG if RMW_INSNS
+	select GENERIC_CALIBRATE_DELAY
 	select GENERIC_CPU_DEVICES
 	select GENERIC_IOMAP
 	select GENERIC_STRNCPY_FROM_USER if MMU
@@ -41,10 +42,6 @@ config GENERIC_HWEIGHT
 	bool
 	default y
 
-config GENERIC_CALIBRATE_DELAY
-	bool
-	default y
-
 config GENERIC_CSUM
 	bool
 
diff --git a/arch/microblaze/Kconfig b/arch/microblaze/Kconfig
index 1989ba1d1798..65a44727a7a2 100644
--- a/arch/microblaze/Kconfig
+++ b/arch/microblaze/Kconfig
@@ -13,6 +13,7 @@ config MICROBLAZE
 	select CLONE_BACKWARDS3
 	select COMMON_CLK
 	select GENERIC_ATOMIC64
+	select GENERIC_CALIBRATE_DELAY
 	select GENERIC_CLOCKEVENTS
 	select GENERIC_CPU_DEVICES
 	select GENERIC_IDLE_POLL_SETUP
@@ -72,9 +73,6 @@ config ARCH_HAS_ILOG2_U64
 config GENERIC_HWEIGHT
 	def_bool y
 
-config GENERIC_CALIBRATE_DELAY
-	def_bool y
-
 config GENERIC_CSUM
 	def_bool y
 
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index 88792685687c..530eaf950744 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -19,6 +19,7 @@ config MIPS
 	select CPU_NO_EFFICIENT_FFS if (TARGET_ISA_REV < 1)
 	select CPU_PM if CPU_IDLE
 	select GENERIC_ATOMIC64 if !64BIT
+	select GENERIC_CALIBRATE_DELAY
 	select GENERIC_CLOCKEVENTS
 	select GENERIC_CMOS_UPDATE
 	select GENERIC_CPU_AUTOPROBE
@@ -1044,10 +1045,6 @@ config GENERIC_HWEIGHT
 	bool
 	default y
 
-config GENERIC_CALIBRATE_DELAY
-	bool
-	default y
-
 config SCHED_OMIT_FRAME_POINTER
 	bool
 	default y
diff --git a/arch/nds32/Kconfig b/arch/nds32/Kconfig
index ca62d4f97acb..38135bf98a6f 100644
--- a/arch/nds32/Kconfig
+++ b/arch/nds32/Kconfig
@@ -12,6 +12,7 @@ config NDS32
 	select CLONE_BACKWARDS
 	select COMMON_CLK
 	select GENERIC_ATOMIC64
+	select GENERIC_CALIBRATE_DELAY
 	select GENERIC_CPU_DEVICES
 	select GENERIC_CLOCKEVENTS
 	select GENERIC_IRQ_CHIP
@@ -48,9 +49,6 @@ config NDS32
 	help
 	  Andes(nds32) Linux support.
 
-config GENERIC_CALIBRATE_DELAY
-	def_bool y
-
 config GENERIC_CSUM
         def_bool y
 
diff --git a/arch/nios2/Kconfig b/arch/nios2/Kconfig
index 3b50689007f5..10320e023594 100644
--- a/arch/nios2/Kconfig
+++ b/arch/nios2/Kconfig
@@ -6,6 +6,7 @@ config NIOS2
 	select ARCH_NO_SWAP
 	select TIMER_OF
 	select GENERIC_ATOMIC64
+	select GENERIC_CALIBRATE_DELAY
 	select GENERIC_CLOCKEVENTS
 	select GENERIC_CPU_DEVICES
 	select GENERIC_IRQ_PROBE
@@ -31,9 +32,6 @@ config GENERIC_CSUM
 config GENERIC_HWEIGHT
 	def_bool y
 
-config GENERIC_CALIBRATE_DELAY
-	def_bool y
-
 config NO_IOPORT_MAP
 	def_bool y
 
diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig
index 845067133dc2..fcbc67b6b830 100644
--- a/arch/parisc/Kconfig
+++ b/arch/parisc/Kconfig
@@ -27,6 +27,7 @@ config PARISC
 	select HAVE_KERNEL_LZO
 	select HAVE_KERNEL_XZ
 	select GENERIC_ATOMIC64 if !64BIT
+	select GENERIC_CALIBRATE_DELAY
 	select GENERIC_IRQ_PROBE
 	select GENERIC_PCI_IOMAP
 	select ARCH_HAVE_NMI_SAFE_CMPXCHG
@@ -93,10 +94,6 @@ config GENERIC_HWEIGHT
 	bool
 	default y
 
-config GENERIC_CALIBRATE_DELAY
-	bool
-	default y
-
 config TIME_LOW_RES
 	bool
 	depends on SMP
diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
index a6d914631d47..732614eb3683 100644
--- a/arch/riscv/Kconfig
+++ b/arch/riscv/Kconfig
@@ -19,6 +19,7 @@ config RISCV
 	select ARCH_WANT_FRAME_POINTERS
 	select CLONE_BACKWARDS
 	select COMMON_CLK
+	select GENERIC_CALIBRATE_DELAY
 	select GENERIC_CLOCKEVENTS
 	select GENERIC_CPU_DEVICES
 	select GENERIC_IRQ_SHOW
@@ -73,9 +74,6 @@ config GENERIC_BUG
 config GENERIC_BUG_RELATIVE_POINTERS
 	bool
 
-config GENERIC_CALIBRATE_DELAY
-	def_bool y
-
 config GENERIC_CSUM
 	def_bool y
 
diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig
index 932f9329cc5f..01d09a4637d9 100644
--- a/arch/sh/Kconfig
+++ b/arch/sh/Kconfig
@@ -103,9 +103,6 @@ config GENERIC_CSUM
 config GENERIC_HWEIGHT
 	def_bool y
 
-config GENERIC_CALIBRATE_DELAY
-	bool
-
 config GENERIC_LOCKBREAK
 	def_bool y
 	depends on SMP && PREEMPT
diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig
index e7ded2147230..58270c021b01 100644
--- a/arch/sparc/Kconfig
+++ b/arch/sparc/Kconfig
@@ -35,6 +35,7 @@ config SPARC
 	select HAVE_EBPF_JIT if SPARC64
 	select HAVE_DEBUG_BUGVERBOSE
 	select GENERIC_SMP_IDLE_THREAD
+	select GENERIC_CALIBRATE_DELAY
 	select GENERIC_CLOCKEVENTS
 	select GENERIC_STRNCPY_FROM_USER
 	select GENERIC_STRNLEN_USER
@@ -190,10 +191,6 @@ config GENERIC_HWEIGHT
 	bool
 	default y
 
-config GENERIC_CALIBRATE_DELAY
-	bool
-	default y
-
 config ARCH_MAY_HAVE_PC_FDC
 	bool
 	default y
diff --git a/arch/um/Kconfig b/arch/um/Kconfig
index 49c289cb95e8..431a11c9ac51 100644
--- a/arch/um/Kconfig
+++ b/arch/um/Kconfig
@@ -13,6 +13,7 @@ config UML
 	select HAVE_FUTEX_CMPXCHG if FUTEX
 	select HAVE_DEBUG_KMEMLEAK
 	select HAVE_DEBUG_BUGVERBOSE
+	select GENERIC_CALIBRATE_DELAY
 	select GENERIC_IRQ_SHOW
 	select GENERIC_CPU_DEVICES
 	select GENERIC_CLOCKEVENTS
@@ -36,10 +37,6 @@ config ISA
 config SBUS
 	bool
 
-config GENERIC_CALIBRATE_DELAY
-	bool
-	default y
-
 config HZ
 	int
 	default 100
diff --git a/arch/unicore32/Kconfig b/arch/unicore32/Kconfig
index 7dd2b9f690b1..52b4d48e351a 100644
--- a/arch/unicore32/Kconfig
+++ b/arch/unicore32/Kconfig
@@ -8,6 +8,7 @@ config UNICORE32
 	select HAVE_KERNEL_GZIP
 	select HAVE_KERNEL_BZIP2
 	select GENERIC_ATOMIC64
+	select GENERIC_CALIBRATE_DELAY
 	select HAVE_KERNEL_LZO
 	select HAVE_KERNEL_LZMA
 	select HAVE_PCI
@@ -43,9 +44,6 @@ config ARCH_HAS_ILOG2_U64
 config GENERIC_HWEIGHT
 	def_bool y
 
-config GENERIC_CALIBRATE_DELAY
-	def_bool y
-
 config ARCH_MAY_HAVE_PC_FDC
 	bool
 
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index aa72acc7f537..1bd4f19b6b28 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -91,6 +91,7 @@ config X86
 	select DCACHE_WORD_ACCESS
 	select EDAC_ATOMIC_SCRUB
 	select EDAC_SUPPORT
+	select GENERIC_CALIBRATE_DELAY
 	select GENERIC_CLOCKEVENTS
 	select GENERIC_CLOCKEVENTS_BROADCAST	if X86_64 || (X86_32 && X86_LOCAL_APIC)
 	select GENERIC_CLOCKEVENTS_MIN_ADJUST
@@ -267,9 +268,6 @@ config ARCH_MAY_HAVE_PC_FDC
 	def_bool y
 	depends on ISA_DMA_API
 
-config GENERIC_CALIBRATE_DELAY
-	def_bool y
-
 config ARCH_HAS_CPU_RELAX
 	def_bool y
 
diff --git a/arch/xtensa/Kconfig b/arch/xtensa/Kconfig
index b264a4dff465..d02c25184ca0 100644
--- a/arch/xtensa/Kconfig
+++ b/arch/xtensa/Kconfig
@@ -416,8 +416,9 @@ config XTENSA_CPU_CLOCK
 	depends on !XTENSA_CALIBRATE_CCOUNT
 	default 16
 
-config GENERIC_CALIBRATE_DELAY
+config XTENSA_GENERIC_CALIBRATE_DELAY
 	bool "Auto calibration of the BogoMIPS value"
+	select GENERIC_CALIBRATE_DELAY
 	help
 	  The BogoMIPS value can easily be derived from the CPU frequency.
 
diff --git a/init/Kconfig b/init/Kconfig
index c9386a365eea..b7d5ccd4f44c 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -36,6 +36,9 @@ config IRQ_WORK
 config BUILDTIME_EXTABLE_SORT
 	bool
 
+config GENERIC_CALIBRATE_DELAY
+	bool
+
 config THREAD_INFO_IN_TASK
 	bool
 	help
-- 
2.20.1


^ permalink raw reply related

* [PATCH 06/11] lockdep: consolidate the LOCKDEP_SUPPORT symbol
From: Christoph Hellwig @ 2019-02-13 17:40 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: linux-xtensa, linux-s390, linux-kbuild, linux-kernel, linux-riscv,
	linuxppc-dev
In-Reply-To: <20190213174005.28785-1-hch@lst.de>

Add one definition to lib/Kconfig.debug and let the architectures
select if it supported.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 arch/arc/Kconfig        | 4 +---
 arch/arm/Kconfig        | 5 +----
 arch/arm64/Kconfig      | 4 +---
 arch/hexagon/Kconfig    | 4 +---
 arch/microblaze/Kconfig | 4 +---
 arch/mips/Kconfig       | 5 +----
 arch/openrisc/Kconfig   | 4 +---
 arch/powerpc/Kconfig    | 5 +----
 arch/s390/Kconfig       | 4 +---
 arch/sh/Kconfig         | 4 +---
 arch/sparc/Kconfig      | 5 +----
 arch/um/Kconfig         | 5 +----
 arch/unicore32/Kconfig  | 4 +---
 arch/x86/Kconfig        | 4 +---
 arch/xtensa/Kconfig     | 4 +---
 lib/Kconfig.debug       | 3 +++
 16 files changed, 18 insertions(+), 50 deletions(-)

diff --git a/arch/arc/Kconfig b/arch/arc/Kconfig
index 065fbd55dcc4..b1d6f297e448 100644
--- a/arch/arc/Kconfig
+++ b/arch/arc/Kconfig
@@ -42,6 +42,7 @@ config ARC
 	select HANDLE_DOMAIN_IRQ
 	select IRQ_DOMAIN
 	select MODULES_USE_ELF_RELA
+	select LOCKDEP_SUPPORT
 	select OF
 	select OF_EARLY_FLATTREE
 	select OF_RESERVED_MEM
@@ -54,9 +55,6 @@ config ARC
 config ARCH_HAS_CACHE_LINE_SIZE
 	def_bool y
 
-config LOCKDEP_SUPPORT
-	def_bool y
-
 config SCHED_OMIT_FRAME_POINTER
 	def_bool y
 
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 1995e1b24506..d6e7713a71ae 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -98,6 +98,7 @@ config ARM
 	select HAVE_UID16
 	select HAVE_VIRT_CPU_ACCOUNTING_GEN
 	select IRQ_FORCED_THREADING
+	select LOCKDEP_SUPPORT
 	select MODULES_USE_ELF_REL
 	select NEED_DMA_MAP_STATE
 	select OF_EARLY_FLATTREE if OF
@@ -167,10 +168,6 @@ config NO_IOPORT_MAP
 config SBUS
 	bool
 
-config LOCKDEP_SUPPORT
-	bool
-	default y
-
 config ARCH_HAS_ILOG2_U32
 	bool
 
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index ecbe481ce064..f3d3e48aff26 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -157,6 +157,7 @@ config ARM64
 	select IOMMU_DMA if IOMMU_SUPPORT
 	select IRQ_DOMAIN
 	select IRQ_FORCED_THREADING
+	select LOCKDEP_SUPPORT
 	select MODULES_USE_ELF_RELA
 	select MULTI_IRQ_HANDLER
 	select NEED_DMA_MAP_STATE
@@ -232,9 +233,6 @@ config ILLEGAL_POINTER_VALUE
 	hex
 	default 0xdead000000000000
 
-config LOCKDEP_SUPPORT
-	def_bool y
-
 config GENERIC_BUG
 	def_bool y
 	depends on BUG
diff --git a/arch/hexagon/Kconfig b/arch/hexagon/Kconfig
index b6c3111ec5f9..425217c98a77 100644
--- a/arch/hexagon/Kconfig
+++ b/arch/hexagon/Kconfig
@@ -21,6 +21,7 @@ config HEXAGON
 	select GENERIC_IRQ_SHOW
 	select HAVE_ARCH_KGDB
 	select HAVE_ARCH_TRACEHOOK
+	select LOCKDEP_SUPPORT
 	select ARCH_DISCARD_MEMBLOCK
 	select NEED_SG_DMA_LENGTH
 	select NO_IOPORT_MAP
@@ -46,9 +47,6 @@ config HEXAGON_PHYS_OFFSET
 config FRAME_POINTER
 	def_bool y
 
-config LOCKDEP_SUPPORT
-	def_bool y
-
 config EARLY_PRINTK
 	def_bool y
 
diff --git a/arch/microblaze/Kconfig b/arch/microblaze/Kconfig
index 238f8b410331..1989ba1d1798 100644
--- a/arch/microblaze/Kconfig
+++ b/arch/microblaze/Kconfig
@@ -31,6 +31,7 @@ config MICROBLAZE
 	select HAVE_OPROFILE
 	select HAVE_PCI
 	select IRQ_DOMAIN
+	select LOCKDEP_SUPPORT
 	select XILINX_INTC
 	select MODULES_USE_ELF_RELA
 	select OF
@@ -77,9 +78,6 @@ config GENERIC_CALIBRATE_DELAY
 config GENERIC_CSUM
 	def_bool y
 
-config LOCKDEP_SUPPORT
-	def_bool y
-
 source "arch/microblaze/Kconfig.platform"
 
 menu "Processor type and features"
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index d1c89635a459..88792685687c 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -76,6 +76,7 @@ config MIPS
 	select HAVE_VIRT_CPU_ACCOUNTING_GEN if 64BIT || !SMP
 	select IRQ_FORCED_THREADING
 	select ISA if EISA
+	select LOCKDEP_SUPPORT
 	select MODULES_USE_ELF_RELA if MODULES && 64BIT
 	select MODULES_USE_ELF_REL if MODULES
 	select PERF_USE_VMALLOC
@@ -3051,10 +3052,6 @@ endchoice
 
 endmenu
 
-config LOCKDEP_SUPPORT
-	bool
-	default y
-
 config HAVE_LATENCYTOP_SUPPORT
 	bool
 	default y
diff --git a/arch/openrisc/Kconfig b/arch/openrisc/Kconfig
index 514787c0c469..6cb7632fa5b0 100644
--- a/arch/openrisc/Kconfig
+++ b/arch/openrisc/Kconfig
@@ -28,6 +28,7 @@ config OPENRISC
 	select GENERIC_SMP_IDLE_THREAD
 	select MODULES_USE_ELF_RELA
 	select HAVE_DEBUG_STACKOVERFLOW
+	select LOCKDEP_SUPPORT
 	select OR1K_PIC
 	select CPU_NO_EFFICIENT_FFS if !OPENRISC_HAVE_INST_FF1
 	select ARCH_USE_QUEUED_SPINLOCKS
@@ -55,9 +56,6 @@ config NO_IOPORT_MAP
 config GENERIC_CSUM
         def_bool y
 
-config LOCKDEP_SUPPORT
-	def_bool  y
-
 menu "Processor type and features"
 
 choice
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index 1156021fd4a8..8b9f3639555f 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -91,10 +91,6 @@ config PPC_WATCHDOG
 	  seleted via the generic lockup detector menu which is why we
 	  have no standalone config option for it here.
 
-config LOCKDEP_SUPPORT
-	bool
-	default y
-
 config GENERIC_LOCKBREAK
 	bool
 	default y
@@ -213,6 +209,7 @@ config PPC
 	select IOMMU_HELPER			if PPC64
 	select IRQ_DOMAIN
 	select IRQ_FORCED_THREADING
+	select LOCKDEP_SUPPORT
 	select MODULES_USE_ELF_RELA
 	select NEED_DMA_MAP_STATE		if PPC64 || NOT_COHERENT_CACHE
 	select NEED_SG_DMA_LENGTH
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig
index 662acc163019..15ccdd04814e 100644
--- a/arch/s390/Kconfig
+++ b/arch/s390/Kconfig
@@ -8,9 +8,6 @@ config ZONE_DMA
 config CPU_BIG_ENDIAN
 	def_bool y
 
-config LOCKDEP_SUPPORT
-	def_bool y
-
 config ARCH_HAS_ILOG2_U32
 	def_bool n
 
@@ -165,6 +162,7 @@ config S390
 	select HAVE_VIRT_CPU_ACCOUNTING
 	select IOMMU_HELPER		if PCI
 	select IOMMU_SUPPORT		if PCI
+	select LOCKDEP_SUPPORT
 	select MODULES_USE_ELF_RELA
 	select NEED_DMA_MAP_STATE	if PCI
 	select NEED_SG_DMA_LENGTH	if PCI
diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig
index 840c33df6f0e..932f9329cc5f 100644
--- a/arch/sh/Kconfig
+++ b/arch/sh/Kconfig
@@ -32,6 +32,7 @@ config SUPERH
 	select HAVE_REGS_AND_STACK_ACCESS_API
 	select MAY_HAVE_SPARSE_IRQ
 	select IRQ_FORCED_THREADING
+	select LOCKDEP_SUPPORT
 	select RTC_LIB
 	select GENERIC_ATOMIC64
 	select GENERIC_IRQ_SHOW
@@ -128,9 +129,6 @@ config SYS_SUPPORTS_SMP
 config SYS_SUPPORTS_NUMA
 	bool
 
-config LOCKDEP_SUPPORT
-	def_bool y
-
 config ARCH_HAS_ILOG2_U32
 	def_bool n
 
diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig
index 4f8c3f9dd2c6..e7ded2147230 100644
--- a/arch/sparc/Kconfig
+++ b/arch/sparc/Kconfig
@@ -85,6 +85,7 @@ config SPARC64
 	select ARCH_SUPPORTS_ATOMIC_RMW
 	select HAVE_NMI
 	select HAVE_REGS_AND_STACK_ACCESS_API
+	select LOCKDEP_SUPPORT
 	select ARCH_USE_QUEUED_RWLOCKS
 	select ARCH_USE_QUEUED_SPINLOCKS
 	select GENERIC_TIME_VSYSCALL
@@ -109,10 +110,6 @@ config ARCH_ATU
 	bool
 	default y if SPARC64
 
-config LOCKDEP_SUPPORT
-	bool
-	default y if SPARC64
-
 config ARCH_HIBERNATION_POSSIBLE
 	def_bool y if SPARC64
 
diff --git a/arch/um/Kconfig b/arch/um/Kconfig
index f1b7bf7cc66e..49c289cb95e8 100644
--- a/arch/um/Kconfig
+++ b/arch/um/Kconfig
@@ -17,6 +17,7 @@ config UML
 	select GENERIC_CPU_DEVICES
 	select GENERIC_CLOCKEVENTS
 	select HAVE_GCC_PLUGINS
+	select LOCKDEP_SUPPORT
 	select STACKTRACE
 	select STACKTRACE_SUPPORT
 	select TRACE_IRQFLAGS_SUPPORT
@@ -35,10 +36,6 @@ config ISA
 config SBUS
 	bool
 
-config LOCKDEP_SUPPORT
-	bool
-	default y
-
 config GENERIC_CALIBRATE_DELAY
 	bool
 	default y
diff --git a/arch/unicore32/Kconfig b/arch/unicore32/Kconfig
index d7dccc247301..7dd2b9f690b1 100644
--- a/arch/unicore32/Kconfig
+++ b/arch/unicore32/Kconfig
@@ -11,6 +11,7 @@ config UNICORE32
 	select HAVE_KERNEL_LZO
 	select HAVE_KERNEL_LZMA
 	select HAVE_PCI
+	select LOCKDEP_SUPPORT
 	select VIRT_TO_BUS
 	select ARCH_HAVE_CUSTOM_GPIO_H
 	select GENERIC_FIND_FIRST_BIT
@@ -33,9 +34,6 @@ config GENERIC_CSUM
 config NO_IOPORT_MAP
 	bool
 
-config LOCKDEP_SUPPORT
-	def_bool y
-
 config ARCH_HAS_ILOG2_U32
 	bool
 
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index a53d7a4ffd09..aa72acc7f537 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -196,6 +196,7 @@ config X86
 	select HAVE_USER_RETURN_NOTIFIER
 	select HOTPLUG_SMT			if SMP
 	select IRQ_FORCED_THREADING
+	select LOCKDEP_SUPPORT
 	select NEED_SG_DMA_LENGTH
 	select PCI_DOMAINS			if PCI
 	select PCI_LOCKLESS_CONFIG		if PCI
@@ -227,9 +228,6 @@ config ARCH_DEFCONFIG
 	default "arch/x86/configs/i386_defconfig" if X86_32
 	default "arch/x86/configs/x86_64_defconfig" if X86_64
 
-config LOCKDEP_SUPPORT
-	def_bool y
-
 config MMU
 	def_bool y
 
diff --git a/arch/xtensa/Kconfig b/arch/xtensa/Kconfig
index 2c4bb92df487..b264a4dff465 100644
--- a/arch/xtensa/Kconfig
+++ b/arch/xtensa/Kconfig
@@ -32,6 +32,7 @@ config XTENSA
 	select HAVE_STACKPROTECTOR
 	select HAVE_SYSCALL_TRACEPOINTS
 	select IRQ_DOMAIN
+	select LOCKDEP_SUPPORT
 	select MODULES_USE_ELF_RELA
 	select PERF_USE_VMALLOC
 	select RWSEM_XCHGADD_ALGORITHM
@@ -62,9 +63,6 @@ config HZ
 	int
 	default 100
 
-config LOCKDEP_SUPPORT
-	def_bool y
-
 config MMU
 	def_bool n
 
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index d4df5b24d75e..9331914f9598 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -1054,6 +1054,9 @@ config DEBUG_PREEMPT
 
 menu "Lock Debugging (spinlocks, mutexes, etc...)"
 
+config LOCKDEP_SUPPORT
+	bool
+
 config LOCK_DEBUGGING_SUPPORT
 	bool
 	depends on TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT
-- 
2.20.1


^ permalink raw reply related

* [PATCH 05/11] tracing: consolidate the TRACE_IRQFLAGS_SUPPORT symbol
From: Christoph Hellwig @ 2019-02-13 17:39 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: linux-xtensa, linux-s390, linux-kbuild, linux-kernel, linux-riscv,
	linuxppc-dev
In-Reply-To: <20190213174005.28785-1-hch@lst.de>

Add one definition to kernel/trace/Kconfig and let the architectures
select if it supported.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 arch/arc/Kconfig              | 4 +---
 arch/arm/Kconfig              | 5 +----
 arch/arm64/Kconfig            | 4 +---
 arch/csky/Kconfig             | 4 +---
 arch/hexagon/Kconfig          | 4 +---
 arch/microblaze/Kconfig       | 1 +
 arch/microblaze/Kconfig.debug | 2 --
 arch/mips/Kconfig             | 1 +
 arch/mips/Kconfig.debug       | 4 ----
 arch/nds32/Kconfig            | 4 +---
 arch/nios2/Kconfig            | 4 +---
 arch/nios2/Kconfig.debug      | 3 ---
 arch/openrisc/Kconfig         | 4 +---
 arch/parisc/Kconfig           | 1 +
 arch/parisc/Kconfig.debug     | 2 --
 arch/powerpc/Kconfig          | 5 +----
 arch/riscv/Kconfig            | 4 +---
 arch/s390/Kconfig             | 1 +
 arch/s390/Kconfig.debug       | 3 ---
 arch/sh/Kconfig               | 1 +
 arch/sh/Kconfig.debug         | 3 ---
 arch/sparc/Kconfig            | 1 +
 arch/sparc/Kconfig.debug      | 4 ----
 arch/um/Kconfig               | 5 +----
 arch/x86/Kconfig              | 1 +
 arch/x86/Kconfig.debug        | 3 ---
 arch/xtensa/Kconfig           | 4 +---
 kernel/trace/Kconfig          | 3 +++
 28 files changed, 22 insertions(+), 63 deletions(-)

diff --git a/arch/arc/Kconfig b/arch/arc/Kconfig
index e8e3776fc5fa..065fbd55dcc4 100644
--- a/arch/arc/Kconfig
+++ b/arch/arc/Kconfig
@@ -49,13 +49,11 @@ config ARC
 	select PERF_USE_VMALLOC if ARC_CACHE_VIPT_ALIASING
 	select STACKTRACE_SUPPORT
 	select STACKTRACE
+	select TRACE_IRQFLAGS_SUPPORT
 
 config ARCH_HAS_CACHE_LINE_SIZE
 	def_bool y
 
-config TRACE_IRQFLAGS_SUPPORT
-	def_bool y
-
 config LOCKDEP_SUPPORT
 	def_bool y
 
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 68a891f3ffa0..1995e1b24506 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -111,6 +111,7 @@ config ARM
 	select RWSEM_XCHGADD_ALGORITHM
 	select STACKTRACE_SUPPORT
 	select SYS_SUPPORTS_APM_EMULATION
+	select TRACE_IRQFLAGS_SUPPORT if !CPU_V7M
 	# Above selects are sorted alphabetically; please add new ones
 	# according to that.  Thanks.
 	help
@@ -170,10 +171,6 @@ config LOCKDEP_SUPPORT
 	bool
 	default y
 
-config TRACE_IRQFLAGS_SUPPORT
-	bool
-	default !CPU_V7M
-
 config ARCH_HAS_ILOG2_U32
 	bool
 
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index a6a0bb868369..ecbe481ce064 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -176,6 +176,7 @@ config ARM64
 	select SWIOTLB
 	select SYSCTL_EXCEPTION_TRACE
 	select THREAD_INFO_IN_TASK
+	select TRACE_IRQFLAGS_SUPPORT
 	help
 	  ARM 64-bit (AArch64) Linux support.
 
@@ -234,9 +235,6 @@ config ILLEGAL_POINTER_VALUE
 config LOCKDEP_SUPPORT
 	def_bool y
 
-config TRACE_IRQFLAGS_SUPPORT
-	def_bool y
-
 config GENERIC_BUG
 	def_bool y
 	depends on BUG
diff --git a/arch/csky/Kconfig b/arch/csky/Kconfig
index 90279a11fcf7..3c3de7ac95bf 100644
--- a/arch/csky/Kconfig
+++ b/arch/csky/Kconfig
@@ -46,6 +46,7 @@ config CSKY
 	select PERF_USE_VMALLOC if CPU_CK610
 	select RTC_LIB
 	select TIMER_OF
+	select TRACE_IRQFLAGS_SUPPORT
 	select USB_ARCH_HAS_EHCI
 	select USB_ARCH_HAS_OHCI
 
@@ -99,9 +100,6 @@ config STACKTRACE_SUPPORT
 config TIME_LOW_RES
 	def_bool y
 
-config TRACE_IRQFLAGS_SUPPORT
-	def_bool y
-
 config CPU_TLB_SIZE
 	int
 	default "128"	if (CPU_CK610 || CPU_CK807 || CPU_CK810)
diff --git a/arch/hexagon/Kconfig b/arch/hexagon/Kconfig
index 615693b62ea0..b6c3111ec5f9 100644
--- a/arch/hexagon/Kconfig
+++ b/arch/hexagon/Kconfig
@@ -33,6 +33,7 @@ config HEXAGON
 	select MODULES_USE_ELF_RELA
 	select GENERIC_CPU_DEVICES
 	select RWSEM_XCHGADD_ALGORITHM
+	select TRACE_IRQFLAGS_SUPPORT
 	---help---
 	  Qualcomm Hexagon is a processor architecture designed for high
 	  performance and low power across a wide variety of applications.
@@ -54,9 +55,6 @@ config EARLY_PRINTK
 config MMU
 	def_bool y
 
-config TRACE_IRQFLAGS_SUPPORT
-	def_bool y
-
 config GENERIC_CSUM
 	def_bool y
 
diff --git a/arch/microblaze/Kconfig b/arch/microblaze/Kconfig
index ecccf8651caa..238f8b410331 100644
--- a/arch/microblaze/Kconfig
+++ b/arch/microblaze/Kconfig
@@ -38,6 +38,7 @@ config MICROBLAZE
 	select PCI_DOMAINS_GENERIC if PCI
 	select PCI_SYSCALL if PCI
 	select STACKTRACE_SUPPORT
+	select TRACE_IRQFLAGS_SUPPORT
 	select TRACING_SUPPORT
 	select VIRT_TO_BUS
 	select CPU_NO_EFFICIENT_FFS
diff --git a/arch/microblaze/Kconfig.debug b/arch/microblaze/Kconfig.debug
index dc2e3c45e8a2..617df4f48a5d 100644
--- a/arch/microblaze/Kconfig.debug
+++ b/arch/microblaze/Kconfig.debug
@@ -1,5 +1,3 @@
 # For a description of the syntax of this configuration file,
 # see Documentation/kbuild/kconfig-language.txt.
 
-config TRACE_IRQFLAGS_SUPPORT
-	def_bool y
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index 0645e7b96493..d1c89635a459 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -82,6 +82,7 @@ config MIPS
 	select RTC_LIB
 	select STACKTRACE_SUPPORT
 	select SYSCTL_EXCEPTION_TRACE
+	select TRACE_IRQFLAGS_SUPPORT
 	select VIRT_TO_BUS
 
 menu "Machine selection"
diff --git a/arch/mips/Kconfig.debug b/arch/mips/Kconfig.debug
index 0c86b2a2adfc..7727b30a42df 100644
--- a/arch/mips/Kconfig.debug
+++ b/arch/mips/Kconfig.debug
@@ -1,9 +1,5 @@
 # SPDX-License-Identifier: GPL-2.0
 
-config TRACE_IRQFLAGS_SUPPORT
-	bool
-	default y
-
 config EARLY_PRINTK
 	bool "Early printk" if EXPERT
 	depends on SYS_HAS_EARLY_PRINTK
diff --git a/arch/nds32/Kconfig b/arch/nds32/Kconfig
index 65a506fe25a9..ca62d4f97acb 100644
--- a/arch/nds32/Kconfig
+++ b/arch/nds32/Kconfig
@@ -40,6 +40,7 @@ config NDS32
 	select RTC_LIB
 	select STACKTRACE_SUPPORT
 	select THREAD_INFO_IN_TASK
+	select TRACE_IRQFLAGS_SUPPORT
 	select HAVE_FUNCTION_TRACER
 	select HAVE_FUNCTION_GRAPH_TRACER
 	select HAVE_FTRACE_MCOUNT_RECORD
@@ -60,9 +61,6 @@ config GENERIC_LOCKBREAK
         def_bool y
 	depends on PREEMPT
 
-config TRACE_IRQFLAGS_SUPPORT
-	def_bool y
-
 config FIX_EARLYCON_MEM
 	def_bool y
 
diff --git a/arch/nios2/Kconfig b/arch/nios2/Kconfig
index 715e6c09b4a5..3b50689007f5 100644
--- a/arch/nios2/Kconfig
+++ b/arch/nios2/Kconfig
@@ -20,6 +20,7 @@ config NIOS2
 	select OF_EARLY_FLATTREE
 	select SOC_BUS
 	select SPARSE_IRQ
+	select TRACE_IRQFLAGS_SUPPORT
 	select USB_ARCH_HAS_HCD if USB_SUPPORT
 	select CPU_NO_EFFICIENT_FFS
 	select ARCH_DISCARD_MEMBLOCK
@@ -39,9 +40,6 @@ config NO_IOPORT_MAP
 config FPU
 	def_bool n
 
-config TRACE_IRQFLAGS_SUPPORT
-	def_bool n
-
 menu "Kernel features"
 
 source "kernel/Kconfig.hz"
diff --git a/arch/nios2/Kconfig.debug b/arch/nios2/Kconfig.debug
index f1da8a7b17ff..a8bc06e96ef5 100644
--- a/arch/nios2/Kconfig.debug
+++ b/arch/nios2/Kconfig.debug
@@ -1,8 +1,5 @@
 # SPDX-License-Identifier: GPL-2.0
 
-config TRACE_IRQFLAGS_SUPPORT
-	def_bool y
-
 config EARLY_PRINTK
 	bool "Activate early kernel debugging"
 	default y
diff --git a/arch/openrisc/Kconfig b/arch/openrisc/Kconfig
index addbe1d0dee6..514787c0c469 100644
--- a/arch/openrisc/Kconfig
+++ b/arch/openrisc/Kconfig
@@ -36,6 +36,7 @@ config OPENRISC
 	select ARCH_WANT_FRAME_POINTERS
 	select GENERIC_IRQ_MULTI_HANDLER
 	select STACKTRACE_SUPPORT
+	select TRACE_IRQFLAGS_SUPPORT
 
 config CPU_BIG_ENDIAN
 	def_bool y
@@ -49,9 +50,6 @@ config GENERIC_HWEIGHT
 config NO_IOPORT_MAP
 	def_bool y
 
-config TRACE_IRQFLAGS_SUPPORT
-        def_bool y
-
 # For now, use generic checksum functions
 #These can be reimplemented in assembly later if so inclined
 config GENERIC_CSUM
diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig
index 9288ff6af559..845067133dc2 100644
--- a/arch/parisc/Kconfig
+++ b/arch/parisc/Kconfig
@@ -54,6 +54,7 @@ config PARISC
 	select NEED_DMA_MAP_STATE
 	select NEED_SG_DMA_LENGTH
 	select STACKTRACE_SUPPORT
+	select TRACE_IRQFLAGS_SUPPORT
 
 	help
 	  The PA-RISC microprocessor is designed by Hewlett-Packard and used
diff --git a/arch/parisc/Kconfig.debug b/arch/parisc/Kconfig.debug
index 1478ded0e247..d1558d84eeae 100644
--- a/arch/parisc/Kconfig.debug
+++ b/arch/parisc/Kconfig.debug
@@ -1,4 +1,2 @@
 # SPDX-License-Identifier: GPL-2.0
 
-config TRACE_IRQFLAGS_SUPPORT
-	def_bool y
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index 45d0d69237b1..1156021fd4a8 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -91,10 +91,6 @@ config PPC_WATCHDOG
 	  seleted via the generic lockup detector menu which is why we
 	  have no standalone config option for it here.
 
-config TRACE_IRQFLAGS_SUPPORT
-	bool
-	default y
-
 config LOCKDEP_SUPPORT
 	bool
 	default y
@@ -232,6 +228,7 @@ config PPC
 	select SPARSE_IRQ
 	select STACKTRACE_SUPPORT
 	select SYSCTL_EXCEPTION_TRACE
+	select TRACE_IRQFLAGS_SUPPORT
 	select VIRT_TO_BUS			if !PPC64
 	#
 	# Please keep this list sorted alphabetically.
diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
index f0e87594fc9b..a6d914631d47 100644
--- a/arch/riscv/Kconfig
+++ b/arch/riscv/Kconfig
@@ -48,6 +48,7 @@ config RISCV
 	select PCI_MSI if PCI
 	select RISCV_TIMER
 	select STACKTRACE_SUPPORT
+	select TRACE_IRQFLAGS_SUPPORT
 	select GENERIC_IRQ_MULTI_HANDLER
 	select ARCH_HAS_PTE_SPECIAL
 
@@ -64,9 +65,6 @@ config PAGE_OFFSET
 	default 0xffffffff80000000 if 64BIT && MAXPHYSMEM_2GB
 	default 0xffffffe000000000 if 64BIT && MAXPHYSMEM_128GB
 
-config TRACE_IRQFLAGS_SUPPORT
-	def_bool y
-
 config GENERIC_BUG
 	def_bool y
 	depends on BUG
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig
index fde5d60aab7e..662acc163019 100644
--- a/arch/s390/Kconfig
+++ b/arch/s390/Kconfig
@@ -177,6 +177,7 @@ config S390
 	select STACKTRACE_SUPPORT
 	select SYSCTL_EXCEPTION_TRACE
 	select THREAD_INFO_IN_TASK
+	select TRACE_IRQFLAGS_SUPPORT
 	select TTY
 	select VIRT_CPU_ACCOUNTING
 	select ARCH_HAS_SCALED_CPUTIME
diff --git a/arch/s390/Kconfig.debug b/arch/s390/Kconfig.debug
index 190527560b2c..1cae0977b3eb 100644
--- a/arch/s390/Kconfig.debug
+++ b/arch/s390/Kconfig.debug
@@ -1,8 +1,5 @@
 # SPDX-License-Identifier: GPL-2.0
 
-config TRACE_IRQFLAGS_SUPPORT
-	def_bool y
-
 config S390_PTDUMP
 	bool "Export kernel pagetable layout to userspace via debugfs"
 	depends on DEBUG_KERNEL
diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig
index e77d3befa52a..840c33df6f0e 100644
--- a/arch/sh/Kconfig
+++ b/arch/sh/Kconfig
@@ -50,6 +50,7 @@ config SUPERH
 	select OLD_SIGACTION
 	select PCI_DOMAINS if PCI
 	select STACKTRACE_SUPPORT
+	select TRACE_IRQFLAGS_SUPPORT
 	select HAVE_ARCH_AUDITSYSCALL
 	select HAVE_FUTEX_CMPXCHG if FUTEX
 	select HAVE_NMI
diff --git a/arch/sh/Kconfig.debug b/arch/sh/Kconfig.debug
index 010b6c33bbba..4eabecb62329 100644
--- a/arch/sh/Kconfig.debug
+++ b/arch/sh/Kconfig.debug
@@ -1,8 +1,5 @@
 # SPDX-License-Identifier: GPL-2.0
 
-config TRACE_IRQFLAGS_SUPPORT
-	def_bool y
-
 config SH_STANDARD_BIOS
 	bool "Use LinuxSH standard BIOS"
 	depends on SUPERH32
diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig
index 85c4447fce00..4f8c3f9dd2c6 100644
--- a/arch/sparc/Kconfig
+++ b/arch/sparc/Kconfig
@@ -46,6 +46,7 @@ config SPARC
 	select LOCKDEP_SMALL if LOCKDEP
 	select NEED_DMA_MAP_STATE
 	select NEED_SG_DMA_LENGTH
+	select TRACE_IRQFLAGS_SUPPORT
 
 config SPARC32
 	def_bool !64BIT
diff --git a/arch/sparc/Kconfig.debug b/arch/sparc/Kconfig.debug
index 50a918d496c8..6b2bec1888b3 100644
--- a/arch/sparc/Kconfig.debug
+++ b/arch/sparc/Kconfig.debug
@@ -1,9 +1,5 @@
 # SPDX-License-Identifier: GPL-2.0
 
-config TRACE_IRQFLAGS_SUPPORT
-	bool
-	default y
-
 config DEBUG_DCFLUSH
 	bool "D-cache flush debugging"
 	depends on SPARC64 && DEBUG_KERNEL
diff --git a/arch/um/Kconfig b/arch/um/Kconfig
index a88ad4c0c3b4..f1b7bf7cc66e 100644
--- a/arch/um/Kconfig
+++ b/arch/um/Kconfig
@@ -19,6 +19,7 @@ config UML
 	select HAVE_GCC_PLUGINS
 	select STACKTRACE
 	select STACKTRACE_SUPPORT
+	select TRACE_IRQFLAGS_SUPPORT
 	select TTY # Needed for line.c
 
 config MMU
@@ -34,10 +35,6 @@ config ISA
 config SBUS
 	bool
 
-config TRACE_IRQFLAGS_SUPPORT
-	bool
-	default y
-
 config LOCKDEP_SUPPORT
 	bool
 	default y
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index c5f92cfd5d85..a53d7a4ffd09 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -210,6 +210,7 @@ config X86
 	select THREAD_INFO_IN_TASK
 	select USER_STACKTRACE_SUPPORT
 	select VIRT_TO_BUS
+	select TRACE_IRQFLAGS_SUPPORT
 	select X86_FEATURE_NAMES		if PROC_FS
 
 config INSTRUCTION_DECODER
diff --git a/arch/x86/Kconfig.debug b/arch/x86/Kconfig.debug
index 0723dff17e6c..bca2566ef208 100644
--- a/arch/x86/Kconfig.debug
+++ b/arch/x86/Kconfig.debug
@@ -1,8 +1,5 @@
 # SPDX-License-Identifier: GPL-2.0
 
-config TRACE_IRQFLAGS_SUPPORT
-	def_bool y
-
 config EARLY_PRINTK_USB
 	bool
 
diff --git a/arch/xtensa/Kconfig b/arch/xtensa/Kconfig
index 51cdd270a44d..2c4bb92df487 100644
--- a/arch/xtensa/Kconfig
+++ b/arch/xtensa/Kconfig
@@ -36,6 +36,7 @@ config XTENSA
 	select PERF_USE_VMALLOC
 	select RWSEM_XCHGADD_ALGORITHM
 	select STACKTRACE_SUPPORT
+	select TRACE_IRQFLAGS_SUPPORT
 	select VIRT_TO_BUS
 	help
 	  Xtensa processors are 32-bit RISC machines designed by Tensilica
@@ -64,9 +65,6 @@ config HZ
 config LOCKDEP_SUPPORT
 	def_bool y
 
-config TRACE_IRQFLAGS_SUPPORT
-	def_bool y
-
 config MMU
 	def_bool n
 
diff --git a/kernel/trace/Kconfig b/kernel/trace/Kconfig
index 80291d016e21..a349e02e587b 100644
--- a/kernel/trace/Kconfig
+++ b/kernel/trace/Kconfig
@@ -9,6 +9,9 @@ config STACKTRACE_SUPPORT
 config USER_STACKTRACE_SUPPORT
 	bool
 
+config TRACE_IRQFLAGS_SUPPORT
+	bool
+
 config NOP_TRACER
 	bool
 
-- 
2.20.1


^ permalink raw reply related

* [PATCH 04/11] tracing: consolidate the STACKTRACE_SUPPORT symbol
From: Christoph Hellwig @ 2019-02-13 17:39 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: linux-xtensa, linux-s390, linux-kbuild, linux-kernel, linux-riscv,
	linuxppc-dev
In-Reply-To: <20190213174005.28785-1-hch@lst.de>

Add one definition to kernel/trace/Kconfig and let the architectures
select if it supported.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 arch/arc/Kconfig        | 6 ++----
 arch/arm/Kconfig        | 5 +----
 arch/arm64/Kconfig      | 4 +---
 arch/hexagon/Kconfig    | 5 +----
 arch/ia64/Kconfig       | 4 +---
 arch/microblaze/Kconfig | 4 +---
 arch/mips/Kconfig       | 5 +----
 arch/nds32/Kconfig      | 4 +---
 arch/openrisc/Kconfig   | 4 +---
 arch/parisc/Kconfig     | 4 +---
 arch/powerpc/Kconfig    | 5 +----
 arch/riscv/Kconfig      | 4 +---
 arch/s390/Kconfig       | 4 +---
 arch/sh/Kconfig         | 4 +---
 arch/sparc/Kconfig      | 5 +----
 arch/um/Kconfig         | 7 ++-----
 arch/unicore32/Kconfig  | 4 +---
 arch/x86/Kconfig        | 4 +---
 arch/xtensa/Kconfig     | 4 +---
 kernel/trace/Kconfig    | 3 +++
 20 files changed, 24 insertions(+), 65 deletions(-)

diff --git a/arch/arc/Kconfig b/arch/arc/Kconfig
index c0dd229af534..e8e3776fc5fa 100644
--- a/arch/arc/Kconfig
+++ b/arch/arc/Kconfig
@@ -47,6 +47,8 @@ config ARC
 	select OF_RESERVED_MEM
 	select PCI_SYSCALL if PCI
 	select PERF_USE_VMALLOC if ARC_CACHE_VIPT_ALIASING
+	select STACKTRACE_SUPPORT
+	select STACKTRACE
 
 config ARCH_HAS_CACHE_LINE_SIZE
 	def_bool y
@@ -81,10 +83,6 @@ config GENERIC_CALIBRATE_DELAY
 config GENERIC_HWEIGHT
 	def_bool y
 
-config STACKTRACE_SUPPORT
-	def_bool y
-	select STACKTRACE
-
 config HAVE_ARCH_TRANSPARENT_HUGEPAGE
 	def_bool y
 	depends on ARC_MMU_V4
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 1ed4c0560b50..68a891f3ffa0 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -109,6 +109,7 @@ config ARM
 	select REFCOUNT_FULL
 	select RTC_LIB
 	select RWSEM_XCHGADD_ALGORITHM
+	select STACKTRACE_SUPPORT
 	select SYS_SUPPORTS_APM_EMULATION
 	# Above selects are sorted alphabetically; please add new ones
 	# according to that.  Thanks.
@@ -165,10 +166,6 @@ config NO_IOPORT_MAP
 config SBUS
 	bool
 
-config STACKTRACE_SUPPORT
-	bool
-	default y
-
 config LOCKDEP_SUPPORT
 	bool
 	default y
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index 2f8da4e18a1e..a6a0bb868369 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -172,6 +172,7 @@ config ARM64
 	select REFCOUNT_FULL
 	select RWSEM_XCHGADD_ALGORITHM
 	select SPARSE_IRQ
+	select STACKTRACE_SUPPORT
 	select SWIOTLB
 	select SYSCTL_EXCEPTION_TRACE
 	select THREAD_INFO_IN_TASK
@@ -226,9 +227,6 @@ config ARCH_MMAP_RND_COMPAT_BITS_MAX
 config NO_IOPORT_MAP
 	def_bool y if !PCI
 
-config STACKTRACE_SUPPORT
-	def_bool y
-
 config ILLEGAL_POINTER_VALUE
 	hex
 	default 0xdead000000000000
diff --git a/arch/hexagon/Kconfig b/arch/hexagon/Kconfig
index 49f364ea18d4..615693b62ea0 100644
--- a/arch/hexagon/Kconfig
+++ b/arch/hexagon/Kconfig
@@ -26,6 +26,7 @@ config HEXAGON
 	select NO_IOPORT_MAP
 	select GENERIC_IOMAP
 	select GENERIC_SMP_IDLE_THREAD
+	select STACKTRACE
 	select STACKTRACE_SUPPORT
 	select GENERIC_CLOCKEVENTS
 	select GENERIC_CLOCKEVENTS_BROADCAST
@@ -68,10 +69,6 @@ config GENERIC_IRQ_PROBE
 config GENERIC_HWEIGHT
 	def_bool y
 
-config STACKTRACE_SUPPORT
-	def_bool y
-	select STACKTRACE
-
 config GENERIC_BUG
 	def_bool y
 	depends on BUG
diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig
index 99a629f05de4..8c14b669d194 100644
--- a/arch/ia64/Kconfig
+++ b/arch/ia64/Kconfig
@@ -54,6 +54,7 @@ config IA64
 	select NEED_DMA_MAP_STATE
 	select NEED_SG_DMA_LENGTH
 	select RWSEM_XCHGADD_ALGORITHM
+	select STACKTRACE_SUPPORT
 	default y
 	help
 	  The Itanium Processor Family is Intel's 64-bit successor to
@@ -78,9 +79,6 @@ config MMU
 	bool
 	default y
 
-config STACKTRACE_SUPPORT
-	def_bool y
-
 config GENERIC_LOCKBREAK
 	def_bool n
 
diff --git a/arch/microblaze/Kconfig b/arch/microblaze/Kconfig
index d459c70d9a66..ecccf8651caa 100644
--- a/arch/microblaze/Kconfig
+++ b/arch/microblaze/Kconfig
@@ -37,6 +37,7 @@ config MICROBLAZE
 	select OF_EARLY_FLATTREE
 	select PCI_DOMAINS_GENERIC if PCI
 	select PCI_SYSCALL if PCI
+	select STACKTRACE_SUPPORT
 	select TRACING_SUPPORT
 	select VIRT_TO_BUS
 	select CPU_NO_EFFICIENT_FFS
@@ -75,9 +76,6 @@ config GENERIC_CALIBRATE_DELAY
 config GENERIC_CSUM
 	def_bool y
 
-config STACKTRACE_SUPPORT
-	def_bool y
-
 config LOCKDEP_SUPPORT
 	def_bool y
 
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index 6ad1882a8db9..0645e7b96493 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -80,6 +80,7 @@ config MIPS
 	select MODULES_USE_ELF_REL if MODULES
 	select PERF_USE_VMALLOC
 	select RTC_LIB
+	select STACKTRACE_SUPPORT
 	select SYSCTL_EXCEPTION_TRACE
 	select VIRT_TO_BUS
 
@@ -3053,10 +3054,6 @@ config LOCKDEP_SUPPORT
 	bool
 	default y
 
-config STACKTRACE_SUPPORT
-	bool
-	default y
-
 config HAVE_LATENCYTOP_SUPPORT
 	bool
 	default y
diff --git a/arch/nds32/Kconfig b/arch/nds32/Kconfig
index 6a3c53d05dcd..65a506fe25a9 100644
--- a/arch/nds32/Kconfig
+++ b/arch/nds32/Kconfig
@@ -38,6 +38,7 @@ config NDS32
 	select OF_EARLY_FLATTREE
 	select NO_IOPORT_MAP
 	select RTC_LIB
+	select STACKTRACE_SUPPORT
 	select THREAD_INFO_IN_TASK
 	select HAVE_FUNCTION_TRACER
 	select HAVE_FUNCTION_GRAPH_TRACER
@@ -62,9 +63,6 @@ config GENERIC_LOCKBREAK
 config TRACE_IRQFLAGS_SUPPORT
 	def_bool y
 
-config STACKTRACE_SUPPORT
-        def_bool y
-
 config FIX_EARLYCON_MEM
 	def_bool y
 
diff --git a/arch/openrisc/Kconfig b/arch/openrisc/Kconfig
index 9f51da5e4f57..addbe1d0dee6 100644
--- a/arch/openrisc/Kconfig
+++ b/arch/openrisc/Kconfig
@@ -35,6 +35,7 @@ config OPENRISC
 	select OMPIC if SMP
 	select ARCH_WANT_FRAME_POINTERS
 	select GENERIC_IRQ_MULTI_HANDLER
+	select STACKTRACE_SUPPORT
 
 config CPU_BIG_ENDIAN
 	def_bool y
@@ -56,9 +57,6 @@ config TRACE_IRQFLAGS_SUPPORT
 config GENERIC_CSUM
         def_bool y
 
-config STACKTRACE_SUPPORT
-	def_bool y
-
 config LOCKDEP_SUPPORT
 	def_bool  y
 
diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig
index 8efbeeafb68e..9288ff6af559 100644
--- a/arch/parisc/Kconfig
+++ b/arch/parisc/Kconfig
@@ -53,6 +53,7 @@ config PARISC
 	select CPU_NO_EFFICIENT_FFS
 	select NEED_DMA_MAP_STATE
 	select NEED_SG_DMA_LENGTH
+	select STACKTRACE_SUPPORT
 
 	help
 	  The PA-RISC microprocessor is designed by Hewlett-Packard and used
@@ -104,9 +105,6 @@ config TIME_LOW_RES
 config PM
 	bool
 
-config STACKTRACE_SUPPORT
-	def_bool y
-
 config ISA_DMA_API
 	bool
 
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index 2c3ccffbb2ec..45d0d69237b1 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -91,10 +91,6 @@ config PPC_WATCHDOG
 	  seleted via the generic lockup detector menu which is why we
 	  have no standalone config option for it here.
 
-config STACKTRACE_SUPPORT
-	bool
-	default y
-
 config TRACE_IRQFLAGS_SUPPORT
 	bool
 	default y
@@ -234,6 +230,7 @@ config PPC
 	select RTC_LIB
 	select RWSEM_XCHGADD_ALGORITHM
 	select SPARSE_IRQ
+	select STACKTRACE_SUPPORT
 	select SYSCTL_EXCEPTION_TRACE
 	select VIRT_TO_BUS			if !PPC64
 	#
diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
index fa251310c48c..f0e87594fc9b 100644
--- a/arch/riscv/Kconfig
+++ b/arch/riscv/Kconfig
@@ -47,6 +47,7 @@ config RISCV
 	select PCI_DOMAINS_GENERIC if PCI
 	select PCI_MSI if PCI
 	select RISCV_TIMER
+	select STACKTRACE_SUPPORT
 	select GENERIC_IRQ_MULTI_HANDLER
 	select ARCH_HAS_PTE_SPECIAL
 
@@ -63,9 +64,6 @@ config PAGE_OFFSET
 	default 0xffffffff80000000 if 64BIT && MAXPHYSMEM_2GB
 	default 0xffffffe000000000 if 64BIT && MAXPHYSMEM_128GB
 
-config STACKTRACE_SUPPORT
-	def_bool y
-
 config TRACE_IRQFLAGS_SUPPORT
 	def_bool y
 
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig
index 7f547d4d835f..fde5d60aab7e 100644
--- a/arch/s390/Kconfig
+++ b/arch/s390/Kconfig
@@ -11,9 +11,6 @@ config CPU_BIG_ENDIAN
 config LOCKDEP_SUPPORT
 	def_bool y
 
-config STACKTRACE_SUPPORT
-	def_bool y
-
 config ARCH_HAS_ILOG2_U32
 	def_bool n
 
@@ -177,6 +174,7 @@ config S390
 	select PCI_MSI			if PCI
 	select RWSEM_XCHGADD_ALGORITHM
 	select SPARSE_IRQ
+	select STACKTRACE_SUPPORT
 	select SYSCTL_EXCEPTION_TRACE
 	select THREAD_INFO_IN_TASK
 	select TTY
diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig
index 4f8c7472079b..e77d3befa52a 100644
--- a/arch/sh/Kconfig
+++ b/arch/sh/Kconfig
@@ -49,6 +49,7 @@ config SUPERH
 	select OLD_SIGSUSPEND
 	select OLD_SIGACTION
 	select PCI_DOMAINS if PCI
+	select STACKTRACE_SUPPORT
 	select HAVE_ARCH_AUDITSYSCALL
 	select HAVE_FUTEX_CMPXCHG if FUTEX
 	select HAVE_NMI
@@ -126,9 +127,6 @@ config SYS_SUPPORTS_SMP
 config SYS_SUPPORTS_NUMA
 	bool
 
-config STACKTRACE_SUPPORT
-	def_bool y
-
 config LOCKDEP_SUPPORT
 	def_bool y
 
diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig
index 60c90e59eb3c..85c4447fce00 100644
--- a/arch/sparc/Kconfig
+++ b/arch/sparc/Kconfig
@@ -91,6 +91,7 @@ config SPARC64
 	select ARCH_HAS_PTE_SPECIAL
 	select PCI_DOMAINS if PCI
 	select RWSEM_XCHGADD_ALGORITHM
+	select STACKTRACE_SUPPORT
 
 config ARCH_DEFCONFIG
 	string
@@ -107,10 +108,6 @@ config ARCH_ATU
 	bool
 	default y if SPARC64
 
-config STACKTRACE_SUPPORT
-	bool
-	default y if SPARC64
-
 config LOCKDEP_SUPPORT
 	bool
 	default y if SPARC64
diff --git a/arch/um/Kconfig b/arch/um/Kconfig
index ec9711d068b7..a88ad4c0c3b4 100644
--- a/arch/um/Kconfig
+++ b/arch/um/Kconfig
@@ -17,6 +17,8 @@ config UML
 	select GENERIC_CPU_DEVICES
 	select GENERIC_CLOCKEVENTS
 	select HAVE_GCC_PLUGINS
+	select STACKTRACE
+	select STACKTRACE_SUPPORT
 	select TTY # Needed for line.c
 
 config MMU
@@ -40,11 +42,6 @@ config LOCKDEP_SUPPORT
 	bool
 	default y
 
-config STACKTRACE_SUPPORT
-	bool
-	default y
-	select STACKTRACE
-
 config GENERIC_CALIBRATE_DELAY
 	bool
 	default y
diff --git a/arch/unicore32/Kconfig b/arch/unicore32/Kconfig
index e080087f0762..d7dccc247301 100644
--- a/arch/unicore32/Kconfig
+++ b/arch/unicore32/Kconfig
@@ -20,6 +20,7 @@ config UNICORE32
 	select GENERIC_IOMAP
 	select MODULES_USE_ELF_REL
 	select NEED_DMA_MAP_STATE
+	select STACKTRACE_SUPPORT
 	help
 	  UniCore-32 is 32-bit Instruction Set Architecture,
 	  including a series of low-power-consumption RISC chip
@@ -32,9 +33,6 @@ config GENERIC_CSUM
 config NO_IOPORT_MAP
 	bool
 
-config STACKTRACE_SUPPORT
-	def_bool y
-
 config LOCKDEP_SUPPORT
 	def_bool y
 
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 3c98f3f78631..c5f92cfd5d85 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -206,6 +206,7 @@ config X86
 	select SPARSE_IRQ
 	select SRCU
 	select SYSCTL_EXCEPTION_TRACE
+	select STACKTRACE_SUPPORT
 	select THREAD_INFO_IN_TASK
 	select USER_STACKTRACE_SUPPORT
 	select VIRT_TO_BUS
@@ -228,9 +229,6 @@ config ARCH_DEFCONFIG
 config LOCKDEP_SUPPORT
 	def_bool y
 
-config STACKTRACE_SUPPORT
-	def_bool y
-
 config MMU
 	def_bool y
 
diff --git a/arch/xtensa/Kconfig b/arch/xtensa/Kconfig
index ddd3b02191a6..51cdd270a44d 100644
--- a/arch/xtensa/Kconfig
+++ b/arch/xtensa/Kconfig
@@ -35,6 +35,7 @@ config XTENSA
 	select MODULES_USE_ELF_RELA
 	select PERF_USE_VMALLOC
 	select RWSEM_XCHGADD_ALGORITHM
+	select STACKTRACE_SUPPORT
 	select VIRT_TO_BUS
 	help
 	  Xtensa processors are 32-bit RISC machines designed by Tensilica
@@ -63,9 +64,6 @@ config HZ
 config LOCKDEP_SUPPORT
 	def_bool y
 
-config STACKTRACE_SUPPORT
-	def_bool y
-
 config TRACE_IRQFLAGS_SUPPORT
 	def_bool y
 
diff --git a/kernel/trace/Kconfig b/kernel/trace/Kconfig
index fa8b1fe824f3..80291d016e21 100644
--- a/kernel/trace/Kconfig
+++ b/kernel/trace/Kconfig
@@ -3,6 +3,9 @@
 #  select HAVE_FUNCTION_TRACER:
 #
 
+config STACKTRACE_SUPPORT
+	bool
+
 config USER_STACKTRACE_SUPPORT
 	bool
 
-- 
2.20.1


^ permalink raw reply related

* [PATCH 03/11] kernel/locks: consolidate RWSEM_GENERIC_* options
From: Christoph Hellwig @ 2019-02-13 17:39 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: linux-xtensa, linux-s390, linux-kbuild, linux-kernel, linux-riscv,
	linuxppc-dev
In-Reply-To: <20190213174005.28785-1-hch@lst.de>

Introduce one central definition of RWSEM_XCHGADD_ALGORITHM and
RWSEM_GENERIC_SPINLOCK in kernel/Kconfig.locks and let architectures
select RWSEM_XCHGADD_ALGORITHM if they want it, otherwise default to
the spinlock version.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 arch/alpha/Kconfig      | 8 +-------
 arch/arc/Kconfig        | 3 ---
 arch/arm/Kconfig        | 5 +----
 arch/arm64/Kconfig      | 4 +---
 arch/c6x/Kconfig        | 3 ---
 arch/csky/Kconfig       | 3 ---
 arch/h8300/Kconfig      | 3 ---
 arch/hexagon/Kconfig    | 7 +------
 arch/ia64/Kconfig       | 5 +----
 arch/m68k/Kconfig       | 7 -------
 arch/microblaze/Kconfig | 6 ------
 arch/mips/Kconfig       | 7 -------
 arch/nds32/Kconfig      | 3 ---
 arch/nios2/Kconfig      | 3 ---
 arch/openrisc/Kconfig   | 6 ------
 arch/parisc/Kconfig     | 6 ------
 arch/powerpc/Kconfig    | 8 +-------
 arch/riscv/Kconfig      | 3 ---
 arch/s390/Kconfig       | 7 +------
 arch/sh/Kconfig         | 6 ------
 arch/sparc/Kconfig      | 9 +--------
 arch/unicore32/Kconfig  | 6 ------
 arch/x86/Kconfig        | 4 +---
 arch/x86/um/Kconfig     | 7 +------
 arch/xtensa/Kconfig     | 4 +---
 kernel/Kconfig.locks    | 7 +++++++
 26 files changed, 18 insertions(+), 122 deletions(-)

diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig
index 584a6e114853..474202d89b25 100644
--- a/arch/alpha/Kconfig
+++ b/arch/alpha/Kconfig
@@ -35,6 +35,7 @@ config ALPHA
 	select MODULES_USE_ELF_RELA
 	select ODD_RT_SIGACTION
 	select OLD_SIGSUSPEND
+	select RWSEM_XCHGADD_ALGORITHM
 	select CPU_NO_EFFICIENT_FFS if !ALPHA_EV67
 	help
 	  The Alpha is a 64-bit general-purpose processor designed and
@@ -49,13 +50,6 @@ config MMU
 	bool
 	default y
 
-config RWSEM_GENERIC_SPINLOCK
-	bool
-
-config RWSEM_XCHGADD_ALGORITHM
-	bool
-	default y
-
 config ARCH_HAS_ILOG2_U32
 	bool
 	default n
diff --git a/arch/arc/Kconfig b/arch/arc/Kconfig
index 376366a7db81..c0dd229af534 100644
--- a/arch/arc/Kconfig
+++ b/arch/arc/Kconfig
@@ -63,9 +63,6 @@ config SCHED_OMIT_FRAME_POINTER
 config GENERIC_CSUM
 	def_bool y
 
-config RWSEM_GENERIC_SPINLOCK
-	def_bool y
-
 config ARCH_DISCONTIGMEM_ENABLE
 	def_bool n
 
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 664e918e2624..1ed4c0560b50 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -108,6 +108,7 @@ config ARM
 	select PERF_USE_VMALLOC
 	select REFCOUNT_FULL
 	select RTC_LIB
+	select RWSEM_XCHGADD_ALGORITHM
 	select SYS_SUPPORTS_APM_EMULATION
 	# Above selects are sorted alphabetically; please add new ones
 	# according to that.  Thanks.
@@ -176,10 +177,6 @@ config TRACE_IRQFLAGS_SUPPORT
 	bool
 	default !CPU_V7M
 
-config RWSEM_XCHGADD_ALGORITHM
-	bool
-	default y
-
 config ARCH_HAS_ILOG2_U32
 	bool
 
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index a4168d366127..2f8da4e18a1e 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -170,6 +170,7 @@ config ARM64
 	select POWER_RESET
 	select POWER_SUPPLY
 	select REFCOUNT_FULL
+	select RWSEM_XCHGADD_ALGORITHM
 	select SPARSE_IRQ
 	select SWIOTLB
 	select SYSCTL_EXCEPTION_TRACE
@@ -238,9 +239,6 @@ config LOCKDEP_SUPPORT
 config TRACE_IRQFLAGS_SUPPORT
 	def_bool y
 
-config RWSEM_XCHGADD_ALGORITHM
-	def_bool y
-
 config GENERIC_BUG
 	def_bool y
 	depends on BUG
diff --git a/arch/c6x/Kconfig b/arch/c6x/Kconfig
index 456e154674d1..f11465554ecf 100644
--- a/arch/c6x/Kconfig
+++ b/arch/c6x/Kconfig
@@ -26,9 +26,6 @@ config MMU
 config FPU
 	def_bool n
 
-config RWSEM_GENERIC_SPINLOCK
-	def_bool y
-
 config GENERIC_CALIBRATE_DELAY
 	def_bool y
 
diff --git a/arch/csky/Kconfig b/arch/csky/Kconfig
index 398113c845f5..90279a11fcf7 100644
--- a/arch/csky/Kconfig
+++ b/arch/csky/Kconfig
@@ -93,9 +93,6 @@ config GENERIC_HWEIGHT
 config MMU
 	def_bool y
 
-config RWSEM_GENERIC_SPINLOCK
-	def_bool y
-
 config STACKTRACE_SUPPORT
 	def_bool y
 
diff --git a/arch/h8300/Kconfig b/arch/h8300/Kconfig
index 6472a0685470..ba33326e7c54 100644
--- a/arch/h8300/Kconfig
+++ b/arch/h8300/Kconfig
@@ -26,9 +26,6 @@ config H8300
 config CPU_BIG_ENDIAN
 	def_bool y
 
-config RWSEM_GENERIC_SPINLOCK
-	def_bool y
-
 config GENERIC_HWEIGHT
 	def_bool y
 
diff --git a/arch/hexagon/Kconfig b/arch/hexagon/Kconfig
index fb2fbfcfc532..49f364ea18d4 100644
--- a/arch/hexagon/Kconfig
+++ b/arch/hexagon/Kconfig
@@ -31,6 +31,7 @@ config HEXAGON
 	select GENERIC_CLOCKEVENTS_BROADCAST
 	select MODULES_USE_ELF_RELA
 	select GENERIC_CPU_DEVICES
+	select RWSEM_XCHGADD_ALGORITHM
 	---help---
 	  Qualcomm Hexagon is a processor architecture designed for high
 	  performance and low power across a wide variety of applications.
@@ -64,12 +65,6 @@ config GENERIC_CSUM
 config GENERIC_IRQ_PROBE
 	def_bool y
 
-config RWSEM_GENERIC_SPINLOCK
-	def_bool n
-
-config RWSEM_XCHGADD_ALGORITHM
-	def_bool y
-
 config GENERIC_HWEIGHT
 	def_bool y
 
diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig
index 8d7396bd1790..99a629f05de4 100644
--- a/arch/ia64/Kconfig
+++ b/arch/ia64/Kconfig
@@ -53,6 +53,7 @@ config IA64
 	select HAVE_ARCH_AUDITSYSCALL
 	select NEED_DMA_MAP_STATE
 	select NEED_SG_DMA_LENGTH
+	select RWSEM_XCHGADD_ALGORITHM
 	default y
 	help
 	  The Itanium Processor Family is Intel's 64-bit successor to
@@ -83,10 +84,6 @@ config STACKTRACE_SUPPORT
 config GENERIC_LOCKBREAK
 	def_bool n
 
-config RWSEM_XCHGADD_ALGORITHM
-	bool
-	default y
-
 config HUGETLB_PAGE_SIZE_VARIABLE
 	bool
 	depends on HUGETLB_PAGE
diff --git a/arch/m68k/Kconfig b/arch/m68k/Kconfig
index e173ea2ff395..6ace0b2cd5fe 100644
--- a/arch/m68k/Kconfig
+++ b/arch/m68k/Kconfig
@@ -31,13 +31,6 @@ config M68K
 config CPU_BIG_ENDIAN
 	def_bool y
 
-config RWSEM_GENERIC_SPINLOCK
-	bool
-	default y
-
-config RWSEM_XCHGADD_ALGORITHM
-	bool
-
 config ARCH_HAS_ILOG2_U32
 	bool
 
diff --git a/arch/microblaze/Kconfig b/arch/microblaze/Kconfig
index 58aff2653d86..d459c70d9a66 100644
--- a/arch/microblaze/Kconfig
+++ b/arch/microblaze/Kconfig
@@ -57,15 +57,9 @@ config CPU_LITTLE_ENDIAN
 
 endchoice
 
-config RWSEM_GENERIC_SPINLOCK
-	def_bool y
-
 config ZONE_DMA
 	def_bool y
 
-config RWSEM_XCHGADD_ALGORITHM
-	bool
-
 config ARCH_HAS_ILOG2_U32
 	def_bool n
 
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index a84c24d894aa..6ad1882a8db9 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -1037,13 +1037,6 @@ source "arch/mips/paravirt/Kconfig"
 
 endmenu
 
-config RWSEM_GENERIC_SPINLOCK
-	bool
-	default y
-
-config RWSEM_XCHGADD_ALGORITHM
-	bool
-
 config GENERIC_HWEIGHT
 	bool
 	default y
diff --git a/arch/nds32/Kconfig b/arch/nds32/Kconfig
index dda1906bba11..6a3c53d05dcd 100644
--- a/arch/nds32/Kconfig
+++ b/arch/nds32/Kconfig
@@ -59,9 +59,6 @@ config GENERIC_LOCKBREAK
         def_bool y
 	depends on PREEMPT
 
-config RWSEM_GENERIC_SPINLOCK
-	def_bool y
-
 config TRACE_IRQFLAGS_SUPPORT
 	def_bool y
 
diff --git a/arch/nios2/Kconfig b/arch/nios2/Kconfig
index 532343eebf89..715e6c09b4a5 100644
--- a/arch/nios2/Kconfig
+++ b/arch/nios2/Kconfig
@@ -39,9 +39,6 @@ config NO_IOPORT_MAP
 config FPU
 	def_bool n
 
-config RWSEM_GENERIC_SPINLOCK
-	def_bool y
-
 config TRACE_IRQFLAGS_SUPPORT
 	def_bool n
 
diff --git a/arch/openrisc/Kconfig b/arch/openrisc/Kconfig
index 09ab59e942ae..9f51da5e4f57 100644
--- a/arch/openrisc/Kconfig
+++ b/arch/openrisc/Kconfig
@@ -42,12 +42,6 @@ config CPU_BIG_ENDIAN
 config MMU
 	def_bool y
 
-config RWSEM_GENERIC_SPINLOCK
-	def_bool y
-
-config RWSEM_XCHGADD_ALGORITHM
-	def_bool n
-
 config GENERIC_HWEIGHT
 	def_bool y
 
diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig
index 7ca2c3ebad64..8efbeeafb68e 100644
--- a/arch/parisc/Kconfig
+++ b/arch/parisc/Kconfig
@@ -74,12 +74,6 @@ config GENERIC_LOCKBREAK
 	default y
 	depends on SMP && PREEMPT
 
-config RWSEM_GENERIC_SPINLOCK
-	def_bool y
-
-config RWSEM_XCHGADD_ALGORITHM
-	bool
-
 config ARCH_HAS_ILOG2_U32
 	bool
 	default n
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index 2890d36eb531..2c3ccffbb2ec 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -103,13 +103,6 @@ config LOCKDEP_SUPPORT
 	bool
 	default y
 
-config RWSEM_GENERIC_SPINLOCK
-	bool
-
-config RWSEM_XCHGADD_ALGORITHM
-	bool
-	default y
-
 config GENERIC_LOCKBREAK
 	bool
 	default y
@@ -239,6 +232,7 @@ config PPC
 	select PCI_DOMAINS			if PCI
 	select PCI_SYSCALL			if PCI
 	select RTC_LIB
+	select RWSEM_XCHGADD_ALGORITHM
 	select SPARSE_IRQ
 	select SYSCTL_EXCEPTION_TRACE
 	select VIRT_TO_BUS			if !PPC64
diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
index b60f4e3e36f4..fa251310c48c 100644
--- a/arch/riscv/Kconfig
+++ b/arch/riscv/Kconfig
@@ -69,9 +69,6 @@ config STACKTRACE_SUPPORT
 config TRACE_IRQFLAGS_SUPPORT
 	def_bool y
 
-config RWSEM_GENERIC_SPINLOCK
-	def_bool y
-
 config GENERIC_BUG
 	def_bool y
 	depends on BUG
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig
index ed554b09eb3f..7f547d4d835f 100644
--- a/arch/s390/Kconfig
+++ b/arch/s390/Kconfig
@@ -14,12 +14,6 @@ config LOCKDEP_SUPPORT
 config STACKTRACE_SUPPORT
 	def_bool y
 
-config RWSEM_GENERIC_SPINLOCK
-	bool
-
-config RWSEM_XCHGADD_ALGORITHM
-	def_bool y
-
 config ARCH_HAS_ILOG2_U32
 	def_bool n
 
@@ -181,6 +175,7 @@ config S390
 	select OLD_SIGSUSPEND3
 	select PCI_DOMAINS		if PCI
 	select PCI_MSI			if PCI
+	select RWSEM_XCHGADD_ALGORITHM
 	select SPARSE_IRQ
 	select SYSCTL_EXCEPTION_TRACE
 	select THREAD_INFO_IN_TASK
diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig
index a9c36f95744a..4f8c7472079b 100644
--- a/arch/sh/Kconfig
+++ b/arch/sh/Kconfig
@@ -89,12 +89,6 @@ config ARCH_DEFCONFIG
 	default "arch/sh/configs/shx3_defconfig" if SUPERH32
 	default "arch/sh/configs/cayman_defconfig" if SUPERH64
 
-config RWSEM_GENERIC_SPINLOCK
-	def_bool y
-
-config RWSEM_XCHGADD_ALGORITHM
-	bool
-
 config GENERIC_BUG
 	def_bool y
 	depends on BUG && SUPERH32
diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig
index d5dd652fb8cc..60c90e59eb3c 100644
--- a/arch/sparc/Kconfig
+++ b/arch/sparc/Kconfig
@@ -90,6 +90,7 @@ config SPARC64
 	select ARCH_CLOCKSOURCE_DATA
 	select ARCH_HAS_PTE_SPECIAL
 	select PCI_DOMAINS if PCI
+	select RWSEM_XCHGADD_ALGORITHM
 
 config ARCH_DEFCONFIG
 	string
@@ -190,14 +191,6 @@ config NR_CPUS
 
 source "kernel/Kconfig.hz"
 
-config RWSEM_GENERIC_SPINLOCK
-	bool
-	default y if SPARC32
-
-config RWSEM_XCHGADD_ALGORITHM
-	bool
-	default y if SPARC64
-
 config GENERIC_HWEIGHT
 	bool
 	default y
diff --git a/arch/unicore32/Kconfig b/arch/unicore32/Kconfig
index c3a41bfe161b..e080087f0762 100644
--- a/arch/unicore32/Kconfig
+++ b/arch/unicore32/Kconfig
@@ -38,12 +38,6 @@ config STACKTRACE_SUPPORT
 config LOCKDEP_SUPPORT
 	def_bool y
 
-config RWSEM_GENERIC_SPINLOCK
-	def_bool y
-
-config RWSEM_XCHGADD_ALGORITHM
-	bool
-
 config ARCH_HAS_ILOG2_U32
 	bool
 
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 68261430fe6e..3c98f3f78631 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -202,6 +202,7 @@ config X86
 	select PERF_EVENTS
 	select RTC_LIB
 	select RTC_MC146818_LIB
+	select RWSEM_XCHGADD_ALGORITHM
 	select SPARSE_IRQ
 	select SRCU
 	select SYSCTL_EXCEPTION_TRACE
@@ -269,9 +270,6 @@ config ARCH_MAY_HAVE_PC_FDC
 	def_bool y
 	depends on ISA_DMA_API
 
-config RWSEM_XCHGADD_ALGORITHM
-	def_bool y
-
 config GENERIC_CALIBRATE_DELAY
 	def_bool y
 
diff --git a/arch/x86/um/Kconfig b/arch/x86/um/Kconfig
index f518b4744ff8..f5a8cded3ca4 100644
--- a/arch/x86/um/Kconfig
+++ b/arch/x86/um/Kconfig
@@ -26,18 +26,13 @@ config X86_32
 config X86_64
 	def_bool 64BIT
 	select MODULES_USE_ELF_RELA
+	select RWSEM_XCHGADD_ALGORITHM
 
 config ARCH_DEFCONFIG
 	string
 	default "arch/um/configs/i386_defconfig" if X86_32
 	default "arch/um/configs/x86_64_defconfig" if X86_64
 
-config RWSEM_XCHGADD_ALGORITHM
-	def_bool 64BIT
-
-config RWSEM_GENERIC_SPINLOCK
-	def_bool !RWSEM_XCHGADD_ALGORITHM
-
 config 3_LEVEL_PGTABLES
 	bool "Three-level pagetables" if !64BIT
 	default 64BIT
diff --git a/arch/xtensa/Kconfig b/arch/xtensa/Kconfig
index ce91682770cb..ddd3b02191a6 100644
--- a/arch/xtensa/Kconfig
+++ b/arch/xtensa/Kconfig
@@ -34,6 +34,7 @@ config XTENSA
 	select IRQ_DOMAIN
 	select MODULES_USE_ELF_RELA
 	select PERF_USE_VMALLOC
+	select RWSEM_XCHGADD_ALGORITHM
 	select VIRT_TO_BUS
 	help
 	  Xtensa processors are 32-bit RISC machines designed by Tensilica
@@ -43,9 +44,6 @@ config XTENSA
 	  with reasonable minimum requirements.  The Xtensa Linux project has
 	  a home page at <http://www.linux-xtensa.org/>.
 
-config RWSEM_XCHGADD_ALGORITHM
-	def_bool y
-
 config GENERIC_HWEIGHT
 	def_bool y
 
diff --git a/kernel/Kconfig.locks b/kernel/Kconfig.locks
index 84d882f3e299..66ab9fd97c08 100644
--- a/kernel/Kconfig.locks
+++ b/kernel/Kconfig.locks
@@ -248,3 +248,10 @@ config ARCH_USE_QUEUED_RWLOCKS
 config QUEUED_RWLOCKS
 	def_bool y if ARCH_USE_QUEUED_RWLOCKS
 	depends on SMP
+
+config RWSEM_XCHGADD_ALGORITHM
+	bool
+
+config RWSEM_GENERIC_SPINLOCK
+	default y if !RWSEM_XCHGADD_ALGORITHM
+	bool
-- 
2.20.1


^ permalink raw reply related

* consolidate a few more arch support config options
From: Christoph Hellwig @ 2019-02-13 17:39 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: linux-xtensa, linux-s390, linux-kbuild, linux-kernel, linux-riscv,
	linuxppc-dev

Hi all,

this series moves various config options that are defined in multiple
arch Kconfig files into common files, usually close to the code
supporting such features.

^ permalink raw reply

* [PATCH 01/11] powerpc: remove dead ifdefs in <asm/checksum.h>
From: Christoph Hellwig @ 2019-02-13 17:39 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: linux-xtensa, linux-s390, linux-kbuild, linux-kernel, linux-riscv,
	linuxppc-dev
In-Reply-To: <20190213174005.28785-1-hch@lst.de>

__KERNEL__ is never not defined for non-uapi headers, and GENERIC_CSUM
isn't ever set for powerpc either.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 arch/powerpc/include/asm/checksum.h | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/arch/powerpc/include/asm/checksum.h b/arch/powerpc/include/asm/checksum.h
index a78a57e5058d..37c309500260 100644
--- a/arch/powerpc/include/asm/checksum.h
+++ b/arch/powerpc/include/asm/checksum.h
@@ -1,6 +1,5 @@
 #ifndef _ASM_POWERPC_CHECKSUM_H
 #define _ASM_POWERPC_CHECKSUM_H
-#ifdef __KERNEL__
 
 /*
  * This program is free software; you can redistribute it and/or
@@ -9,9 +8,6 @@
  * 2 of the License, or (at your option) any later version.
  */
 
-#ifdef CONFIG_GENERIC_CSUM
-#include <asm-generic/checksum.h>
-#else
 #include <linux/bitops.h>
 #include <linux/in6.h>
 /*
@@ -217,6 +213,4 @@ __sum16 csum_ipv6_magic(const struct in6_addr *saddr,
 			const struct in6_addr *daddr,
 			__u32 len, __u8 proto, __wsum sum);
 
-#endif
-#endif /* __KERNEL__ */
-#endif
+#endif /* _ASM_POWERPC_CHECKSUM_H */
-- 
2.20.1


^ permalink raw reply related

* [PATCH 02/11] riscv: remove the HAVE_KPROBES option
From: Christoph Hellwig @ 2019-02-13 17:39 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: linux-xtensa, linux-s390, linux-kbuild, linux-kernel, linux-riscv,
	linuxppc-dev
In-Reply-To: <20190213174005.28785-1-hch@lst.de>

HAVE_KPROBES is defined genericly in arch/Kconfig and architectures
should just select it if supported.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 arch/riscv/Kconfig | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
index 515fc3cc9687..b60f4e3e36f4 100644
--- a/arch/riscv/Kconfig
+++ b/arch/riscv/Kconfig
@@ -94,9 +94,6 @@ config PGTABLE_LEVELS
 	default 3 if 64BIT
 	default 2
 
-config HAVE_KPROBES
-	def_bool n
-
 menu "Platform type"
 
 choice
-- 
2.20.1


^ permalink raw reply related

* Re: [PATCH v3 2/2] mm: be more verbose about zonelist initialization
From: Michal Hocko @ 2019-02-13 16:18 UTC (permalink / raw)
  To: Dave Hansen
  Cc: Tony Luck, linux-ia64, Peter Zijlstra, x86, LKML, Pingfan Liu,
	linux-mm, Ingo Molnar, linuxppc-dev
In-Reply-To: <1433a7e9-87b2-7e8d-a87d-dcffe486635c@intel.com>

On Wed 13-02-19 08:14:50, Dave Hansen wrote:
> On 2/13/19 1:43 AM, Michal Hocko wrote:
> > 
> > We have seen several bugs where zonelists have not been initialized
> > properly and it is not really straightforward to track those bugs down.
> > One way to help a bit at least is to dump zonelists of each node when
> > they are (re)initialized.
> 
> Were you thinking of boot-time bugs and crashes, or just stuff going
> wonky after boot?

Mostly boot time. I haven't seen hotplug related bugs in this direction.
All the issues I have seen so far is that we forget a node altogether
and it ends up with no zonelists at all. But who knows maybe we have
some hidden bugs where zonelists is initialized only partially for some
reason and there is no real way to find out.

> We don't have the zonelists dumped in /proc anywhere, do we?  Would that
> help?

I would prefer to not export such an implementation detail into proc

-- 
Michal Hocko
SUSE Labs

^ permalink raw reply

* Re: [PATCH v3 2/2] mm: be more verbose about zonelist initialization
From: Dave Hansen @ 2019-02-13 16:14 UTC (permalink / raw)
  To: Michal Hocko, linux-mm
  Cc: Tony Luck, linux-ia64, Peter Zijlstra, x86, LKML, Pingfan Liu,
	Michal Hocko, Ingo Molnar, linuxppc-dev
In-Reply-To: <20190213094315.3504-1-mhocko@kernel.org>

On 2/13/19 1:43 AM, Michal Hocko wrote:
> 
> We have seen several bugs where zonelists have not been initialized
> properly and it is not really straightforward to track those bugs down.
> One way to help a bit at least is to dump zonelists of each node when
> they are (re)initialized.

Were you thinking of boot-time bugs and crashes, or just stuff going
wonky after boot?

We don't have the zonelists dumped in /proc anywhere, do we?  Would that
help?

^ permalink raw reply

* [PATCH v3 2/2] powerpc/8xx: Map 32Mb of RAM at init.
From: Christophe Leroy @ 2019-02-13 16:06 UTC (permalink / raw)
  To: Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman
  Cc: linuxppc-dev, linux-kernel
In-Reply-To: <21f171c0cbd460905a134ce9b9afc2ecb5277269.1550073540.git.christophe.leroy@c-s.fr>

At the time being, initial MMU setup allows 24 Mbytes
of DATA and 8 Mbytes of code.

Some debug setup like CONFIG_KASAN generate huge
kernels with text size over the 8M limit and data over the
24 Mbytes limit.

Here is an 8xx kernel compiled with CONFIG_KASAN_INLINE for
one of my boards:

[root@po16846vm linux-powerpc]# size -x vmlinux
   text	   data	    bss	    dec	    hex	filename
0x111019c	0x41b0d4	0x490de0	26984528	19bc050	vmlinux

This patch maps up to 32 Mbytes code based on _einittext symbol
and allows 32 Mbytes of memory instead of 24.

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
---
 v3: Maps 32M of both data and text.

 v2: Using IS_ENABLED() instead of #ifdef in 8xx_mmu.c

 arch/powerpc/kernel/head_8xx.S | 51 +++++++++++++++++++++++++-----------------
 arch/powerpc/mm/8xx_mmu.c      |  7 ++++--
 2 files changed, 36 insertions(+), 22 deletions(-)

diff --git a/arch/powerpc/kernel/head_8xx.S b/arch/powerpc/kernel/head_8xx.S
index 20cc816b3508..fe2857ef0309 100644
--- a/arch/powerpc/kernel/head_8xx.S
+++ b/arch/powerpc/kernel/head_8xx.S
@@ -337,8 +337,8 @@ InstructionTLBMiss:
 	rlwinm	r10, r10, 16, 0xfff8
 	cmpli	cr0, r10, PAGE_OFFSET@h
 #ifndef CONFIG_PIN_TLB_TEXT
-	/* It is assumed that kernel code fits into the first 8M page */
-0:	cmpli	cr7, r10, (PAGE_OFFSET + 0x0800000)@h
+	/* It is assumed that kernel code fits into the first 32M */
+0:	cmpli	cr7, r10, (PAGE_OFFSET + 0x2000000)@h
 	patch_site	0b, patch__itlbmiss_linmem_top
 #endif
 #endif
@@ -434,7 +434,7 @@ DataStoreTLBMiss:
 #ifndef CONFIG_PIN_TLB_IMMR
 	cmpli	cr6, r10, VIRT_IMMR_BASE@h
 #endif
-0:	cmpli	cr7, r10, (PAGE_OFFSET + 0x1800000)@h
+0:	cmpli	cr7, r10, (PAGE_OFFSET + 0x2000000)@h
 	patch_site	0b, patch__dtlbmiss_linmem_top
 
 	mfspr	r10, SPRN_M_TWB	/* Get level 1 table */
@@ -886,28 +886,11 @@ initial_mmu:
 	mtspr	SPRN_MD_CTR, r10	/* remove PINNED DTLB entries */
 
 	tlbia			/* Invalidate all TLB entries */
-#ifdef CONFIG_PIN_TLB_TEXT
-	lis	r8, MI_RSV4I@h
-	ori	r8, r8, 0x1c00
-
-	mtspr	SPRN_MI_CTR, r8	/* Set instruction MMU control */
-#endif
-
 #ifdef CONFIG_PIN_TLB_DATA
 	oris	r10, r10, MD_RSV4I@h
 	mtspr	SPRN_MD_CTR, r10	/* Set data TLB control */
 #endif
 
-	/* Now map the lower 8 Meg into the ITLB. */
-	lis	r8, KERNELBASE@h	/* Create vaddr for TLB */
-	ori	r8, r8, MI_EVALID	/* Mark it valid */
-	mtspr	SPRN_MI_EPN, r8
-	li	r8, MI_PS8MEG /* Set 8M byte page */
-	ori	r8, r8, MI_SVALID	/* Make it valid */
-	mtspr	SPRN_MI_TWC, r8
-	li	r8, MI_BOOTINIT		/* Create RPN for address 0 */
-	mtspr	SPRN_MI_RPN, r8		/* Store TLB entry */
-
 	lis	r8, MI_APG_INIT@h	/* Set protection modes */
 	ori	r8, r8, MI_APG_INIT@l
 	mtspr	SPRN_MI_AP, r8
@@ -937,6 +920,34 @@ initial_mmu:
 	mtspr	SPRN_MD_RPN, r8
 #endif
 
+	/* Now map the lower RAM (up to 32 Mbytes) into the ITLB. */
+#ifdef CONFIG_PIN_TLB_TEXT
+	lis	r8, MI_RSV4I@h
+	ori	r8, r8, 0x1c00
+#endif
+	li	r9, 4				/* up to 4 pages of 8M */
+	mtctr	r9
+	lis	r9, KERNELBASE@h		/* Create vaddr for TLB */
+	li	r10, MI_PS8MEG | MI_SVALID	/* Set 8M byte page */
+	li	r11, MI_BOOTINIT		/* Create RPN for address 0 */
+	lis	r12, _einittext@h
+	ori	r12, r12, _einittext@l
+1:
+#ifdef CONFIG_PIN_TLB_TEXT
+	mtspr	SPRN_MI_CTR, r8	/* Set instruction MMU control */
+	addi	r8, r8, 0x100
+#endif
+
+	ori	r0, r9, MI_EVALID		/* Mark it valid */
+	mtspr	SPRN_MI_EPN, r0
+	mtspr	SPRN_MI_TWC, r10
+	mtspr	SPRN_MI_RPN, r11		/* Store TLB entry */
+	addis	r9, r9, 0x80
+	addis	r11, r11, 0x80
+
+	cmpl	cr0, r9, r12
+	bdnzf	gt, 1b
+
 	/* Since the cache is enabled according to the information we
 	 * just loaded into the TLB, invalidate and enable the caches here.
 	 * We should probably check/set other modes....later.
diff --git a/arch/powerpc/mm/8xx_mmu.c b/arch/powerpc/mm/8xx_mmu.c
index 92b677faea8c..50c8cd8d3cb9 100644
--- a/arch/powerpc/mm/8xx_mmu.c
+++ b/arch/powerpc/mm/8xx_mmu.c
@@ -112,6 +112,9 @@ unsigned long __init mmu_mapin_ram(unsigned long top)
 			mmu_patch_cmp_limit(&patch__itlbmiss_linmem_top, 0);
 	} else {
 		mapped = top & ~(LARGE_PAGE_SIZE_8M - 1);
+		if (!IS_ENABLED(CONFIG_PIN_TLB_TEXT))
+			mmu_patch_cmp_limit(&patch__itlbmiss_linmem_top,
+					    _ALIGN(__pa(_einittext), 8 << 20));
 	}
 
 	mmu_patch_cmp_limit(&patch__dtlbmiss_linmem_top, mapped);
@@ -140,8 +143,8 @@ void __init setup_initial_memory_limit(phys_addr_t first_memblock_base,
 	 */
 	BUG_ON(first_memblock_base != 0);
 
-	/* 8xx can only access 24MB at the moment */
-	memblock_set_current_limit(min_t(u64, first_memblock_size, 0x01800000));
+	/* 8xx can only access 32MB at the moment */
+	memblock_set_current_limit(min_t(u64, first_memblock_size, 0x02000000));
 }
 
 /*
-- 
2.13.3


^ permalink raw reply related

* [PATCH v3 1/2] powerpc/8xx: replace most #ifdef by IS_ENABLED() in 8xx_mmu.c
From: Christophe Leroy @ 2019-02-13 16:06 UTC (permalink / raw)
  To: Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman
  Cc: linuxppc-dev, linux-kernel

This patch replaces most #ifdef mess by IS_ENABLED() in 8xx_mmu.c
This has the advantage of allowing syntax verification at compile
time regardless of selected options.

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
---
 v3: no change

 v2: left CONFIG_BDI_SWITCH change aside as it goes away in another patch

 arch/powerpc/mm/8xx_mmu.c | 44 +++++++++++++++++++-------------------------
 1 file changed, 19 insertions(+), 25 deletions(-)

diff --git a/arch/powerpc/mm/8xx_mmu.c b/arch/powerpc/mm/8xx_mmu.c
index bfa503cff351..92b677faea8c 100644
--- a/arch/powerpc/mm/8xx_mmu.c
+++ b/arch/powerpc/mm/8xx_mmu.c
@@ -66,26 +66,22 @@ unsigned long p_block_mapped(phys_addr_t pa)
 void __init MMU_init_hw(void)
 {
 	/* PIN up to the 3 first 8Mb after IMMR in DTLB table */
-#ifdef CONFIG_PIN_TLB_DATA
-	unsigned long ctr = mfspr(SPRN_MD_CTR) & 0xfe000000;
-	unsigned long flags = 0xf0 | MD_SPS16K | _PAGE_SH | _PAGE_DIRTY;
-#ifdef CONFIG_PIN_TLB_IMMR
-	int i = 29;
-#else
-	int i = 28;
-#endif
-	unsigned long addr = 0;
-	unsigned long mem = total_lowmem;
-
-	for (; i < 32 && mem >= LARGE_PAGE_SIZE_8M; i++) {
-		mtspr(SPRN_MD_CTR, ctr | (i << 8));
-		mtspr(SPRN_MD_EPN, (unsigned long)__va(addr) | MD_EVALID);
-		mtspr(SPRN_MD_TWC, MD_PS8MEG | MD_SVALID);
-		mtspr(SPRN_MD_RPN, addr | flags | _PAGE_PRESENT);
-		addr += LARGE_PAGE_SIZE_8M;
-		mem -= LARGE_PAGE_SIZE_8M;
+	if (IS_ENABLED(CONFIG_PIN_TLB_DATA)) {
+		unsigned long ctr = mfspr(SPRN_MD_CTR) & 0xfe000000;
+		unsigned long flags = 0xf0 | MD_SPS16K | _PAGE_SH | _PAGE_DIRTY;
+		int i = IS_ENABLED(CONFIG_PIN_TLB_IMMR) ? 29 : 28;
+		unsigned long addr = 0;
+		unsigned long mem = total_lowmem;
+
+		for (; i < 32 && mem >= LARGE_PAGE_SIZE_8M; i++) {
+			mtspr(SPRN_MD_CTR, ctr | (i << 8));
+			mtspr(SPRN_MD_EPN, (unsigned long)__va(addr) | MD_EVALID);
+			mtspr(SPRN_MD_TWC, MD_PS8MEG | MD_SVALID);
+			mtspr(SPRN_MD_RPN, addr | flags | _PAGE_PRESENT);
+			addr += LARGE_PAGE_SIZE_8M;
+			mem -= LARGE_PAGE_SIZE_8M;
+		}
 	}
-#endif
 }
 
 static void __init mmu_mapin_immr(void)
@@ -110,12 +106,10 @@ unsigned long __init mmu_mapin_ram(unsigned long top)
 	if (__map_without_ltlbs) {
 		mapped = 0;
 		mmu_mapin_immr();
-#ifndef CONFIG_PIN_TLB_IMMR
-		patch_instruction_site(&patch__dtlbmiss_immr_jmp, PPC_INST_NOP);
-#endif
-#ifndef CONFIG_PIN_TLB_TEXT
-		mmu_patch_cmp_limit(&patch__itlbmiss_linmem_top, 0);
-#endif
+		if (!IS_ENABLED(CONFIG_PIN_TLB_IMMR))
+			patch_instruction_site(&patch__dtlbmiss_immr_jmp, PPC_INST_NOP);
+		if (!IS_ENABLED(CONFIG_PIN_TLB_TEXT))
+			mmu_patch_cmp_limit(&patch__itlbmiss_linmem_top, 0);
 	} else {
 		mapped = top & ~(LARGE_PAGE_SIZE_8M - 1);
 	}
-- 
2.13.3


^ permalink raw reply related

* Re: [PATCH v2 2/2] locking/rwsem: Optimize down_read_trylock()
From: Waiman Long @ 2019-02-13 15:33 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-ia64, Linux-sh list, Peter Zijlstra, Will Deacon,
	H. Peter Anvin, sparclinux, linux-arch, Davidlohr Bueso,
	linux-hexagon, the arch/x86 maintainers, Linus Torvalds,
	Ingo Molnar, linux-xtensa, Arnd Bergmann, Borislav Petkov,
	Thomas Gleixner, linux-arm-kernel, linuxppc-dev,
	Linux List Kernel Mailing, linux-alpha, Andrew Morton, Tim Chen
In-Reply-To: <20190213074544.GB62549@gmail.com>

On 02/13/2019 02:45 AM, Ingo Molnar wrote:
> * Waiman Long <longman@redhat.com> wrote:
>
>> I looked at the assembly code in arch/x86/include/asm/rwsem.h. For both
>> trylocks (read & write), the count is read first before attempting to
>> lock it. We did the same for all trylock functions in other locks.
>> Depending on how the trylock is used and how contended the lock is, it
>> may help or hurt performance. Changing down_read_trylock to do an
>> unconditional cmpxchg will change the performance profile of existing
>> code. So I would prefer keeping the current code.
>>
>> I do notice now that the generic down_write_trylock() code is doing an
>> unconditional compxchg. So I wonder if we should change it to read the
>> lock first like other trylocks or just leave it as it is.
> No, I think we should instead move the other trylocks to the 
> try-for-ownership model as well, like Linus suggested.
>
> That's the general assumption we make in locking primitives, that we 
> optimize for the common, expected case - which would be that the trylock 
> succeeds, and I don't see why trylock primitives should be different.
>
> In fact I can see more ways for read-for-sharing to perform suboptimally 
> on larger systems.

I don't mind changing to the try-for-ownership model for rwsem and
mutex. I do have some concern to do that for spinlock. Some of the lock
slowpath code do optimistic trylock. Making them unconditional cmpxchg
will impact lock contention performance.

I will update this rwsem patch to make the change while I am working on
it. For other locks, I will suggest we go slow and carefully evaluate
the performance implication before we make the changes.

Cheers,
Longman



^ permalink raw reply

* Re: Kernel panic when loading the IDE controller driver
From: Christophe Leroy @ 2019-02-13 15:27 UTC (permalink / raw)
  To: sgosavi1, linuxppc-dev, Bartlomiej Zolnierkiewicz
In-Reply-To: <1550062386389-0.post@n7.nabble.com>



Le 13/02/2019 à 13:53, sgosavi1 a écrit :
>> Why using 4.15.13 which is obsolete instead of using one of the Long
>> Term Support versions which are still maintained, like 4.14 or 4.19 ?
>> (see the complete list at https://www.kernel.org/category/releases.html)
> 
> Well, when I started this task 4.15.13 was probably the latest stable
> release and hence we decided to port this version. In the older kernel, we
> have the m8260_setup.c source file for our board where the function
> "io_block_mapping" was used to configure the non-standard IO port address
> starting at 0xe0000000 location. This address was passed as the base address
> followed by control address and IRQ number to the ide-core.ko module. In the
> new kernel we do not have an option to send these addresses and IRQ numbers
> as arguments to the driver. Instead the ide-generic.c source file in the new
> kernel uses the standard IO port values and IRQ values. I modified the code
> in the above file to used the addresses and IRQ number we used in the past.
> Also, added code in the "MMU_init" function call available under
> arch/PowerPC/init_32.c to setup the IO port address range by adding the
> "io_block_mapping" call and the required IO port address range.
> 
> Is there anything else that needs to be added or how can we configure the
> desired IO address range in the new kernel?
> 

Maybe look around 
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=9a0e77f28b50128df0c9e26ae489e44e29a7270a

Also look at ide_platform.c. I imagine there must be some way to set it 
up in your device tree.

Maybe Bartlomiej Zolnierkiewicz can help ?

Christophe

^ permalink raw reply

* Re: [PATCH v3 2/2] mm: be more verbose about zonelist initialization
From: Michal Hocko @ 2019-02-13 13:41 UTC (permalink / raw)
  To: Peter Zijlstra
  Cc: Tony Luck, linux-ia64, Dave Hansen, x86, LKML, Pingfan Liu,
	linux-mm, Ingo Molnar, linuxppc-dev
In-Reply-To: <20190213131131.GS32494@hirez.programming.kicks-ass.net>

On Wed 13-02-19 14:11:31, Peter Zijlstra wrote:
> On Wed, Feb 13, 2019 at 12:50:14PM +0100, Michal Hocko wrote:
> > On Wed 13-02-19 11:32:31, Peter Zijlstra wrote:
> > > On Wed, Feb 13, 2019 at 10:43:15AM +0100, Michal Hocko wrote:
> > > > @@ -5259,6 +5261,11 @@ static void build_zonelists(pg_data_t *pgdat)
> > > >  
> > > >  	build_zonelists_in_node_order(pgdat, node_order, nr_nodes);
> > > >  	build_thisnode_zonelists(pgdat);
> > > > +
> > > > +	pr_info("node[%d] zonelist: ", pgdat->node_id);
> > > > +	for_each_zone_zonelist(zone, z, &pgdat->node_zonelists[ZONELIST_FALLBACK], MAX_NR_ZONES-1)
> > > > +		pr_cont("%d:%s ", zone_to_nid(zone), zone->name);
> > > > +	pr_cont("\n");
> > > >  }
> > > 
> > > Have you ran this by the SGI and other stupid large machine vendors?
> > 
> > I do not have such a large machine handy. The biggest I have has
> > handfull (say dozen) of NUMA nodes.
> > 
> > > Traditionally they tend to want to remove such things instead of adding
> > > them.
> > 
> > I do not insist on this patch but I find it handy. If there is an
> > opposition I will not miss it much.
> 
> Well, I don't have machines like that either and don't mind the patch.
> Just raising the issue; I've had the big iron boys complain about
> similar things (typically printing something for every CPU, which gets
> out of hand much faster than zones, but still).

Maybe we can try to push this through and revert if somebody complains
about an excessive output.

-- 
Michal Hocko
SUSE Labs

^ permalink raw reply

* Re: [PATCH v3 2/2] drivers/mtd: Fix device registration error
From: Boris Brezillon @ 2019-02-13 13:28 UTC (permalink / raw)
  To: Aneesh Kumar K.V; +Cc: linuxppc-dev, Alban Bedel, linux-mtd
In-Reply-To: <20190211133338.30399-2-aneesh.kumar@linux.ibm.com>

Subject prefix should be "mtd: powernv_flash: "

On Mon, 11 Feb 2019 19:03:38 +0530
"Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com> wrote:

> This change helps me to get multiple mtd device registered. Without this
> I get
> 
> sysfs: cannot create duplicate filename '/bus/nvmem/devices/flash0'
> CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.0.0-rc2-00557-g1ef20ef21f22 #13
> Call Trace:
> [c0000000b38e3220] [c000000000b58fe4] dump_stack+0xe8/0x164 (unreliable)
> [c0000000b38e3270] [c0000000004cf074] sysfs_warn_dup+0x84/0xb0
> [c0000000b38e32f0] [c0000000004cf6c4] sysfs_do_create_link_sd.isra.0+0x114/0x150
> [c0000000b38e3340] [c000000000726a84] bus_add_device+0x94/0x1e0
> [c0000000b38e33c0] [c0000000007218f0] device_add+0x4d0/0x830
> [c0000000b38e3480] [c0000000009d54a8] nvmem_register.part.2+0x1c8/0xb30
> [c0000000b38e3560] [c000000000834530] mtd_nvmem_add+0x90/0x120
> [c0000000b38e3650] [c000000000835bc8] add_mtd_device+0x198/0x4e0
> [c0000000b38e36f0] [c00000000083619c] mtd_device_parse_register+0x11c/0x280
> [c0000000b38e3780] [c000000000840830] powernv_flash_probe+0x180/0x250
> [c0000000b38e3820] [c00000000072c120] platform_drv_probe+0x60/0xf0
> [c0000000b38e38a0] [c0000000007283c8] really_probe+0x138/0x4d0
> [c0000000b38e3930] [c000000000728acc] driver_probe_device+0x13c/0x1b0
> [c0000000b38e39b0] [c000000000728c7c] __driver_attach+0x13c/0x1c0
> [c0000000b38e3a30] [c000000000725130] bus_for_each_dev+0xa0/0x120
> [c0000000b38e3a90] [c000000000727b2c] driver_attach+0x2c/0x40
> [c0000000b38e3ab0] [c0000000007270f8] bus_add_driver+0x228/0x360
> [c0000000b38e3b40] [c00000000072a2e0] driver_register+0x90/0x1a0
> [c0000000b38e3bb0] [c00000000072c020] __platform_driver_register+0x50/0x70
> [c0000000b38e3bd0] [c00000000105c984] powernv_flash_driver_init+0x24/0x38
> [c0000000b38e3bf0] [c000000000010904] do_one_initcall+0x84/0x464
> [c0000000b38e3cd0] [c000000001004548] kernel_init_freeable+0x530/0x634
> [c0000000b38e3db0] [c000000000011154] kernel_init+0x1c/0x168
> [c0000000b38e3e20] [c00000000000bed4] ret_from_kernel_thread+0x5c/0x68
> mtd mtd1: Failed to register NVMEM device
> 
> With the change we now have
> 
> root@(none):/sys/bus/nvmem/devices# ls -al
> total 0
> drwxr-xr-x 2 root root 0 Feb  6 20:49 .
> drwxr-xr-x 4 root root 0 Feb  6 20:49 ..
> lrwxrwxrwx 1 root root 0 Feb  6 20:49 flash@0 -> ../../../devices/platform/ibm,opal:flash@0/mtd/mtd0/flash@0
> lrwxrwxrwx 1 root root 0 Feb  6 20:49 flash@1 -> ../../../devices/platform/ibm,opal:flash@1/mtd/mtd1/flash@1
> 
> Fixes: acfe63ec1c59 ("mtd: Convert to using %pOFn instead of device_node.name")

Actually it's not this commit that is at fault as mtd->name was already
given the value of device_node->name before that. I think you're
actually fixing 1cbb4a1c433a ("mtd: powernv: Add powernv flash MTD
abstraction driver").

No need to send a new version, I can fix that when applying, just let
me know if you're okay with the changes I suggested.

> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
> ---
>  drivers/mtd/devices/powernv_flash.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/mtd/devices/powernv_flash.c b/drivers/mtd/devices/powernv_flash.c
> index 22f753e555ac..83f88b8b5d9f 100644
> --- a/drivers/mtd/devices/powernv_flash.c
> +++ b/drivers/mtd/devices/powernv_flash.c
> @@ -212,7 +212,7 @@ static int powernv_flash_set_driver_info(struct device *dev,
>  	 * Going to have to check what details I need to set and how to
>  	 * get them
>  	 */
> -	mtd->name = devm_kasprintf(dev, GFP_KERNEL, "%pOFn", dev->of_node);
> +	mtd->name = devm_kasprintf(dev, GFP_KERNEL, "%pOFP", dev->of_node);
>  	mtd->type = MTD_NORFLASH;
>  	mtd->flags = MTD_WRITEABLE;
>  	mtd->size = size;


^ permalink raw reply

* Re: [PATCH v3 2/2] mm: be more verbose about zonelist initialization
From: Peter Zijlstra @ 2019-02-13 13:11 UTC (permalink / raw)
  To: Michal Hocko
  Cc: Tony Luck, linux-ia64, Dave Hansen, x86, LKML, Pingfan Liu,
	linux-mm, Ingo Molnar, linuxppc-dev
In-Reply-To: <20190213115014.GC4525@dhcp22.suse.cz>

On Wed, Feb 13, 2019 at 12:50:14PM +0100, Michal Hocko wrote:
> On Wed 13-02-19 11:32:31, Peter Zijlstra wrote:
> > On Wed, Feb 13, 2019 at 10:43:15AM +0100, Michal Hocko wrote:
> > > @@ -5259,6 +5261,11 @@ static void build_zonelists(pg_data_t *pgdat)
> > >  
> > >  	build_zonelists_in_node_order(pgdat, node_order, nr_nodes);
> > >  	build_thisnode_zonelists(pgdat);
> > > +
> > > +	pr_info("node[%d] zonelist: ", pgdat->node_id);
> > > +	for_each_zone_zonelist(zone, z, &pgdat->node_zonelists[ZONELIST_FALLBACK], MAX_NR_ZONES-1)
> > > +		pr_cont("%d:%s ", zone_to_nid(zone), zone->name);
> > > +	pr_cont("\n");
> > >  }
> > 
> > Have you ran this by the SGI and other stupid large machine vendors?
> 
> I do not have such a large machine handy. The biggest I have has
> handfull (say dozen) of NUMA nodes.
> 
> > Traditionally they tend to want to remove such things instead of adding
> > them.
> 
> I do not insist on this patch but I find it handy. If there is an
> opposition I will not miss it much.

Well, I don't have machines like that either and don't mind the patch.
Just raising the issue; I've had the big iron boys complain about
similar things (typically printing something for every CPU, which gets
out of hand much faster than zones, but still).

^ permalink raw reply

* Re: Kernel panic when loading the IDE controller driver
From: sgosavi1 @ 2019-02-13 12:53 UTC (permalink / raw)
  To: linuxppc-dev
In-Reply-To: <558c15bc-75d0-d02a-8a78-8155838b8809@c-s.fr>

> Why using 4.15.13 which is obsolete instead of using one of the Long 
> Term Support versions which are still maintained, like 4.14 or 4.19 ? 
> (see the complete list at https://www.kernel.org/category/releases.html)

Well, when I started this task 4.15.13 was probably the latest stable
release and hence we decided to port this version. In the older kernel, we
have the m8260_setup.c source file for our board where the function
"io_block_mapping" was used to configure the non-standard IO port address
starting at 0xe0000000 location. This address was passed as the base address
followed by control address and IRQ number to the ide-core.ko module. In the
new kernel we do not have an option to send these addresses and IRQ numbers
as arguments to the driver. Instead the ide-generic.c source file in the new
kernel uses the standard IO port values and IRQ values. I modified the code
in the above file to used the addresses and IRQ number we used in the past.
Also, added code in the "MMU_init" function call available under
arch/PowerPC/init_32.c to setup the IO port address range by adding the
"io_block_mapping" call and the required IO port address range.

Is there anything else that needs to be added or how can we configure the
desired IO address range in the new kernel?

Thanks,
Sachin



--
Sent from: http://linuxppc.10917.n7.nabble.com/linuxppc-dev-f3.html

^ permalink raw reply

* Re: [PATCH] mmap.2: describe the 5level paging hack
From: Will Deacon @ 2019-02-13 12:48 UTC (permalink / raw)
  To: Jann Horn
  Cc: linux-arch, linux-man, Catalin Marinas, Dave Hansen,
	Peter Zijlstra, linuxppc-dev, Andy Lutomirski, linux-mm,
	Paul Mackerras, mtk.manpages, Andrew Morton, linux-api,
	Linus Torvalds, Thomas Gleixner, Kirill A . Shutemov,
	linux-arm-kernel
In-Reply-To: <20190211163653.97742-1-jannh@google.com>

Hi Jann,

On Mon, Feb 11, 2019 at 05:36:53PM +0100, Jann Horn wrote:
> The manpage is missing information about the compatibility hack for
> 5-level paging that went in in 4.14, around commit ee00f4a32a76 ("x86/mm:
> Allow userspace have mappings above 47-bit"). Add some information about
> that.
> 
> While I don't think any hardware supporting this is shipping yet (?), I
> think it's useful to try to write a manpage for this API, partly to
> figure out how usable that API actually is, and partly because when this
> hardware does ship, it'd be nice if distro manpages had information about
> how to use it.
> 
> Signed-off-by: Jann Horn <jannh@google.com>
> ---
> This patch goes on top of the patch "[PATCH] mmap.2: fix description of
> treatment of the hint" that I just sent, but I'm not sending them in a
> series because I want the first one to go in, and I think this one might
> be a bit more controversial.
> 
> It would be nice if the architecture maintainers and mm folks could have
> a look at this and check that what I wrote is right - I only looked at
> the source for this, I haven't tried it.
> 
>  man2/mmap.2 | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)
> 
> diff --git a/man2/mmap.2 b/man2/mmap.2
> index 8556bbfeb..977782fa8 100644
> --- a/man2/mmap.2
> +++ b/man2/mmap.2
> @@ -67,6 +67,8 @@ is NULL,
>  then the kernel chooses the (page-aligned) address
>  at which to create the mapping;
>  this is the most portable method of creating a new mapping.
> +On Linux, in this case, the kernel may limit the maximum address that can be
> +used for allocations to a legacy limit for compatibility reasons.
>  If
>  .I addr
>  is not NULL,
> @@ -77,6 +79,19 @@ or equal to the value specified by
>  and attempt to create the mapping there.
>  If another mapping already exists there, the kernel picks a new
>  address, independent of the hint.
> +However, if a hint above the architecture's legacy address limit is provided
> +(on x86-64: above 0x7ffffffff000, on arm64: above 0x1000000000000, on ppc64 with
> +book3s: above 0x7fffffffffff or 0x3fffffffffff, depending on page size), the
> +kernel is permitted to allocate mappings beyond the architecture's legacy
> +address limit.

On arm64 we support 36-bit, 39-bit, 42-bit, 47-bit, 48-bit and 52-bit user
virtual addresses, some of which also enforce a particular page size of 4k,
16k or 64k. With the exception of 52-bit, the user virtual address size is
fixed at compile time and mmap() can allocate up to the maximum address
size.

When 52-bit virtual addressing is configured, we continue to allocate up to
48 bits unless either a hint is passed to mmap() as you describe, or
CONFIG_ARM64_FORCE_52BIT=y (this is really intended as a debug option and is
hidden behind EXPERT as well as being off by default).

One thing that just occurred to me is that our ASLR code is probably pretty
weak for addresses greater than 48 bits because I don't think it was updated
when we added 52-bit support. I'll take a deeper look when I get some time.

Will

^ permalink raw reply

* Re: Kernel panic when loading the IDE controller driver
From: Christophe Leroy @ 2019-02-13 12:31 UTC (permalink / raw)
  To: sgosavi1, linuxppc-dev
In-Reply-To: <1550060685213-0.post@n7.nabble.com>



Le 13/02/2019 à 13:24, sgosavi1 a écrit :
>> What it the last linux version known to work properly?
> 
> 
> We have used it successfully in the Linux-2.6.17.6 version.

Oh, ok, there's a big gap between the two versions.

Why using 4.15.13 which is obsolete instead of using one of the Long 
Term Support versions which are still maintained, like 4.14 or 4.19 ? 
(see the complete list at https://www.kernel.org/category/releases.html)

Christophe

> 
> 
> Thanks,
> Sachin.
> 
> 
> 
> --
> Sent from: http://linuxppc.10917.n7.nabble.com/linuxppc-dev-f3.html
> 

^ permalink raw reply

* Re: Kernel panic when loading the IDE controller driver
From: sgosavi1 @ 2019-02-13 12:24 UTC (permalink / raw)
  To: linuxppc-dev
In-Reply-To: <7c695098-8b2b-5af0-c961-f25457459f8e@c-s.fr>

> What it the last linux version known to work properly?


We have used it successfully in the Linux-2.6.17.6 version. 


Thanks,
Sachin.



--
Sent from: http://linuxppc.10917.n7.nabble.com/linuxppc-dev-f3.html

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox