Messages in this thread | | | Subject | Re: [RFC PATCH 5/7] arm64: smp: use generic SMP stop common code | From | Cristian Marussi <> | Date | Mon, 26 Aug 2019 20:58:01 +0100 |
| |
Hi
On 8/26/19 4:32 PM, Christoph Hellwig wrote: >> +config ARCH_USE_COMMON_SMP_STOP >> + def_bool y if SMP > > The option belongs into common code and the arch code shoud only > select it. >
In fact that was my first approach, but then I noticed that in kernel/ topdir there was no generic Kconfig but only subsystem specific ones:
Kconfig.freezer Kconfig.hz Kconfig.locks Kconfig.preempt
while instead looking into archs top level Kconfig, beside the usual arch/Kconfig selects, I could find this similar sort of "reversed" approach in which the arch defined and selected a CONFIG which was indeed then used only in common code like in:
20:37 $ egrep -R ARCH_HAS_CACHE_LINE_SIZE . ./arch/arc/Kconfig:config ARCH_HAS_CACHE_LINE_SIZE ./arch/x86/Kconfig:config ARCH_HAS_CACHE_LINE_SIZE ./arch/arm64/Kconfig:config ARCH_HAS_CACHE_LINE_SIZE ./include/linux/cache.h:#ifndef CONFIG_ARCH_HAS_CACHE_LINE_SIZE
20:39 $ egrep -R ARCH_HAS_KEXEC_PURGATORY . ./arch/powerpc/Kconfig:config ARCH_HAS_KEXEC_PURGATORY ./arch/x86/Kconfig:config ARCH_HAS_KEXEC_PURGATORY ./arch/s390/Kconfig:config ARCH_HAS_KEXEC_PURGATORY ./arch/s390/purgatory/Makefile:obj-$(CONFIG_ARCH_HAS_KEXEC_PURGATORY) += kexec-purgatory.o ./arch/s390/Kbuild:obj-$(CONFIG_ARCH_HAS_KEXEC_PURGATORY) += purgatory/ ./kernel/kexec_file.c: if (!IS_ENABLED(CONFIG_ARCH_HAS_KEXEC_PURGATORY))
so I thought it was an acceptable option and I went for it, not to introduce a new kernel/Kconfig.smp just for this new config option; but in fact I could have missed the real reason underlying these two different choices.
Thanks
Cristian
| |