Re: [PATCH 08/11] lib: consolidate the GENERIC_BUG symbol
From: Masahiro Yamada <hidden>
Date: 2019-02-15 08:43:32
Also in:
linux-kbuild, linux-riscv, linux-s390, lkml
On Thu, Feb 14, 2019 at 2:40 AM Christoph Hellwig [off-list ref] wrote:
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>
This slightly changes the behavior of GENERIC_BUG_RELATIVE_POINTERS for arm64, riscv, x86. Previously, GENERIC_BUG_RELATIVE_POINTERS was enabled only when BUG=y. Having said that, this is not a big deal. When CONFIG_GENERIC_BUG=n, CONFIG_GENERIC_BUG_RELATIVE_POINTERS is actually don't care. If you change this, could you add some comments in commit description?
---
quoted hunk ↗ jump to hunk
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
Precisely,
select GENERIC_BUG_RELATIVE_POINTERS if BUG
quoted hunk ↗ jump to hunk
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
Precisely,
select GENERIC_BUG_RELATIVE_POINTERS if 64BIT && BUG
quoted hunk ↗ jump to hunk
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 -
Hmm, s390 enables GENERIC_BUG_RELATIVE_POINTERS irrespective of BUG...
quoted hunk ↗ jump to hunk
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
Precisely,
select GENERIC_BUG_RELATIVE_POINTERS if X86_64 && BUG
--
Best Regards
Masahiro Yamada