lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080108192425.GB26491@uranus.ravnborg.org>
Date:	Tue, 8 Jan 2008 20:24:25 +0100
From:	Sam Ravnborg <sam@...nborg.org>
To:	travis@....com
Cc:	mingo@...e.hu, Andrew Morton <akpm@...ux-foundation.org>,
	Andi Kleen <ak@...e.de>, Christoph Lameter <clameter@....com>,
	Jack Steiner <steiner@....com>, linux-mm@...ck.org,
	linux-kernel@...r.kernel.org, Rusty Russell <rusty@...tcorp.com.au>
Subject: Re: [PATCH 01/10] percpu: Use a kconfig variable to signal arch specific percpu setup

On Mon, Jan 07, 2008 at 06:11:43PM -0800, travis@....com 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@...tcorp.com.au>
> Cc: Andi Kleen <ak@...e.de>
> Signed-off-by: Christoph Lameter <clameter@....com>
> Signed-off-by: Mike Travis <travis@....com>
> 
> ---
>  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@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ