Re: [PATCH 01/10] percpu: Use a kconfig variable to signal arch specific percpu setup

From: Sam Ravnborg
Date: Tue Jan 08 2008 - 14:24:38 EST


On Mon, Jan 07, 2008 at 06:11:43PM -0800, travis@xxxxxxx wrote:
> V1->V2:
> - Use def_bool as suggested by Randy.
>
> The use of the __GENERIC_PERCPU is a bit problematic since arches
> may want to run their own percpu setup while using the generic
> percpu definitions. Replace it through a kconfig variable.
>
>
>
> Cc: Rusty Russell <rusty@xxxxxxxxxxxxxxx>
> Cc: Andi Kleen <ak@xxxxxxx>
> Signed-off-by: Christoph Lameter <clameter@xxxxxxx>
> Signed-off-by: Mike Travis <travis@xxxxxxx>
>
> ---
> arch/ia64/Kconfig | 3 +++
> arch/powerpc/Kconfig | 3 +++
> arch/sparc64/Kconfig | 3 +++
> arch/x86/Kconfig | 3 +++
> include/asm-generic/percpu.h | 1 -
> include/asm-s390/percpu.h | 2 --
> include/asm-x86/percpu_32.h | 2 --
> init/main.c | 4 ++--
> 8 files changed, 14 insertions(+), 7 deletions(-)
>
> --- a/arch/ia64/Kconfig
> +++ b/arch/ia64/Kconfig
> @@ -80,6 +80,9 @@ config GENERIC_TIME_VSYSCALL
> bool
> default y
>
> +config ARCH_SETS_UP_PER_CPU_AREA
> + def_bool y
> +
> config DMI
> bool
> default y
> --- a/arch/powerpc/Kconfig
> +++ b/arch/powerpc/Kconfig
> @@ -42,6 +42,9 @@ config GENERIC_HARDIRQS
> bool
> default y
>
> +config ARCH_SETS_UP_PER_CPU_AREA
> + def_bool PPC64
> +
> config IRQ_PER_CPU
> bool
> default y

Please do not create one variable per arch to enable this functionality.
Define one common variable and name it:
config HAVE_SETUP_PER_CPU_AREA

and then for the arch's that supports it you select this symbol.
For X86 it would look like:

config X86
+ select HAVE_SETUP_PER_CPU_AREA


This is the recommended methiond today - albeit not widely used yet.

Sam
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/