LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* Re: x86/non-x86: percpu, node ids, apic ids x86.git fixup
       [not found] <200801301414.m0UEEgCC006371@hera.kernel.org>
@ 2008-01-30 15:27 ` Geert Uytterhoeven
  2008-01-30 16:02   ` Mike Travis
  0 siblings, 1 reply; 35+ messages in thread
From: Geert Uytterhoeven @ 2008-01-30 15:27 UTC (permalink / raw)
  To: Linus Torvalds, Ingo Molnar, Thomas Gleixner, Mike Travis
  Cc: Linux Kernel Development, Linux/PPC Development, linux-ia64, sparclinux

[-- Attachment #1: Type: TEXT/PLAIN, Size: 4814 bytes --]

On Wed, 30 Jan 2008, Linux Kernel Mailing List wrote:
> Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=dd5af90a7f3d79e04b7eace9a98644dbf2038f4d
> Commit:     dd5af90a7f3d79e04b7eace9a98644dbf2038f4d
> Parent:     3212bff370c2f22e4987c6679ba485654cefb178
> Author:     Mike Travis <travis@sgi.com>
> AuthorDate: Wed Jan 30 13:33:32 2008 +0100
> Committer:  Ingo Molnar <mingo@elte.hu>
> CommitDate: Wed Jan 30 13:33:32 2008 +0100
> 
>     x86/non-x86: percpu, node ids, apic ids x86.git fixup
>     
>     Signed-off-by: Ingo Molnar <mingo@elte.hu>
>     Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> ---
>  arch/x86/Kconfig             |    2 +-
>  include/asm-generic/percpu.h |   12 ++----------
>  init/main.c                  |    4 ++--
>  kernel/module.c              |    8 ++++++++

This broke powerpc (and presumably ia64 and sparc64) in current linux-2.6.git:

| init/main.c:376: error: static declaration of 'setup_per_cpu_areas' follows non-static declaration
| include2/asm/percpu.h:33: error: previous declaration of 'setup_per_cpu_areas' was here

as the generic and x86-specific parts were integrated, while the
powerpc/ia64/sparc64-specific parts are still missing.

>  4 files changed, 13 insertions(+), 13 deletions(-)
> 
> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
> index f0887d1..8e1b33c 100644
> --- a/arch/x86/Kconfig
> +++ b/arch/x86/Kconfig
> @@ -97,7 +97,7 @@ config GENERIC_TIME_VSYSCALL
>  	bool
>  	default X86_64
>  
> -config ARCH_SETS_UP_PER_CPU_AREA
> +config HAVE_SETUP_PER_CPU_AREA
>  	def_bool X86_64
>  
>  config ARCH_SUPPORTS_OPROFILE
> diff --git a/include/asm-generic/percpu.h b/include/asm-generic/percpu.h
> index c41b1a7..4b8d31c 100644
> --- a/include/asm-generic/percpu.h
> +++ b/include/asm-generic/percpu.h
> @@ -47,7 +47,7 @@ extern unsigned long __per_cpu_offset[NR_CPUS];
>  #endif
>  
>  /*
> - * A percpu variable may point to a discarded reghions. The following are
> + * A percpu variable may point to a discarded regions. The following are
>   * established ways to produce a usable pointer from the percpu variable
>   * offset.
>   */
> @@ -59,18 +59,10 @@ extern unsigned long __per_cpu_offset[NR_CPUS];
>  	(*SHIFT_PERCPU_PTR(&per_cpu_var(var), __my_cpu_offset))
>  
>  
> -#ifdef CONFIG_ARCH_SETS_UP_PER_CPU_AREA
> +#ifdef CONFIG_HAVE_SETUP_PER_CPU_AREA
>  extern void setup_per_cpu_areas(void);
>  #endif
>  
> -/* A macro to avoid #include hell... */
> -#define percpu_modcopy(pcpudst, src, size)			\
> -do {								\
> -	unsigned int __i;					\
> -	for_each_possible_cpu(__i)				\
> -		memcpy((pcpudst)+per_cpu_offset(__i),		\
> -		       (src), (size));				\
> -} while (0)
>  #else /* ! SMP */
>  
>  #define per_cpu(var, cpu)			(*((void)(cpu), &per_cpu_var(var)))
> diff --git a/init/main.c b/init/main.c
> index 5843fe9..3316dff 100644
> --- a/init/main.c
> +++ b/init/main.c
> @@ -363,7 +363,7 @@ static inline void smp_prepare_cpus(unsigned int maxcpus) { }
>  
>  #else
>  
> -#ifndef CONFIG_ARCH_SETS_UP_PER_CPU_AREA
> +#ifndef CONFIG_HAVE_SETUP_PER_CPU_AREA
>  unsigned long __per_cpu_offset[NR_CPUS] __read_mostly;
>  
>  EXPORT_SYMBOL(__per_cpu_offset);
> @@ -384,7 +384,7 @@ static void __init setup_per_cpu_areas(void)
>  		ptr += size;
>  	}
>  }
> -#endif /* CONFIG_ARCH_SETS_UP_CPU_AREA */
> +#endif /* CONFIG_HAVE_SETUP_PER_CPU_AREA */
>  
>  /* Called by boot processor to activate the rest. */
>  static void __init smp_init(void)
> diff --git a/kernel/module.c b/kernel/module.c
> index f6a4e72..bd60278 100644
> --- a/kernel/module.c
> +++ b/kernel/module.c
> @@ -430,6 +430,14 @@ static unsigned int find_pcpusec(Elf_Ehdr *hdr,
>  	return find_sec(hdr, sechdrs, secstrings, ".data.percpu");
>  }
>  
> +static void percpu_modcopy(void *pcpudest, const void *from, unsigned long size)
> +{
> +	int cpu;
> +
> +	for_each_possible_cpu(cpu)
> +		memcpy(pcpudest + per_cpu_offset(cpu), from, size);
> +}
> +
>  static int percpu_modinit(void)
>  {
>  	pcpu_num_used = 2;
> -
> To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

With kind regards,

Geert Uytterhoeven
Software Architect

Sony Network and Software Technology Center Europe
The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium

Phone:    +32 (0)2 700 8453
Fax:      +32 (0)2 700 8622
E-mail:   Geert.Uytterhoeven@sonycom.com
Internet: http://www.sony-europe.com/

Sony Network and Software Technology Center Europe
A division of Sony Service Centre (Europe) N.V.
Registered office: Technologielaan 7 · B-1840 Londerzeel · Belgium
VAT BE 0413.825.160 · RPR Brussels
Fortis Bank Zaventem · Swift GEBABEBB08A · IBAN BE39001382358619

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: x86/non-x86: percpu, node ids, apic ids x86.git fixup
  2008-01-30 15:27 ` x86/non-x86: percpu, node ids, apic ids x86.git fixup Geert Uytterhoeven
@ 2008-01-30 16:02   ` Mike Travis
  2008-01-30 16:10     ` Ingo Molnar
  0 siblings, 1 reply; 35+ messages in thread
From: Mike Travis @ 2008-01-30 16:02 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Linus Torvalds, Ingo Molnar, Thomas Gleixner,
	Linux Kernel Development, Linux/PPC Development, linux-ia64,
	sparclinux

Geert Uytterhoeven wrote:
> On Wed, 30 Jan 2008, Linux Kernel Mailing List wrote:
>> Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=dd5af90a7f3d79e04b7eace9a98644dbf2038f4d
>> Commit:     dd5af90a7f3d79e04b7eace9a98644dbf2038f4d
>> Parent:     3212bff370c2f22e4987c6679ba485654cefb178
>> Author:     Mike Travis <travis@sgi.com>
>> AuthorDate: Wed Jan 30 13:33:32 2008 +0100
>> Committer:  Ingo Molnar <mingo@elte.hu>
>> CommitDate: Wed Jan 30 13:33:32 2008 +0100
>>
>>     x86/non-x86: percpu, node ids, apic ids x86.git fixup
>>     
>>     Signed-off-by: Ingo Molnar <mingo@elte.hu>
>>     Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
>> ---
>>  arch/x86/Kconfig             |    2 +-
>>  include/asm-generic/percpu.h |   12 ++----------
>>  init/main.c                  |    4 ++--
>>  kernel/module.c              |    8 ++++++++
> 
> This broke powerpc (and presumably ia64 and sparc64) in current linux-2.6.git:

I'm generating a "fixup patch" right now... 

-Mike
> 
> | init/main.c:376: error: static declaration of 'setup_per_cpu_areas' follows non-static declaration
> | include2/asm/percpu.h:33: error: previous declaration of 'setup_per_cpu_areas' was here
> 
> as the generic and x86-specific parts were integrated, while the
> powerpc/ia64/sparc64-specific parts are still missing.
> 
>>  4 files changed, 13 insertions(+), 13 deletions(-)
>>
>> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
>> index f0887d1..8e1b33c 100644
>> --- a/arch/x86/Kconfig
>> +++ b/arch/x86/Kconfig
>> @@ -97,7 +97,7 @@ config GENERIC_TIME_VSYSCALL
>>  	bool
>>  	default X86_64
>>  
>> -config ARCH_SETS_UP_PER_CPU_AREA
>> +config HAVE_SETUP_PER_CPU_AREA
>>  	def_bool X86_64
>>  
>>  config ARCH_SUPPORTS_OPROFILE
>> diff --git a/include/asm-generic/percpu.h b/include/asm-generic/percpu.h
>> index c41b1a7..4b8d31c 100644
>> --- a/include/asm-generic/percpu.h
>> +++ b/include/asm-generic/percpu.h
>> @@ -47,7 +47,7 @@ extern unsigned long __per_cpu_offset[NR_CPUS];
>>  #endif
>>  
>>  /*
>> - * A percpu variable may point to a discarded reghions. The following are
>> + * A percpu variable may point to a discarded regions. The following are
>>   * established ways to produce a usable pointer from the percpu variable
>>   * offset.
>>   */
>> @@ -59,18 +59,10 @@ extern unsigned long __per_cpu_offset[NR_CPUS];
>>  	(*SHIFT_PERCPU_PTR(&per_cpu_var(var), __my_cpu_offset))
>>  
>>  
>> -#ifdef CONFIG_ARCH_SETS_UP_PER_CPU_AREA
>> +#ifdef CONFIG_HAVE_SETUP_PER_CPU_AREA
>>  extern void setup_per_cpu_areas(void);
>>  #endif
>>  
>> -/* A macro to avoid #include hell... */
>> -#define percpu_modcopy(pcpudst, src, size)			\
>> -do {								\
>> -	unsigned int __i;					\
>> -	for_each_possible_cpu(__i)				\
>> -		memcpy((pcpudst)+per_cpu_offset(__i),		\
>> -		       (src), (size));				\
>> -} while (0)
>>  #else /* ! SMP */
>>  
>>  #define per_cpu(var, cpu)			(*((void)(cpu), &per_cpu_var(var)))
>> diff --git a/init/main.c b/init/main.c
>> index 5843fe9..3316dff 100644
>> --- a/init/main.c
>> +++ b/init/main.c
>> @@ -363,7 +363,7 @@ static inline void smp_prepare_cpus(unsigned int maxcpus) { }
>>  
>>  #else
>>  
>> -#ifndef CONFIG_ARCH_SETS_UP_PER_CPU_AREA
>> +#ifndef CONFIG_HAVE_SETUP_PER_CPU_AREA
>>  unsigned long __per_cpu_offset[NR_CPUS] __read_mostly;
>>  
>>  EXPORT_SYMBOL(__per_cpu_offset);
>> @@ -384,7 +384,7 @@ static void __init setup_per_cpu_areas(void)
>>  		ptr += size;
>>  	}
>>  }
>> -#endif /* CONFIG_ARCH_SETS_UP_CPU_AREA */
>> +#endif /* CONFIG_HAVE_SETUP_PER_CPU_AREA */
>>  
>>  /* Called by boot processor to activate the rest. */
>>  static void __init smp_init(void)
>> diff --git a/kernel/module.c b/kernel/module.c
>> index f6a4e72..bd60278 100644
>> --- a/kernel/module.c
>> +++ b/kernel/module.c
>> @@ -430,6 +430,14 @@ static unsigned int find_pcpusec(Elf_Ehdr *hdr,
>>  	return find_sec(hdr, sechdrs, secstrings, ".data.percpu");
>>  }
>>  
>> +static void percpu_modcopy(void *pcpudest, const void *from, unsigned long size)
>> +{
>> +	int cpu;
>> +
>> +	for_each_possible_cpu(cpu)
>> +		memcpy(pcpudest + per_cpu_offset(cpu), from, size);
>> +}
>> +
>>  static int percpu_modinit(void)
>>  {
>>  	pcpu_num_used = 2;
>> -
>> To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>
> 
> With kind regards,
> 
> Geert Uytterhoeven
> Software Architect
> 
> Sony Network and Software Technology Center Europe
> The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium
> 
> Phone:    +32 (0)2 700 8453
> Fax:      +32 (0)2 700 8622
> E-mail:   Geert.Uytterhoeven@sonycom.com
> Internet: http://www.sony-europe.com/
> 
> Sony Network and Software Technology Center Europe
> A division of Sony Service Centre (Europe) N.V.
> Registered office: Technologielaan 7 · B-1840 Londerzeel · Belgium
> VAT BE 0413.825.160 · RPR Brussels
> Fortis Bank Zaventem · Swift GEBABEBB08A · IBAN BE39001382358619


^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: x86/non-x86: percpu, node ids, apic ids x86.git fixup
  2008-01-30 16:02   ` Mike Travis
@ 2008-01-30 16:10     ` Ingo Molnar
  2008-01-30 17:13       ` Luck, Tony
  0 siblings, 1 reply; 35+ messages in thread
From: Ingo Molnar @ 2008-01-30 16:10 UTC (permalink / raw)
  To: Mike Travis
  Cc: Geert Uytterhoeven, Linus Torvalds, Thomas Gleixner,
	Linux Kernel Development, Linux/PPC Development, linux-ia64,
	sparclinux


* Mike Travis <travis@sgi.com> wrote:

> > This broke powerpc (and presumably ia64 and sparc64) in current 
> > linux-2.6.git:
> 
> I'm generating a "fixup patch" right now...

thanks! Sorry about that: we cross-built on ARM but not on SMP non-x86 
platforms so this dependency/breakage went unnoticed.

	Ingo

^ permalink raw reply	[flat|nested] 35+ messages in thread

* RE: x86/non-x86: percpu, node ids, apic ids x86.git fixup
  2008-01-30 16:10     ` Ingo Molnar
@ 2008-01-30 17:13       ` Luck, Tony
  2008-01-30 18:06         ` Ingo Molnar
  0 siblings, 1 reply; 35+ messages in thread
From: Luck, Tony @ 2008-01-30 17:13 UTC (permalink / raw)
  To: Ingo Molnar, Mike Travis
  Cc: Geert Uytterhoeven, Linus Torvalds, Thomas Gleixner,
	Linux Kernel Development, Linux/PPC Development, linux-ia64,
	sparclinux

> > > This broke powerpc (and presumably ia64 and sparc64) in current 
> > > linux-2.6.git:
> > 
> > I'm generating a "fixup patch" right now...
>
> thanks! Sorry about that: we cross-built on ARM but not on SMP non-x86 
> platforms so this dependency/breakage went unnoticed.

Yes ... all ia64 builds (UP and SMP) are broken at the moment. Please
Cc: me with the fixup patch.

Thanks

-Tony

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: x86/non-x86: percpu, node ids, apic ids x86.git fixup
  2008-01-30 17:13       ` Luck, Tony
@ 2008-01-30 18:06         ` Ingo Molnar
  2008-01-30 18:20           ` Mike Travis
                             ` (2 more replies)
  0 siblings, 3 replies; 35+ messages in thread
From: Ingo Molnar @ 2008-01-30 18:06 UTC (permalink / raw)
  To: Luck, Tony
  Cc: Mike Travis, Geert Uytterhoeven, Linus Torvalds, Thomas Gleixner,
	Linux Kernel Development, Linux/PPC Development, linux-ia64,
	sparclinux


* Luck, Tony <tony.luck@intel.com> wrote:

> > thanks! Sorry about that: we cross-built on ARM but not on SMP 
> > non-x86 platforms so this dependency/breakage went unnoticed.
> 
> Yes ... all ia64 builds (UP and SMP) are broken at the moment. Please 
> Cc: me with the fixup patch.

Could you check the patch below? With this applied to latest -git, ia64 
buils fine for me in a cross-compiling environment. (but i dont know 
whether it boots ...)

	Ingo

----------------->
Subject: generic: percpu infrastructure to rebase the per cpu area to zero
From: travis@sgi.com

    * Support an option

	CONFIG_HAVE_ZERO_BASED_PER_CPU

      that makes offsets for per cpu variables to start at zero.

      If a percpu area starts at zero then:

	-  We do not need RELOC_HIDE anymore

	-  Provides for the future capability of architectures providing
	   a per cpu allocator that returns offsets instead of pointers.
	   The offsets would be independent of the processor so that
	   address calculations can be done in a processor independent way.
	   Per cpu instructions can then add the processor specific offset
	   at the last minute possibly in an atomic instruction.

      The data the linker provides is different for zero based percpu segments:

	__per_cpu_load	-> The address at which the percpu area was loaded
	__per_cpu_size	-> The length of the per cpu area

    * Removes the &__per_cpu_x in lockdep. The __per_cpu_x are already
      pointers. There is no need to take the address.

    * Changes generic setup_per_cpu_areas to allocate per_cpu space in
      node local memory.  This requires a generic early_cpu_to_node function.

Signed-off-by: Mike Travis <travis@sgi.com>
Reviewed-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 arch/ia64/Kconfig                     |    2 -
 arch/ia64/kernel/module.c             |   11 --------
 arch/powerpc/Kconfig                  |    2 -
 arch/sparc64/mm/init.c                |    5 ++++
 include/asm-alpha/topology.h          |    1 
 include/asm-generic/percpu.h          |    7 ++++-
 include/asm-generic/sections.h        |   10 ++++++++
 include/asm-generic/topology.h        |    3 ++
 include/asm-generic/vmlinux.lds.h     |   15 ++++++++++++
 include/asm-ia64/percpu.h             |   29 +++++------------------
 include/asm-ia64/topology.h           |    1 
 include/asm-mips/mach-ip27/topology.h |    1 
 include/asm-powerpc/percpu.h          |   29 +----------------------
 include/asm-powerpc/topology.h        |    1 
 include/asm-s390/percpu.h             |   42 +++++++---------------------------
 include/asm-sparc64/percpu.h          |   22 ++---------------
 init/main.c                           |   18 ++++++++------
 kernel/lockdep.c                      |    4 +--
 18 files changed, 78 insertions(+), 125 deletions(-)

Index: linux-x86.q/arch/ia64/Kconfig
===================================================================
--- linux-x86.q.orig/arch/ia64/Kconfig
+++ linux-x86.q/arch/ia64/Kconfig
@@ -80,7 +80,7 @@ config GENERIC_TIME_VSYSCALL
 	bool
 	default y
 
-config ARCH_SETS_UP_PER_CPU_AREA
+config HAVE_SETUP_PER_CPU_AREA
 	def_bool y
 
 config DMI
Index: linux-x86.q/arch/ia64/kernel/module.c
===================================================================
--- linux-x86.q.orig/arch/ia64/kernel/module.c
+++ linux-x86.q/arch/ia64/kernel/module.c
@@ -940,14 +940,3 @@ module_arch_cleanup (struct module *mod)
 	if (mod->arch.core_unw_table)
 		unw_remove_unwind_table(mod->arch.core_unw_table);
 }
-
-#ifdef CONFIG_SMP
-void
-percpu_modcopy (void *pcpudst, const void *src, unsigned long size)
-{
-	unsigned int i;
-	for_each_possible_cpu(i) {
-		memcpy(pcpudst + per_cpu_offset(i), src, size);
-	}
-}
-#endif /* CONFIG_SMP */
Index: linux-x86.q/arch/powerpc/Kconfig
===================================================================
--- linux-x86.q.orig/arch/powerpc/Kconfig
+++ linux-x86.q/arch/powerpc/Kconfig
@@ -42,7 +42,7 @@ config GENERIC_HARDIRQS
 	bool
 	default y
 
-config ARCH_SETS_UP_PER_CPU_AREA
+config HAVE_SETUP_PER_CPU_AREA
 	def_bool PPC64
 
 config IRQ_PER_CPU
Index: linux-x86.q/arch/sparc64/mm/init.c
===================================================================
--- linux-x86.q.orig/arch/sparc64/mm/init.c
+++ linux-x86.q/arch/sparc64/mm/init.c
@@ -1328,6 +1328,11 @@ pgd_t swapper_pg_dir[2048];
 static void sun4u_pgprot_init(void);
 static void sun4v_pgprot_init(void);
 
+/* Dummy function */
+void __init setup_per_cpu_areas(void)
+{
+}
+
 void __init paging_init(void)
 {
 	unsigned long end_pfn, pages_avail, shift, phys_base;
Index: linux-x86.q/include/asm-alpha/topology.h
===================================================================
--- linux-x86.q.orig/include/asm-alpha/topology.h
+++ linux-x86.q/include/asm-alpha/topology.h
@@ -6,6 +6,7 @@
 #include <asm/machvec.h>
 
 #ifdef CONFIG_NUMA
+#define early_cpu_to_node(cpu)	cpu_to_node(cpu)
 static inline int cpu_to_node(int cpu)
 {
 	int node;
Index: linux-x86.q/include/asm-generic/percpu.h
===================================================================
--- linux-x86.q.orig/include/asm-generic/percpu.h
+++ linux-x86.q/include/asm-generic/percpu.h
@@ -43,7 +43,12 @@ extern unsigned long __per_cpu_offset[NR
  * Only S390 provides its own means of moving the pointer.
  */
 #ifndef SHIFT_PERCPU_PTR
-#define SHIFT_PERCPU_PTR(__p, __offset)	RELOC_HIDE((__p), (__offset))
+# ifdef CONFIG_HAVE_ZERO_BASED_PER_CPU
+#  define SHIFT_PERCPU_PTR(__p, __offset) \
+	((__typeof(__p))(((void *)(__p)) + (__offset)))
+# else
+#  define SHIFT_PERCPU_PTR(__p, __offset)	RELOC_HIDE((__p), (__offset))
+# endif /* CONFIG_HAVE_ZERO_BASED_PER_CPU */
 #endif
 
 /*
Index: linux-x86.q/include/asm-generic/sections.h
===================================================================
--- linux-x86.q.orig/include/asm-generic/sections.h
+++ linux-x86.q/include/asm-generic/sections.h
@@ -11,7 +11,17 @@ extern char _sinittext[], _einittext[];
 extern char _sextratext[] __attribute__((weak));
 extern char _eextratext[] __attribute__((weak));
 extern char _end[];
+#ifdef CONFIG_HAVE_ZERO_BASED_PER_CPU
+extern char __per_cpu_load[];
+extern char ____per_cpu_size[];
+#define __per_cpu_size ((unsigned long)&____per_cpu_size)
+#define __per_cpu_start ((char *)0)
+#define __per_cpu_end ((char *)__per_cpu_size)
+#else
 extern char __per_cpu_start[], __per_cpu_end[];
+#define __per_cpu_load __per_cpu_start
+#define __per_cpu_size (__per_cpu_end - __per_cpu_start)
+#endif
 extern char __kprobes_text_start[], __kprobes_text_end[];
 extern char __initdata_begin[], __initdata_end[];
 extern char __start_rodata[], __end_rodata[];
Index: linux-x86.q/include/asm-generic/topology.h
===================================================================
--- linux-x86.q.orig/include/asm-generic/topology.h
+++ linux-x86.q/include/asm-generic/topology.h
@@ -32,6 +32,9 @@
 #ifndef cpu_to_node
 #define cpu_to_node(cpu)	(0)
 #endif
+#ifndef early_cpu_to_node
+#define early_cpu_to_node(cpu)	cpu_to_node(cpu)
+#endif
 #ifndef parent_node
 #define parent_node(node)	(0)
 #endif
Index: linux-x86.q/include/asm-generic/vmlinux.lds.h
===================================================================
--- linux-x86.q.orig/include/asm-generic/vmlinux.lds.h
+++ linux-x86.q/include/asm-generic/vmlinux.lds.h
@@ -341,6 +341,20 @@
   	*(.initcall7.init)						\
   	*(.initcall7s.init)
 
+#ifdef CONFIG_HAVE_ZERO_BASED_PER_CPU
+#define PERCPU(align)							\
+	. = ALIGN(align);						\
+	percpu : { } :percpu						\
+	__per_cpu_load = .;						\
+	.data.percpu 0 : AT(__per_cpu_load - LOAD_OFFSET) {		\
+		*(.data.percpu.first)					\
+		*(.data.percpu)						\
+		*(.data.percpu.shared_aligned)				\
+		____per_cpu_size = .;					\
+	}								\
+	. = __per_cpu_load + ____per_cpu_size;				\
+	data : { } :data
+#else
 #define PERCPU(align)							\
 	. = ALIGN(align);						\
 	__per_cpu_start = .;						\
@@ -349,3 +363,4 @@
 		*(.data.percpu.shared_aligned)				\
 	}								\
 	__per_cpu_end = .;
+#endif
Index: linux-x86.q/include/asm-ia64/percpu.h
===================================================================
--- linux-x86.q.orig/include/asm-ia64/percpu.h
+++ linux-x86.q/include/asm-ia64/percpu.h
@@ -19,34 +19,14 @@
 # define PER_CPU_ATTRIBUTES	__attribute__((__model__ (__small__)))
 #endif
 
-#define DECLARE_PER_CPU(type, name)				\
-	extern PER_CPU_ATTRIBUTES __typeof__(type) per_cpu__##name
-
-/*
- * Pretty much a literal copy of asm-generic/percpu.h, except that percpu_modcopy() is an
- * external routine, to avoid include-hell.
- */
 #ifdef CONFIG_SMP
 
-extern unsigned long __per_cpu_offset[NR_CPUS];
-#define per_cpu_offset(x) (__per_cpu_offset[x])
-
-/* Equal to __per_cpu_offset[smp_processor_id()], but faster to access: */
-DECLARE_PER_CPU(unsigned long, local_per_cpu_offset);
+#define __my_cpu_offset	__ia64_per_cpu_var(local_per_cpu_offset)
 
-#define per_cpu(var, cpu)  (*RELOC_HIDE(&per_cpu__##var, __per_cpu_offset[cpu]))
-#define __get_cpu_var(var) (*RELOC_HIDE(&per_cpu__##var, __ia64_per_cpu_var(local_per_cpu_offset)))
-#define __raw_get_cpu_var(var) (*RELOC_HIDE(&per_cpu__##var, __ia64_per_cpu_var(local_per_cpu_offset)))
-
-extern void percpu_modcopy(void *pcpudst, const void *src, unsigned long size);
-extern void setup_per_cpu_areas (void);
 extern void *per_cpu_init(void);
 
 #else /* ! SMP */
 
-#define per_cpu(var, cpu)			(*((void)(cpu), &per_cpu__##var))
-#define __get_cpu_var(var)			per_cpu__##var
-#define __raw_get_cpu_var(var)			per_cpu__##var
 #define per_cpu_init()				(__phys_per_cpu_start)
 
 #endif	/* SMP */
@@ -57,7 +37,12 @@ extern void *per_cpu_init(void);
  * On the positive side, using __ia64_per_cpu_var() instead of __get_cpu_var() is slightly
  * more efficient.
  */
-#define __ia64_per_cpu_var(var)	(per_cpu__##var)
+#define __ia64_per_cpu_var(var)	per_cpu__##var
+
+#include <asm-generic/percpu.h>
+
+/* Equal to __per_cpu_offset[smp_processor_id()], but faster to access: */
+DECLARE_PER_CPU(unsigned long, local_per_cpu_offset);
 
 #endif /* !__ASSEMBLY__ */
 
Index: linux-x86.q/include/asm-ia64/topology.h
===================================================================
--- linux-x86.q.orig/include/asm-ia64/topology.h
+++ linux-x86.q/include/asm-ia64/topology.h
@@ -31,6 +31,7 @@
  * Returns the number of the node containing CPU 'cpu'
  */
 #define cpu_to_node(cpu) (int)(cpu_to_node_map[cpu])
+#define early_cpu_to_node(cpu)	cpu_to_node(cpu)
 
 /*
  * Returns a bitmask of CPUs on Node 'node'.
Index: linux-x86.q/include/asm-mips/mach-ip27/topology.h
===================================================================
--- linux-x86.q.orig/include/asm-mips/mach-ip27/topology.h
+++ linux-x86.q/include/asm-mips/mach-ip27/topology.h
@@ -23,6 +23,7 @@ struct cpuinfo_ip27 {
 extern struct cpuinfo_ip27 sn_cpu_info[NR_CPUS];
 
 #define cpu_to_node(cpu)	(sn_cpu_info[(cpu)].p_nodeid)
+#define early_cpu_to_node(cpu)	cpu_to_node(cpu)
 #define parent_node(node)	(node)
 #define node_to_cpumask(node)	(hub_data(node)->h_cpus)
 #define node_to_first_cpu(node)	(first_cpu(node_to_cpumask(node)))
Index: linux-x86.q/include/asm-powerpc/percpu.h
===================================================================
--- linux-x86.q.orig/include/asm-powerpc/percpu.h
+++ linux-x86.q/include/asm-powerpc/percpu.h
@@ -16,34 +16,9 @@
 #define __my_cpu_offset() get_paca()->data_offset
 #define per_cpu_offset(x) (__per_cpu_offset(x))
 
-/* var is in discarded region: offset to particular copy we want */
-#define per_cpu(var, cpu) (*RELOC_HIDE(&per_cpu__##var, __per_cpu_offset(cpu)))
-#define __get_cpu_var(var) (*RELOC_HIDE(&per_cpu__##var, __my_cpu_offset()))
-#define __raw_get_cpu_var(var) (*RELOC_HIDE(&per_cpu__##var, local_paca->data_offset))
+#endif /* CONFIG_SMP */
+#endif /* __powerpc64__ */
 
-/* A macro to avoid #include hell... */
-#define percpu_modcopy(pcpudst, src, size)			\
-do {								\
-	unsigned int __i;					\
-	for_each_possible_cpu(__i)				\
-		memcpy((pcpudst)+__per_cpu_offset(__i),		\
-		       (src), (size));				\
-} while (0)
-
-extern void setup_per_cpu_areas(void);
-
-#else /* ! SMP */
-
-#define per_cpu(var, cpu)			(*((void)(cpu), &per_cpu__##var))
-#define __get_cpu_var(var)			per_cpu__##var
-#define __raw_get_cpu_var(var)			per_cpu__##var
-
-#endif	/* SMP */
-
-#define DECLARE_PER_CPU(type, name) extern __typeof__(type) per_cpu__##name
-
-#else
 #include <asm-generic/percpu.h>
-#endif
 
 #endif /* _ASM_POWERPC_PERCPU_H_ */
Index: linux-x86.q/include/asm-powerpc/topology.h
===================================================================
--- linux-x86.q.orig/include/asm-powerpc/topology.h
+++ linux-x86.q/include/asm-powerpc/topology.h
@@ -15,6 +15,7 @@ static inline int cpu_to_node(int cpu)
 	return numa_cpu_lookup_table[cpu];
 }
 
+#define early_cpu_to_node(cpu)	cpu_to_node(cpu)
 #define parent_node(node)	(node)
 
 static inline cpumask_t node_to_cpumask(int node)
Index: linux-x86.q/include/asm-s390/percpu.h
===================================================================
--- linux-x86.q.orig/include/asm-s390/percpu.h
+++ linux-x86.q/include/asm-s390/percpu.h
@@ -13,49 +13,25 @@
  */
 #if defined(__s390x__) && defined(MODULE)
 
-#define __reloc_hide(var,offset) (*({			\
+#define SHIFT_PERCPU_PTR(ptr,offset) (({			\
 	extern int simple_identifier_##var(void);	\
 	unsigned long *__ptr;				\
-	asm ( "larl %0,per_cpu__"#var"@GOTENT"		\
-	    : "=a" (__ptr) : "X" (per_cpu__##var) );	\
-	(typeof(&per_cpu__##var))((*__ptr) + (offset));	}))
+	asm ( "larl %0, %1@GOTENT"		\
+	    : "=a" (__ptr) : "X" (ptr) );		\
+	(typeof(ptr))((*__ptr) + (offset));	}))
 
 #else
 
-#define __reloc_hide(var, offset) (*({				\
+#define SHIFT_PERCPU_PTR(ptr, offset) (({				\
 	extern int simple_identifier_##var(void);		\
 	unsigned long __ptr;					\
-	asm ( "" : "=a" (__ptr) : "0" (&per_cpu__##var) );	\
-	(typeof(&per_cpu__##var)) (__ptr + (offset)); }))
+	asm ( "" : "=a" (__ptr) : "0" (ptr) );			\
+	(typeof(ptr)) (__ptr + (offset)); }))
 
 #endif
 
-#ifdef CONFIG_SMP
+#define __my_cpu_offset S390_lowcore.percpu_offset
 
-extern unsigned long __per_cpu_offset[NR_CPUS];
-
-#define __get_cpu_var(var) __reloc_hide(var,S390_lowcore.percpu_offset)
-#define __raw_get_cpu_var(var) __reloc_hide(var,S390_lowcore.percpu_offset)
-#define per_cpu(var,cpu) __reloc_hide(var,__per_cpu_offset[cpu])
-#define per_cpu_offset(x) (__per_cpu_offset[x])
-
-/* A macro to avoid #include hell... */
-#define percpu_modcopy(pcpudst, src, size)			\
-do {								\
-	unsigned int __i;					\
-	for_each_possible_cpu(__i)				\
-		memcpy((pcpudst)+__per_cpu_offset[__i],		\
-		       (src), (size));				\
-} while (0)
-
-#else /* ! SMP */
-
-#define __get_cpu_var(var) __reloc_hide(var,0)
-#define __raw_get_cpu_var(var) __reloc_hide(var,0)
-#define per_cpu(var,cpu) __reloc_hide(var,0)
-
-#endif /* SMP */
-
-#define DECLARE_PER_CPU(type, name) extern __typeof__(type) per_cpu__##name
+#include <asm-generic/percpu.h>
 
 #endif /* __ARCH_S390_PERCPU__ */
Index: linux-x86.q/include/asm-sparc64/percpu.h
===================================================================
--- linux-x86.q.orig/include/asm-sparc64/percpu.h
+++ linux-x86.q/include/asm-sparc64/percpu.h
@@ -7,7 +7,6 @@ register unsigned long __local_per_cpu_o
 
 #ifdef CONFIG_SMP
 
-#define setup_per_cpu_areas()			do { } while (0)
 extern void real_setup_per_cpu_areas(void);
 
 extern unsigned long __per_cpu_base;
@@ -16,29 +15,14 @@ extern unsigned long __per_cpu_shift;
 	(__per_cpu_base + ((unsigned long)(__cpu) << __per_cpu_shift))
 #define per_cpu_offset(x) (__per_cpu_offset(x))
 
-/* var is in discarded region: offset to particular copy we want */
-#define per_cpu(var, cpu) (*RELOC_HIDE(&per_cpu__##var, __per_cpu_offset(cpu)))
-#define __get_cpu_var(var) (*RELOC_HIDE(&per_cpu__##var, __local_per_cpu_offset))
-#define __raw_get_cpu_var(var) (*RELOC_HIDE(&per_cpu__##var, __local_per_cpu_offset))
-
-/* A macro to avoid #include hell... */
-#define percpu_modcopy(pcpudst, src, size)			\
-do {								\
-	unsigned int __i;					\
-	for_each_possible_cpu(__i)				\
-		memcpy((pcpudst)+__per_cpu_offset(__i),		\
-		       (src), (size));				\
-} while (0)
+#define __my_cpu_offset __local_per_cpu_offset
+
 #else /* ! SMP */
 
 #define real_setup_per_cpu_areas()		do { } while (0)
 
-#define per_cpu(var, cpu)			(*((void)cpu, &per_cpu__##var))
-#define __get_cpu_var(var)			per_cpu__##var
-#define __raw_get_cpu_var(var)			per_cpu__##var
-
 #endif	/* SMP */
 
-#define DECLARE_PER_CPU(type, name) extern __typeof__(type) per_cpu__##name
+#include <asm-generic/percpu.h>
 
 #endif /* __ARCH_SPARC64_PERCPU__ */
Index: linux-x86.q/init/main.c
===================================================================
--- linux-x86.q.orig/init/main.c
+++ linux-x86.q/init/main.c
@@ -374,18 +374,20 @@ EXPORT_SYMBOL(__per_cpu_offset);
 
 static void __init setup_per_cpu_areas(void)
 {
-	unsigned long size, i;
-	char *ptr;
-	unsigned long nr_possible_cpus = num_possible_cpus();
+	unsigned long size;
+	int cpu;
 
 	/* Copy section for each CPU (we discard the original) */
 	size = ALIGN(PERCPU_ENOUGH_ROOM, PAGE_SIZE);
-	ptr = alloc_bootmem_pages(size * nr_possible_cpus);
 
-	for_each_possible_cpu(i) {
-		__per_cpu_offset[i] = ptr - __per_cpu_start;
-		memcpy(ptr, __per_cpu_start, __per_cpu_end - __per_cpu_start);
-		ptr += size;
+	printk(KERN_INFO "(generic)PERCPU: Allocating %lu bytes of per cpu data\n", size);
+
+	for_each_possible_cpu(cpu) {
+		char *ptr = alloc_bootmem_pages_node(
+				NODE_DATA(early_cpu_to_node(cpu)), size);
+
+		__per_cpu_offset[cpu] = ptr - __per_cpu_start;
+		memcpy(ptr, __per_cpu_load, __per_cpu_size);
 	}
 }
 #endif /* CONFIG_HAVE_SETUP_PER_CPU_AREA */
Index: linux-x86.q/kernel/lockdep.c
===================================================================
--- linux-x86.q.orig/kernel/lockdep.c
+++ linux-x86.q/kernel/lockdep.c
@@ -609,8 +609,8 @@ static int static_obj(void *obj)
 	 * percpu var?
 	 */
 	for_each_possible_cpu(i) {
-		start = (unsigned long) &__per_cpu_start + per_cpu_offset(i);
-		end   = (unsigned long) &__per_cpu_start + PERCPU_ENOUGH_ROOM
+		start = (unsigned long) __per_cpu_start + per_cpu_offset(i);
+		end   = (unsigned long) __per_cpu_start + PERCPU_ENOUGH_ROOM
 					+ per_cpu_offset(i);
 
 		if ((addr >= start) && (addr < end))

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: x86/non-x86: percpu, node ids, apic ids x86.git fixup
  2008-01-30 18:06         ` Ingo Molnar
@ 2008-01-30 18:20           ` Mike Travis
  2008-01-30 18:31           ` Luck, Tony
  2008-01-30 18:35           ` Olof Johansson
  2 siblings, 0 replies; 35+ messages in thread
From: Mike Travis @ 2008-01-30 18:20 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Luck, Tony, Geert Uytterhoeven, Linus Torvalds, Thomas Gleixner,
	Linux Kernel Development, Linux/PPC Development, linux-ia64,
	sparclinux

Ingo Molnar wrote:
> * Luck, Tony <tony.luck@intel.com> wrote:
> 
>>> thanks! Sorry about that: we cross-built on ARM but not on SMP 
>>> non-x86 platforms so this dependency/breakage went unnoticed.
>> Yes ... all ia64 builds (UP and SMP) are broken at the moment. Please 
>> Cc: me with the fixup patch.
> 
> Could you check the patch below? With this applied to latest -git, ia64 
> buils fine for me in a cross-compiling environment. (but i dont know 
> whether it boots ...)
> 
> 	Ingo

This patch is from a different patch set (aka "zero-based" patch).  That
one will be updated and resubmitted soon...

Thanks,
Mike

> 
> ----------------->
> Subject: generic: percpu infrastructure to rebase the per cpu area to zero
> From: travis@sgi.com
> 
>     * Support an option
> 
> 	CONFIG_HAVE_ZERO_BASED_PER_CPU
> 
>       that makes offsets for per cpu variables to start at zero.
> 
>       If a percpu area starts at zero then:
> 
> 	-  We do not need RELOC_HIDE anymore
> 
> 	-  Provides for the future capability of architectures providing
> 	   a per cpu allocator that returns offsets instead of pointers.
> 	   The offsets would be independent of the processor so that
> 	   address calculations can be done in a processor independent way.
> 	   Per cpu instructions can then add the processor specific offset
> 	   at the last minute possibly in an atomic instruction.
> 
>       The data the linker provides is different for zero based percpu segments:
> 
> 	__per_cpu_load	-> The address at which the percpu area was loaded
> 	__per_cpu_size	-> The length of the per cpu area
> 
>     * Removes the &__per_cpu_x in lockdep. The __per_cpu_x are already
>       pointers. There is no need to take the address.
> 
>     * Changes generic setup_per_cpu_areas to allocate per_cpu space in
>       node local memory.  This requires a generic early_cpu_to_node function.
> 
> Signed-off-by: Mike Travis <travis@sgi.com>
> Reviewed-by: Christoph Lameter <clameter@sgi.com>
> Signed-off-by: Ingo Molnar <mingo@elte.hu>
> ---
>  arch/ia64/Kconfig                     |    2 -
>  arch/ia64/kernel/module.c             |   11 --------
>  arch/powerpc/Kconfig                  |    2 -
>  arch/sparc64/mm/init.c                |    5 ++++
>  include/asm-alpha/topology.h          |    1 
>  include/asm-generic/percpu.h          |    7 ++++-
>  include/asm-generic/sections.h        |   10 ++++++++
>  include/asm-generic/topology.h        |    3 ++
>  include/asm-generic/vmlinux.lds.h     |   15 ++++++++++++
>  include/asm-ia64/percpu.h             |   29 +++++------------------
>  include/asm-ia64/topology.h           |    1 
>  include/asm-mips/mach-ip27/topology.h |    1 
>  include/asm-powerpc/percpu.h          |   29 +----------------------
>  include/asm-powerpc/topology.h        |    1 
>  include/asm-s390/percpu.h             |   42 +++++++---------------------------
>  include/asm-sparc64/percpu.h          |   22 ++---------------
>  init/main.c                           |   18 ++++++++------
>  kernel/lockdep.c                      |    4 +--
>  18 files changed, 78 insertions(+), 125 deletions(-)
> 
> Index: linux-x86.q/arch/ia64/Kconfig
> ===================================================================
> --- linux-x86.q.orig/arch/ia64/Kconfig
> +++ linux-x86.q/arch/ia64/Kconfig
> @@ -80,7 +80,7 @@ config GENERIC_TIME_VSYSCALL
>  	bool
>  	default y
>  
> -config ARCH_SETS_UP_PER_CPU_AREA
> +config HAVE_SETUP_PER_CPU_AREA
>  	def_bool y
>  
>  config DMI
> Index: linux-x86.q/arch/ia64/kernel/module.c
> ===================================================================
> --- linux-x86.q.orig/arch/ia64/kernel/module.c
> +++ linux-x86.q/arch/ia64/kernel/module.c
> @@ -940,14 +940,3 @@ module_arch_cleanup (struct module *mod)
>  	if (mod->arch.core_unw_table)
>  		unw_remove_unwind_table(mod->arch.core_unw_table);
>  }
> -
> -#ifdef CONFIG_SMP
> -void
> -percpu_modcopy (void *pcpudst, const void *src, unsigned long size)
> -{
> -	unsigned int i;
> -	for_each_possible_cpu(i) {
> -		memcpy(pcpudst + per_cpu_offset(i), src, size);
> -	}
> -}
> -#endif /* CONFIG_SMP */
> Index: linux-x86.q/arch/powerpc/Kconfig
> ===================================================================
> --- linux-x86.q.orig/arch/powerpc/Kconfig
> +++ linux-x86.q/arch/powerpc/Kconfig
> @@ -42,7 +42,7 @@ config GENERIC_HARDIRQS
>  	bool
>  	default y
>  
> -config ARCH_SETS_UP_PER_CPU_AREA
> +config HAVE_SETUP_PER_CPU_AREA
>  	def_bool PPC64
>  
>  config IRQ_PER_CPU
> Index: linux-x86.q/arch/sparc64/mm/init.c
> ===================================================================
> --- linux-x86.q.orig/arch/sparc64/mm/init.c
> +++ linux-x86.q/arch/sparc64/mm/init.c
> @@ -1328,6 +1328,11 @@ pgd_t swapper_pg_dir[2048];
>  static void sun4u_pgprot_init(void);
>  static void sun4v_pgprot_init(void);
>  
> +/* Dummy function */
> +void __init setup_per_cpu_areas(void)
> +{
> +}
> +
>  void __init paging_init(void)
>  {
>  	unsigned long end_pfn, pages_avail, shift, phys_base;
> Index: linux-x86.q/include/asm-alpha/topology.h
> ===================================================================
> --- linux-x86.q.orig/include/asm-alpha/topology.h
> +++ linux-x86.q/include/asm-alpha/topology.h
> @@ -6,6 +6,7 @@
>  #include <asm/machvec.h>
>  
>  #ifdef CONFIG_NUMA
> +#define early_cpu_to_node(cpu)	cpu_to_node(cpu)
>  static inline int cpu_to_node(int cpu)
>  {
>  	int node;
> Index: linux-x86.q/include/asm-generic/percpu.h
> ===================================================================
> --- linux-x86.q.orig/include/asm-generic/percpu.h
> +++ linux-x86.q/include/asm-generic/percpu.h
> @@ -43,7 +43,12 @@ extern unsigned long __per_cpu_offset[NR
>   * Only S390 provides its own means of moving the pointer.
>   */
>  #ifndef SHIFT_PERCPU_PTR
> -#define SHIFT_PERCPU_PTR(__p, __offset)	RELOC_HIDE((__p), (__offset))
> +# ifdef CONFIG_HAVE_ZERO_BASED_PER_CPU
> +#  define SHIFT_PERCPU_PTR(__p, __offset) \
> +	((__typeof(__p))(((void *)(__p)) + (__offset)))
> +# else
> +#  define SHIFT_PERCPU_PTR(__p, __offset)	RELOC_HIDE((__p), (__offset))
> +# endif /* CONFIG_HAVE_ZERO_BASED_PER_CPU */
>  #endif
>  
>  /*
> Index: linux-x86.q/include/asm-generic/sections.h
> ===================================================================
> --- linux-x86.q.orig/include/asm-generic/sections.h
> +++ linux-x86.q/include/asm-generic/sections.h
> @@ -11,7 +11,17 @@ extern char _sinittext[], _einittext[];
>  extern char _sextratext[] __attribute__((weak));
>  extern char _eextratext[] __attribute__((weak));
>  extern char _end[];
> +#ifdef CONFIG_HAVE_ZERO_BASED_PER_CPU
> +extern char __per_cpu_load[];
> +extern char ____per_cpu_size[];
> +#define __per_cpu_size ((unsigned long)&____per_cpu_size)
> +#define __per_cpu_start ((char *)0)
> +#define __per_cpu_end ((char *)__per_cpu_size)
> +#else
>  extern char __per_cpu_start[], __per_cpu_end[];
> +#define __per_cpu_load __per_cpu_start
> +#define __per_cpu_size (__per_cpu_end - __per_cpu_start)
> +#endif
>  extern char __kprobes_text_start[], __kprobes_text_end[];
>  extern char __initdata_begin[], __initdata_end[];
>  extern char __start_rodata[], __end_rodata[];
> Index: linux-x86.q/include/asm-generic/topology.h
> ===================================================================
> --- linux-x86.q.orig/include/asm-generic/topology.h
> +++ linux-x86.q/include/asm-generic/topology.h
> @@ -32,6 +32,9 @@
>  #ifndef cpu_to_node
>  #define cpu_to_node(cpu)	(0)
>  #endif
> +#ifndef early_cpu_to_node
> +#define early_cpu_to_node(cpu)	cpu_to_node(cpu)
> +#endif
>  #ifndef parent_node
>  #define parent_node(node)	(0)
>  #endif
> Index: linux-x86.q/include/asm-generic/vmlinux.lds.h
> ===================================================================
> --- linux-x86.q.orig/include/asm-generic/vmlinux.lds.h
> +++ linux-x86.q/include/asm-generic/vmlinux.lds.h
> @@ -341,6 +341,20 @@
>    	*(.initcall7.init)						\
>    	*(.initcall7s.init)
>  
> +#ifdef CONFIG_HAVE_ZERO_BASED_PER_CPU
> +#define PERCPU(align)							\
> +	. = ALIGN(align);						\
> +	percpu : { } :percpu						\
> +	__per_cpu_load = .;						\
> +	.data.percpu 0 : AT(__per_cpu_load - LOAD_OFFSET) {		\
> +		*(.data.percpu.first)					\
> +		*(.data.percpu)						\
> +		*(.data.percpu.shared_aligned)				\
> +		____per_cpu_size = .;					\
> +	}								\
> +	. = __per_cpu_load + ____per_cpu_size;				\
> +	data : { } :data
> +#else
>  #define PERCPU(align)							\
>  	. = ALIGN(align);						\
>  	__per_cpu_start = .;						\
> @@ -349,3 +363,4 @@
>  		*(.data.percpu.shared_aligned)				\
>  	}								\
>  	__per_cpu_end = .;
> +#endif
> Index: linux-x86.q/include/asm-ia64/percpu.h
> ===================================================================
> --- linux-x86.q.orig/include/asm-ia64/percpu.h
> +++ linux-x86.q/include/asm-ia64/percpu.h
> @@ -19,34 +19,14 @@
>  # define PER_CPU_ATTRIBUTES	__attribute__((__model__ (__small__)))
>  #endif
>  
> -#define DECLARE_PER_CPU(type, name)				\
> -	extern PER_CPU_ATTRIBUTES __typeof__(type) per_cpu__##name
> -
> -/*
> - * Pretty much a literal copy of asm-generic/percpu.h, except that percpu_modcopy() is an
> - * external routine, to avoid include-hell.
> - */
>  #ifdef CONFIG_SMP
>  
> -extern unsigned long __per_cpu_offset[NR_CPUS];
> -#define per_cpu_offset(x) (__per_cpu_offset[x])
> -
> -/* Equal to __per_cpu_offset[smp_processor_id()], but faster to access: */
> -DECLARE_PER_CPU(unsigned long, local_per_cpu_offset);
> +#define __my_cpu_offset	__ia64_per_cpu_var(local_per_cpu_offset)
>  
> -#define per_cpu(var, cpu)  (*RELOC_HIDE(&per_cpu__##var, __per_cpu_offset[cpu]))
> -#define __get_cpu_var(var) (*RELOC_HIDE(&per_cpu__##var, __ia64_per_cpu_var(local_per_cpu_offset)))
> -#define __raw_get_cpu_var(var) (*RELOC_HIDE(&per_cpu__##var, __ia64_per_cpu_var(local_per_cpu_offset)))
> -
> -extern void percpu_modcopy(void *pcpudst, const void *src, unsigned long size);
> -extern void setup_per_cpu_areas (void);
>  extern void *per_cpu_init(void);
>  
>  #else /* ! SMP */
>  
> -#define per_cpu(var, cpu)			(*((void)(cpu), &per_cpu__##var))
> -#define __get_cpu_var(var)			per_cpu__##var
> -#define __raw_get_cpu_var(var)			per_cpu__##var
>  #define per_cpu_init()				(__phys_per_cpu_start)
>  
>  #endif	/* SMP */
> @@ -57,7 +37,12 @@ extern void *per_cpu_init(void);
>   * On the positive side, using __ia64_per_cpu_var() instead of __get_cpu_var() is slightly
>   * more efficient.
>   */
> -#define __ia64_per_cpu_var(var)	(per_cpu__##var)
> +#define __ia64_per_cpu_var(var)	per_cpu__##var
> +
> +#include <asm-generic/percpu.h>
> +
> +/* Equal to __per_cpu_offset[smp_processor_id()], but faster to access: */
> +DECLARE_PER_CPU(unsigned long, local_per_cpu_offset);
>  
>  #endif /* !__ASSEMBLY__ */
>  
> Index: linux-x86.q/include/asm-ia64/topology.h
> ===================================================================
> --- linux-x86.q.orig/include/asm-ia64/topology.h
> +++ linux-x86.q/include/asm-ia64/topology.h
> @@ -31,6 +31,7 @@
>   * Returns the number of the node containing CPU 'cpu'
>   */
>  #define cpu_to_node(cpu) (int)(cpu_to_node_map[cpu])
> +#define early_cpu_to_node(cpu)	cpu_to_node(cpu)
>  
>  /*
>   * Returns a bitmask of CPUs on Node 'node'.
> Index: linux-x86.q/include/asm-mips/mach-ip27/topology.h
> ===================================================================
> --- linux-x86.q.orig/include/asm-mips/mach-ip27/topology.h
> +++ linux-x86.q/include/asm-mips/mach-ip27/topology.h
> @@ -23,6 +23,7 @@ struct cpuinfo_ip27 {
>  extern struct cpuinfo_ip27 sn_cpu_info[NR_CPUS];
>  
>  #define cpu_to_node(cpu)	(sn_cpu_info[(cpu)].p_nodeid)
> +#define early_cpu_to_node(cpu)	cpu_to_node(cpu)
>  #define parent_node(node)	(node)
>  #define node_to_cpumask(node)	(hub_data(node)->h_cpus)
>  #define node_to_first_cpu(node)	(first_cpu(node_to_cpumask(node)))
> Index: linux-x86.q/include/asm-powerpc/percpu.h
> ===================================================================
> --- linux-x86.q.orig/include/asm-powerpc/percpu.h
> +++ linux-x86.q/include/asm-powerpc/percpu.h
> @@ -16,34 +16,9 @@
>  #define __my_cpu_offset() get_paca()->data_offset
>  #define per_cpu_offset(x) (__per_cpu_offset(x))
>  
> -/* var is in discarded region: offset to particular copy we want */
> -#define per_cpu(var, cpu) (*RELOC_HIDE(&per_cpu__##var, __per_cpu_offset(cpu)))
> -#define __get_cpu_var(var) (*RELOC_HIDE(&per_cpu__##var, __my_cpu_offset()))
> -#define __raw_get_cpu_var(var) (*RELOC_HIDE(&per_cpu__##var, local_paca->data_offset))
> +#endif /* CONFIG_SMP */
> +#endif /* __powerpc64__ */
>  
> -/* A macro to avoid #include hell... */
> -#define percpu_modcopy(pcpudst, src, size)			\
> -do {								\
> -	unsigned int __i;					\
> -	for_each_possible_cpu(__i)				\
> -		memcpy((pcpudst)+__per_cpu_offset(__i),		\
> -		       (src), (size));				\
> -} while (0)
> -
> -extern void setup_per_cpu_areas(void);
> -
> -#else /* ! SMP */
> -
> -#define per_cpu(var, cpu)			(*((void)(cpu), &per_cpu__##var))
> -#define __get_cpu_var(var)			per_cpu__##var
> -#define __raw_get_cpu_var(var)			per_cpu__##var
> -
> -#endif	/* SMP */
> -
> -#define DECLARE_PER_CPU(type, name) extern __typeof__(type) per_cpu__##name
> -
> -#else
>  #include <asm-generic/percpu.h>
> -#endif
>  
>  #endif /* _ASM_POWERPC_PERCPU_H_ */
> Index: linux-x86.q/include/asm-powerpc/topology.h
> ===================================================================
> --- linux-x86.q.orig/include/asm-powerpc/topology.h
> +++ linux-x86.q/include/asm-powerpc/topology.h
> @@ -15,6 +15,7 @@ static inline int cpu_to_node(int cpu)
>  	return numa_cpu_lookup_table[cpu];
>  }
>  
> +#define early_cpu_to_node(cpu)	cpu_to_node(cpu)
>  #define parent_node(node)	(node)
>  
>  static inline cpumask_t node_to_cpumask(int node)
> Index: linux-x86.q/include/asm-s390/percpu.h
> ===================================================================
> --- linux-x86.q.orig/include/asm-s390/percpu.h
> +++ linux-x86.q/include/asm-s390/percpu.h
> @@ -13,49 +13,25 @@
>   */
>  #if defined(__s390x__) && defined(MODULE)
>  
> -#define __reloc_hide(var,offset) (*({			\
> +#define SHIFT_PERCPU_PTR(ptr,offset) (({			\
>  	extern int simple_identifier_##var(void);	\
>  	unsigned long *__ptr;				\
> -	asm ( "larl %0,per_cpu__"#var"@GOTENT"		\
> -	    : "=a" (__ptr) : "X" (per_cpu__##var) );	\
> -	(typeof(&per_cpu__##var))((*__ptr) + (offset));	}))
> +	asm ( "larl %0, %1@GOTENT"		\
> +	    : "=a" (__ptr) : "X" (ptr) );		\
> +	(typeof(ptr))((*__ptr) + (offset));	}))
>  
>  #else
>  
> -#define __reloc_hide(var, offset) (*({				\
> +#define SHIFT_PERCPU_PTR(ptr, offset) (({				\
>  	extern int simple_identifier_##var(void);		\
>  	unsigned long __ptr;					\
> -	asm ( "" : "=a" (__ptr) : "0" (&per_cpu__##var) );	\
> -	(typeof(&per_cpu__##var)) (__ptr + (offset)); }))
> +	asm ( "" : "=a" (__ptr) : "0" (ptr) );			\
> +	(typeof(ptr)) (__ptr + (offset)); }))
>  
>  #endif
>  
> -#ifdef CONFIG_SMP
> +#define __my_cpu_offset S390_lowcore.percpu_offset
>  
> -extern unsigned long __per_cpu_offset[NR_CPUS];
> -
> -#define __get_cpu_var(var) __reloc_hide(var,S390_lowcore.percpu_offset)
> -#define __raw_get_cpu_var(var) __reloc_hide(var,S390_lowcore.percpu_offset)
> -#define per_cpu(var,cpu) __reloc_hide(var,__per_cpu_offset[cpu])
> -#define per_cpu_offset(x) (__per_cpu_offset[x])
> -
> -/* A macro to avoid #include hell... */
> -#define percpu_modcopy(pcpudst, src, size)			\
> -do {								\
> -	unsigned int __i;					\
> -	for_each_possible_cpu(__i)				\
> -		memcpy((pcpudst)+__per_cpu_offset[__i],		\
> -		       (src), (size));				\
> -} while (0)
> -
> -#else /* ! SMP */
> -
> -#define __get_cpu_var(var) __reloc_hide(var,0)
> -#define __raw_get_cpu_var(var) __reloc_hide(var,0)
> -#define per_cpu(var,cpu) __reloc_hide(var,0)
> -
> -#endif /* SMP */
> -
> -#define DECLARE_PER_CPU(type, name) extern __typeof__(type) per_cpu__##name
> +#include <asm-generic/percpu.h>
>  
>  #endif /* __ARCH_S390_PERCPU__ */
> Index: linux-x86.q/include/asm-sparc64/percpu.h
> ===================================================================
> --- linux-x86.q.orig/include/asm-sparc64/percpu.h
> +++ linux-x86.q/include/asm-sparc64/percpu.h
> @@ -7,7 +7,6 @@ register unsigned long __local_per_cpu_o
>  
>  #ifdef CONFIG_SMP
>  
> -#define setup_per_cpu_areas()			do { } while (0)
>  extern void real_setup_per_cpu_areas(void);
>  
>  extern unsigned long __per_cpu_base;
> @@ -16,29 +15,14 @@ extern unsigned long __per_cpu_shift;
>  	(__per_cpu_base + ((unsigned long)(__cpu) << __per_cpu_shift))
>  #define per_cpu_offset(x) (__per_cpu_offset(x))
>  
> -/* var is in discarded region: offset to particular copy we want */
> -#define per_cpu(var, cpu) (*RELOC_HIDE(&per_cpu__##var, __per_cpu_offset(cpu)))
> -#define __get_cpu_var(var) (*RELOC_HIDE(&per_cpu__##var, __local_per_cpu_offset))
> -#define __raw_get_cpu_var(var) (*RELOC_HIDE(&per_cpu__##var, __local_per_cpu_offset))
> -
> -/* A macro to avoid #include hell... */
> -#define percpu_modcopy(pcpudst, src, size)			\
> -do {								\
> -	unsigned int __i;					\
> -	for_each_possible_cpu(__i)				\
> -		memcpy((pcpudst)+__per_cpu_offset(__i),		\
> -		       (src), (size));				\
> -} while (0)
> +#define __my_cpu_offset __local_per_cpu_offset
> +
>  #else /* ! SMP */
>  
>  #define real_setup_per_cpu_areas()		do { } while (0)
>  
> -#define per_cpu(var, cpu)			(*((void)cpu, &per_cpu__##var))
> -#define __get_cpu_var(var)			per_cpu__##var
> -#define __raw_get_cpu_var(var)			per_cpu__##var
> -
>  #endif	/* SMP */
>  
> -#define DECLARE_PER_CPU(type, name) extern __typeof__(type) per_cpu__##name
> +#include <asm-generic/percpu.h>
>  
>  #endif /* __ARCH_SPARC64_PERCPU__ */
> Index: linux-x86.q/init/main.c
> ===================================================================
> --- linux-x86.q.orig/init/main.c
> +++ linux-x86.q/init/main.c
> @@ -374,18 +374,20 @@ EXPORT_SYMBOL(__per_cpu_offset);
>  
>  static void __init setup_per_cpu_areas(void)
>  {
> -	unsigned long size, i;
> -	char *ptr;
> -	unsigned long nr_possible_cpus = num_possible_cpus();
> +	unsigned long size;
> +	int cpu;
>  
>  	/* Copy section for each CPU (we discard the original) */
>  	size = ALIGN(PERCPU_ENOUGH_ROOM, PAGE_SIZE);
> -	ptr = alloc_bootmem_pages(size * nr_possible_cpus);
>  
> -	for_each_possible_cpu(i) {
> -		__per_cpu_offset[i] = ptr - __per_cpu_start;
> -		memcpy(ptr, __per_cpu_start, __per_cpu_end - __per_cpu_start);
> -		ptr += size;
> +	printk(KERN_INFO "(generic)PERCPU: Allocating %lu bytes of per cpu data\n", size);
> +
> +	for_each_possible_cpu(cpu) {
> +		char *ptr = alloc_bootmem_pages_node(
> +				NODE_DATA(early_cpu_to_node(cpu)), size);
> +
> +		__per_cpu_offset[cpu] = ptr - __per_cpu_start;
> +		memcpy(ptr, __per_cpu_load, __per_cpu_size);
>  	}
>  }
>  #endif /* CONFIG_HAVE_SETUP_PER_CPU_AREA */
> Index: linux-x86.q/kernel/lockdep.c
> ===================================================================
> --- linux-x86.q.orig/kernel/lockdep.c
> +++ linux-x86.q/kernel/lockdep.c
> @@ -609,8 +609,8 @@ static int static_obj(void *obj)
>  	 * percpu var?
>  	 */
>  	for_each_possible_cpu(i) {
> -		start = (unsigned long) &__per_cpu_start + per_cpu_offset(i);
> -		end   = (unsigned long) &__per_cpu_start + PERCPU_ENOUGH_ROOM
> +		start = (unsigned long) __per_cpu_start + per_cpu_offset(i);
> +		end   = (unsigned long) __per_cpu_start + PERCPU_ENOUGH_ROOM
>  					+ per_cpu_offset(i);
>  
>  		if ((addr >= start) && (addr < end))


^ permalink raw reply	[flat|nested] 35+ messages in thread

* RE: x86/non-x86: percpu, node ids, apic ids x86.git fixup
  2008-01-30 18:06         ` Ingo Molnar
  2008-01-30 18:20           ` Mike Travis
@ 2008-01-30 18:31           ` Luck, Tony
  2008-01-30 18:41             ` Mike Travis
                               ` (2 more replies)
  2008-01-30 18:35           ` Olof Johansson
  2 siblings, 3 replies; 35+ messages in thread
From: Luck, Tony @ 2008-01-30 18:31 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Mike Travis, Geert Uytterhoeven, Linus Torvalds, Thomas Gleixner,
	Linux Kernel Development, Linux/PPC Development, linux-ia64,
	sparclinux

> Could you check the patch below? With this applied to latest -git, ia64 
> buils fine for me in a cross-compiling environment. (but i dont know 
> whether it boots ...)

Uni-processor build still fails with this patch (config is arch/ia64/configs/tiger_defconfig
with CONFIG_SMP switched from =y to =n).

arch/ia64/kernel/built-in.o(.text+0x5012): In function `show_interrupts':
: relocation truncated to fit: IMM22 per_cpu__kstat
arch/ia64/kernel/built-in.o(.text+0x53e1): In function `__bind_irq_vector':
: relocation truncated to fit: IMM22 per_cpu__vector_irq
arch/ia64/kernel/built-in.o(.text+0x5612): In function `__clear_irq_vector':
: relocation truncated to fit: IMM22 per_cpu__vector_irq
arch/ia64/kernel/built-in.o(.text+0x5a81): In function `__setup_vector_irq':
: relocation truncated to fit: IMM22 per_cpu__vector_irq
arch/ia64/kernel/built-in.o(.text+0x6231): In function `ia64_handle_irq':
: relocation truncated to fit: IMM22 per_cpu____irq_regs
arch/ia64/kernel/built-in.o(.text+0x6272): In function `ia64_handle_irq':
: relocation truncated to fit: IMM22 per_cpu__vector_irq
arch/ia64/kernel/built-in.o(.text+0x7b81): In function `cpu_idle_wait':
: relocation truncated to fit: IMM22 .text
arch/ia64/kernel/built-in.o(.text+0x7e21): In function `cpu_idle':
: relocation truncated to fit: IMM22 .text
arch/ia64/kernel/built-in.o(.text+0x7fd1): In function `ia64_save_extra':
: relocation truncated to fit: IMM22 per_cpu__pfm_syst_info
arch/ia64/kernel/built-in.o(.text+0x8071): In function `ia64_load_extra':
: relocation truncated to fit: IMM22 per_cpu__pfm_syst_info
arch/ia64/kernel/built-in.o(.text+0x95c0): In function `pfm_write_ibr_dbr':
: additional relocation overflows omitted from the output
ld: final link failed: Nonrepresentable section on output
make: *** [.tmp_vmlinux1] Error 1

SMP build (config zx1_defconfig) builds ok and boots ok too.

-Tony

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: x86/non-x86: percpu, node ids, apic ids x86.git fixup
  2008-01-30 18:06         ` Ingo Molnar
  2008-01-30 18:20           ` Mike Travis
  2008-01-30 18:31           ` Luck, Tony
@ 2008-01-30 18:35           ` Olof Johansson
  2 siblings, 0 replies; 35+ messages in thread
From: Olof Johansson @ 2008-01-30 18:35 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Luck, Tony, sparclinux, linux-ia64, Linux Kernel Development,
	Mike Travis, Linux/PPC Development, Geert Uytterhoeven,
	Thomas Gleixner, Linus Torvalds

On Wed, Jan 30, 2008 at 07:06:23PM +0100, Ingo Molnar wrote:
> 
> * Luck, Tony <tony.luck@intel.com> wrote:
> 
> > > thanks! Sorry about that: we cross-built on ARM but not on SMP 
> > > non-x86 platforms so this dependency/breakage went unnoticed.
> > 
> > Yes ... all ia64 builds (UP and SMP) are broken at the moment. Please 
> > Cc: me with the fixup patch.
> 
> Could you check the patch below? With this applied to latest -git, ia64 
> buils fine for me in a cross-compiling environment. (but i dont know 
> whether it boots ...)

powerpc (pasemi_defconfig) is broken in new ways from the original
breakage by this patch:

  CHK     include/linux/utsrelease.h
In file included from include/asm/pgtable-ppc64.h:10,
                 from include/asm/pgtable.h:13,
                 from include/linux/mm.h:39,
                 from include/linux/mman.h:14,
                 from arch/powerpc/kernel/asm-offsets.c:22:
include/asm/tlbflush.h: In function 'arch_enter_lazy_mmu_mode':
include/asm/tlbflush.h:112: error: '__my_cpu_offset' undeclared (first
use in this function)
include/asm/tlbflush.h:112: error: (Each undeclared identifier is
reported only once
include/asm/tlbflush.h:112: error: for each function it appears in.)
include/asm/tlbflush.h: In function 'arch_leave_lazy_mmu_mode':
include/asm/tlbflush.h:119: error: '__my_cpu_offset' undeclared (first
use in this function)
In file included from include/linux/mm.h:535,
                 from include/linux/mman.h:14,
                 from arch/powerpc/kernel/asm-offsets.c:22:
include/linux/vmstat.h: In function '__count_vm_event':
include/linux/vmstat.h:62: error: '__my_cpu_offset' undeclared (first
use in this function)
include/linux/vmstat.h: In function 'count_vm_event':
include/linux/vmstat.h:67: error: '__my_cpu_offset' undeclared (first
use in this function)
include/linux/vmstat.h: In function '__count_vm_events':
include/linux/vmstat.h:73: error: '__my_cpu_offset' undeclared (first
use in this function)
include/linux/vmstat.h: In function 'count_vm_events':
include/linux/vmstat.h:78: error: '__my_cpu_offset' undeclared (first
use in this function)
make[1]: *** [arch/powerpc/kernel/asm-offsets.s] Error 1



-Olof

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: x86/non-x86: percpu, node ids, apic ids x86.git fixup
  2008-01-30 18:31           ` Luck, Tony
@ 2008-01-30 18:41             ` Mike Travis
  2008-01-30 18:49             ` Ingo Molnar
  2008-01-30 19:17             ` Mike Travis
  2 siblings, 0 replies; 35+ messages in thread
From: Mike Travis @ 2008-01-30 18:41 UTC (permalink / raw)
  To: Luck, Tony
  Cc: Ingo Molnar, Geert Uytterhoeven, Linus Torvalds, Thomas Gleixner,
	Linux Kernel Development, Linux/PPC Development, linux-ia64,
	sparclinux

Luck, Tony wrote:
>> Could you check the patch below? With this applied to latest -git, ia64 
>> buils fine for me in a cross-compiling environment. (but i dont know 
>> whether it boots ...)
> 
> Uni-processor build still fails with this patch (config is arch/ia64/configs/tiger_defconfig
> with CONFIG_SMP switched from =y to =n).

I'll add an ia64-nosmp config to our cross build test environment and fix this up...

Thanks,
Mike

> 
> arch/ia64/kernel/built-in.o(.text+0x5012): In function `show_interrupts':
> : relocation truncated to fit: IMM22 per_cpu__kstat
> arch/ia64/kernel/built-in.o(.text+0x53e1): In function `__bind_irq_vector':
> : relocation truncated to fit: IMM22 per_cpu__vector_irq
> arch/ia64/kernel/built-in.o(.text+0x5612): In function `__clear_irq_vector':
> : relocation truncated to fit: IMM22 per_cpu__vector_irq
> arch/ia64/kernel/built-in.o(.text+0x5a81): In function `__setup_vector_irq':
> : relocation truncated to fit: IMM22 per_cpu__vector_irq
> arch/ia64/kernel/built-in.o(.text+0x6231): In function `ia64_handle_irq':
> : relocation truncated to fit: IMM22 per_cpu____irq_regs
> arch/ia64/kernel/built-in.o(.text+0x6272): In function `ia64_handle_irq':
> : relocation truncated to fit: IMM22 per_cpu__vector_irq
> arch/ia64/kernel/built-in.o(.text+0x7b81): In function `cpu_idle_wait':
> : relocation truncated to fit: IMM22 .text
> arch/ia64/kernel/built-in.o(.text+0x7e21): In function `cpu_idle':
> : relocation truncated to fit: IMM22 .text
> arch/ia64/kernel/built-in.o(.text+0x7fd1): In function `ia64_save_extra':
> : relocation truncated to fit: IMM22 per_cpu__pfm_syst_info
> arch/ia64/kernel/built-in.o(.text+0x8071): In function `ia64_load_extra':
> : relocation truncated to fit: IMM22 per_cpu__pfm_syst_info
> arch/ia64/kernel/built-in.o(.text+0x95c0): In function `pfm_write_ibr_dbr':
> : additional relocation overflows omitted from the output
> ld: final link failed: Nonrepresentable section on output
> make: *** [.tmp_vmlinux1] Error 1
> 
> SMP build (config zx1_defconfig) builds ok and boots ok too.
> 
> -Tony


^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: x86/non-x86: percpu, node ids, apic ids x86.git fixup
  2008-01-30 18:31           ` Luck, Tony
  2008-01-30 18:41             ` Mike Travis
@ 2008-01-30 18:49             ` Ingo Molnar
  2008-01-30 19:05               ` Ingo Molnar
                                 ` (3 more replies)
  2008-01-30 19:17             ` Mike Travis
  2 siblings, 4 replies; 35+ messages in thread
From: Ingo Molnar @ 2008-01-30 18:49 UTC (permalink / raw)
  To: Luck, Tony
  Cc: Mike Travis, Geert Uytterhoeven, Linus Torvalds, Thomas Gleixner,
	Linux Kernel Development, Linux/PPC Development, linux-ia64,
	sparclinux


* Luck, Tony <tony.luck@intel.com> wrote:

> > Could you check the patch below? With this applied to latest -git, 
> > ia64 buils fine for me in a cross-compiling environment. (but i dont 
> > know whether it boots ...)
> 
> Uni-processor build still fails with this patch (config is 
> arch/ia64/configs/tiger_defconfig with CONFIG_SMP switched from =y to 
> =n).

could you try the full patchset that Travis has just sent and which i've 
put into x86.git, you can pull it from:

    git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86.git

it's a fixes only tree, ontop of Linus-very-latest. Head 4b9e425c25f84. 
[pull from ssh://master.kernel.org if it's not on git.kernel.org yet, 
uploaded it this very minute.]

	Ingo

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: x86/non-x86: percpu, node ids, apic ids x86.git fixup
  2008-01-30 18:49             ` Ingo Molnar
@ 2008-01-30 19:05               ` Ingo Molnar
  2008-01-30 19:10               ` Luck, Tony
                                 ` (2 subsequent siblings)
  3 siblings, 0 replies; 35+ messages in thread
From: Ingo Molnar @ 2008-01-30 19:05 UTC (permalink / raw)
  To: Luck, Tony
  Cc: Mike Travis, Geert Uytterhoeven, Linus Torvalds, Thomas Gleixner,
	Linux Kernel Development, Linux/PPC Development, linux-ia64,
	sparclinux


* Ingo Molnar <mingo@elte.hu> wrote:

> > Uni-processor build still fails with this patch (config is 
> > arch/ia64/configs/tiger_defconfig with CONFIG_SMP switched from =y 
> > to =n).
> 
> could you try the full patchset that Travis has just sent and which 
> i've put into x86.git, you can pull it from:

btw., i needed the fix below to get DISCONTIGMEM + !NUMA to build. (this 
is an ia64 build breakage independent of the x86.git merge)

	Ingo

-------------->
Subject: ia64: build fix
From: Ingo Molnar <mingo@elte.hu>

DISCONTIGMEM does not build with NUMA disabled:

include/linux/gfp.h: In function `alloc_pages_node':
include/linux/gfp.h:189: error: implicit declaration of function `NODE_DATA'
include/linux/gfp.h:189: error: invalid type argument of `->'
In file included from include/asm/uaccess.h:39,

Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 arch/ia64/Kconfig |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Index: linux-x86.q/arch/ia64/Kconfig
===================================================================
--- linux-x86.q.orig/arch/ia64/Kconfig
+++ linux-x86.q/arch/ia64/Kconfig
@@ -351,7 +351,8 @@ config ARCH_SELECT_MEMORY_MODEL
 	def_bool y
 
 config ARCH_DISCONTIGMEM_ENABLE
-	def_bool y
+	def_bool n
+	depends on NUMA
 	help
 	  Say Y to support efficient handling of discontiguous physical memory,
 	  for architectures which are either NUMA (Non-Uniform Memory Access)
@@ -372,7 +373,7 @@ config ARCH_DISCONTIGMEM_DEFAULT
 
 config NUMA
 	bool "NUMA support"
-	depends on !IA64_HP_SIM && !FLATMEM
+	depends on !IA64_HP_SIM
 	default y if IA64_SGI_SN2
 	select ACPI_NUMA if ACPI
 	help

^ permalink raw reply	[flat|nested] 35+ messages in thread

* RE: x86/non-x86: percpu, node ids, apic ids x86.git fixup
  2008-01-30 18:49             ` Ingo Molnar
  2008-01-30 19:05               ` Ingo Molnar
@ 2008-01-30 19:10               ` Luck, Tony
  2008-01-30 19:13               ` Olof Johansson
  2008-01-30 21:18               ` Geoff Levand
  3 siblings, 0 replies; 35+ messages in thread
From: Luck, Tony @ 2008-01-30 19:10 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Mike Travis, Geert Uytterhoeven, Linus Torvalds, Thomas Gleixner,
	Linux Kernel Development, Linux/PPC Development, linux-ia64,
	sparclinux

> could you try the full patchset that Travis has just sent and which i've 
> put into x86.git, you can pull it from:
>
>    git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86.git
>
> it's a fixes only tree, ontop of Linus-very-latest. Head 4b9e425c25f84. 
> [pull from ssh://master.kernel.org if it's not on git.kernel.org yet, 
> uploaded it this very minute.]

Same build fail for CONFIG_SMP=n.  The SMP=y build is good (for tiger_defconfig)
and boots ok too.

-Tony

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: x86/non-x86: percpu, node ids, apic ids x86.git fixup
  2008-01-30 18:49             ` Ingo Molnar
  2008-01-30 19:05               ` Ingo Molnar
  2008-01-30 19:10               ` Luck, Tony
@ 2008-01-30 19:13               ` Olof Johansson
  2008-01-30 19:18                 ` Ingo Molnar
  2008-01-30 21:25                 ` [powerpc changes] " Ingo Molnar
  2008-01-30 21:18               ` Geoff Levand
  3 siblings, 2 replies; 35+ messages in thread
From: Olof Johansson @ 2008-01-30 19:13 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Luck, Tony, sparclinux, linux-ia64, Linux Kernel Development,
	Mike Travis, Linux/PPC Development, Geert Uytterhoeven,
	Thomas Gleixner, Linus Torvalds

On Wed, Jan 30, 2008 at 07:49:20PM +0100, Ingo Molnar wrote:
> 
> * Luck, Tony <tony.luck@intel.com> wrote:
> 
> > > Could you check the patch below? With this applied to latest -git, 
> > > ia64 buils fine for me in a cross-compiling environment. (but i dont 
> > > know whether it boots ...)
> > 
> > Uni-processor build still fails with this patch (config is 
> > arch/ia64/configs/tiger_defconfig with CONFIG_SMP switched from =y to 
> > =n).
> 
> could you try the full patchset that Travis has just sent and which i've 
> put into x86.git, you can pull it from:

Looks ok for powerpc so far, I haven't gotten through all defconfigs yet
but the first ones that failed before build now. pasemi_defconfig boots
as well.


-Olof

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: x86/non-x86: percpu, node ids, apic ids x86.git fixup
  2008-01-30 18:31           ` Luck, Tony
  2008-01-30 18:41             ` Mike Travis
  2008-01-30 18:49             ` Ingo Molnar
@ 2008-01-30 19:17             ` Mike Travis
  2008-01-30 19:30               ` Ingo Molnar
  2008-01-30 19:33               ` Luck, Tony
  2 siblings, 2 replies; 35+ messages in thread
From: Mike Travis @ 2008-01-30 19:17 UTC (permalink / raw)
  To: Luck, Tony
  Cc: Ingo Molnar, Geert Uytterhoeven, Linus Torvalds, Thomas Gleixner,
	Linux Kernel Development, Linux/PPC Development, linux-ia64,
	sparclinux

Luck, Tony wrote:
>> Could you check the patch below? With this applied to latest -git, ia64 
>> buils fine for me in a cross-compiling environment. (but i dont know 
>> whether it boots ...)
> 
> Uni-processor build still fails with this patch (config is arch/ia64/configs/tiger_defconfig
> with CONFIG_SMP switched from =y to =n).

Hi Tony,

I'm having trouble replicating this error.  With the latest linux-2.6.git
plus the patch I just sent, I get the following errors:

drivers/input/mouse/psmouse-base.c:45: error: __param_proto causes a section type conflict
drivers/md/md.c:5881: error: __param_start_ro causes a section type conflict

(plenty of warnings too, but no vmlinux)

I copied arch/ia64/configs/tiger_defconfig to .config, ran menuconfig to
turn off SMP and built with this line:

make ARCH=ia64 CROSS_COMPILE=ia64-linux-gnu- -i -j10

Could this be a problem with:

#ifdef HAVE_MODEL_SMALL_ATTRIBUTE
# define PER_CPU_ATTRIBUTES     __attribute__((__model__ (__small__)))
#endif

This is only defined for !__ASSEMBLY__

Thanks,
Mike

> 
> arch/ia64/kernel/built-in.o(.text+0x5012): In function `show_interrupts':
> : relocation truncated to fit: IMM22 per_cpu__kstat
> arch/ia64/kernel/built-in.o(.text+0x53e1): In function `__bind_irq_vector':
> : relocation truncated to fit: IMM22 per_cpu__vector_irq
> arch/ia64/kernel/built-in.o(.text+0x5612): In function `__clear_irq_vector':
> : relocation truncated to fit: IMM22 per_cpu__vector_irq
> arch/ia64/kernel/built-in.o(.text+0x5a81): In function `__setup_vector_irq':
> : relocation truncated to fit: IMM22 per_cpu__vector_irq
> arch/ia64/kernel/built-in.o(.text+0x6231): In function `ia64_handle_irq':
> : relocation truncated to fit: IMM22 per_cpu____irq_regs
> arch/ia64/kernel/built-in.o(.text+0x6272): In function `ia64_handle_irq':
> : relocation truncated to fit: IMM22 per_cpu__vector_irq
> arch/ia64/kernel/built-in.o(.text+0x7b81): In function `cpu_idle_wait':
> : relocation truncated to fit: IMM22 .text
> arch/ia64/kernel/built-in.o(.text+0x7e21): In function `cpu_idle':
> : relocation truncated to fit: IMM22 .text
> arch/ia64/kernel/built-in.o(.text+0x7fd1): In function `ia64_save_extra':
> : relocation truncated to fit: IMM22 per_cpu__pfm_syst_info
> arch/ia64/kernel/built-in.o(.text+0x8071): In function `ia64_load_extra':
> : relocation truncated to fit: IMM22 per_cpu__pfm_syst_info
> arch/ia64/kernel/built-in.o(.text+0x95c0): In function `pfm_write_ibr_dbr':
> : additional relocation overflows omitted from the output
> ld: final link failed: Nonrepresentable section on output
> make: *** [.tmp_vmlinux1] Error 1
> 
> SMP build (config zx1_defconfig) builds ok and boots ok too.
> 
> -Tony


^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: x86/non-x86: percpu, node ids, apic ids x86.git fixup
  2008-01-30 19:13               ` Olof Johansson
@ 2008-01-30 19:18                 ` Ingo Molnar
  2008-01-30 21:25                 ` [powerpc changes] " Ingo Molnar
  1 sibling, 0 replies; 35+ messages in thread
From: Ingo Molnar @ 2008-01-30 19:18 UTC (permalink / raw)
  To: Olof Johansson
  Cc: Luck, Tony, sparclinux, linux-ia64, Linux Kernel Development,
	Mike Travis, Linux/PPC Development, Geert Uytterhoeven,
	Thomas Gleixner, Linus Torvalds


* Olof Johansson <olof@lixom.net> wrote:

> > could you try the full patchset that Travis has just sent and which 
> > i've put into x86.git, you can pull it from:
> 
> Looks ok for powerpc so far, I haven't gotten through all defconfigs 
> yet but the first ones that failed before build now. pasemi_defconfig 
> boots as well.

great, thanks!

	Ingo

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: x86/non-x86: percpu, node ids, apic ids x86.git fixup
  2008-01-30 19:17             ` Mike Travis
@ 2008-01-30 19:30               ` Ingo Molnar
  2008-01-30 19:33               ` Luck, Tony
  1 sibling, 0 replies; 35+ messages in thread
From: Ingo Molnar @ 2008-01-30 19:30 UTC (permalink / raw)
  To: Mike Travis
  Cc: Luck, Tony, Geert Uytterhoeven, Linus Torvalds, Thomas Gleixner,
	Linux Kernel Development, Linux/PPC Development, linux-ia64,
	sparclinux


* Mike Travis <travis@sgi.com> wrote:

> Could this be a problem with:
> 
> #ifdef HAVE_MODEL_SMALL_ATTRIBUTE
> # define PER_CPU_ATTRIBUTES     __attribute__((__model__ (__small__)))
> #endif
> 
> This is only defined for !__ASSEMBLY__

nope, moving that per the patch below did not resolve the link problems.

	Ingo

-------------->
Subject: ia64: build fix #3
From: Ingo Molnar <mingo@elte.hu>

Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 include/asm-ia64/percpu.h |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Index: linux-x86.q/include/asm-ia64/percpu.h
===================================================================
--- linux-x86.q.orig/include/asm-ia64/percpu.h
+++ linux-x86.q/include/asm-ia64/percpu.h
@@ -8,6 +8,10 @@
 
 #define PERCPU_ENOUGH_ROOM PERCPU_PAGE_SIZE
 
+#ifdef HAVE_MODEL_SMALL_ATTRIBUTE
+# define PER_CPU_ATTRIBUTES	__attribute__((__model__ (__small__)))
+#endif
+
 #ifdef __ASSEMBLY__
 # define THIS_CPU(var)	(per_cpu__##var)  /* use this to mark accesses to per-CPU variables... */
 #else /* !__ASSEMBLY__ */
@@ -15,10 +19,6 @@
 
 #include <linux/threads.h>
 
-#ifdef HAVE_MODEL_SMALL_ATTRIBUTE
-# define PER_CPU_ATTRIBUTES	__attribute__((__model__ (__small__)))
-#endif
-
 #ifdef CONFIG_SMP
 
 #define __my_cpu_offset	__ia64_per_cpu_var(local_per_cpu_offset)

^ permalink raw reply	[flat|nested] 35+ messages in thread

* RE: x86/non-x86: percpu, node ids, apic ids x86.git fixup
  2008-01-30 19:17             ` Mike Travis
  2008-01-30 19:30               ` Ingo Molnar
@ 2008-01-30 19:33               ` Luck, Tony
  2008-01-30 19:46                 ` Ingo Molnar
  2008-01-31 10:47                 ` Adrian Bunk
  1 sibling, 2 replies; 35+ messages in thread
From: Luck, Tony @ 2008-01-30 19:33 UTC (permalink / raw)
  To: Mike Travis
  Cc: Ingo Molnar, Geert Uytterhoeven, Linus Torvalds, Thomas Gleixner,
	Linux Kernel Development, Linux/PPC Development, linux-ia64,
	sparclinux

> I'm having trouble replicating this error.  With the latest linux-2.6.git
> plus the patch I just sent, I get the following errors:
>
> drivers/input/mouse/psmouse-base.c:45: error: __param_proto causes a section type conflict
> drivers/md/md.c:5881: error: __param_start_ro causes a section type conflict

Weird.  psmouse-base.c builds ok for me.  Perhaps there is a compiler
version difference?  I'm running a rather old 3.4.6 that came with
my RHEL 4.5 release.

> (plenty of warnings too, but no vmlinux)
New section mismatch checks are complaining about lots of stuff in this
post 2.6.24 world.  There are a couple of dozen other warnings in a
"normal" build.

> I copied arch/ia64/configs/tiger_defconfig to .config, ran menuconfig to
> turn off SMP and built with this line

Yup ... my script is a little different.  It uses
	$ sed -e '/CONFIG_SMP/d' arch/ia64/configs/tiger_defconfig > .config
	$ make oldconfig

But the net effect should be equivalent.

> #ifdef HAVE_MODEL_SMALL_ATTRIBUTE
> # define PER_CPU_ATTRIBUTES     __attribute__((__model__ (__small__)))
> #endif
> 
> This is only defined for !__ASSEMBLY__

Some place in there.  The CONFIG_SMP=n path in ia64 makes quite radical
changes ... rather than putting all the per-cpu stuff into the top 64K
of address space and providing a per-cpu TLB mapping for that range to a
different physical address ... it just makes all the per-cpu stuff link
as ordinary variables in .data.  The error messages indicate that some of
the new code is unaware of this.

-Tony

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: x86/non-x86: percpu, node ids, apic ids x86.git fixup
  2008-01-30 19:33               ` Luck, Tony
@ 2008-01-30 19:46                 ` Ingo Molnar
  2008-01-30 19:49                   ` Ingo Molnar
  2008-01-30 20:00                   ` Luck, Tony
  2008-01-31 10:47                 ` Adrian Bunk
  1 sibling, 2 replies; 35+ messages in thread
From: Ingo Molnar @ 2008-01-30 19:46 UTC (permalink / raw)
  To: Luck, Tony
  Cc: Mike Travis, Geert Uytterhoeven, Linus Torvalds, Thomas Gleixner,
	Linux Kernel Development, Linux/PPC Development, linux-ia64,
	sparclinux


* Luck, Tony <tony.luck@intel.com> wrote:

> > This is only defined for !__ASSEMBLY__
> 
> Some place in there.  The CONFIG_SMP=n path in ia64 makes quite 
> radical changes ... rather than putting all the per-cpu stuff into the 
> top 64K of address space and providing a per-cpu TLB mapping for that 
> range to a different physical address ... it just makes all the 
> per-cpu stuff link as ordinary variables in .data.  The error messages 
> indicate that some of the new code is unaware of this.

ah, that was the vital clue. The patch below makes the small memory 
model only defined on SMP, and makes the config build/link fine here. 
Does this build and boot on your box?

	Ingo

------------>
Subject: ia64: build fix #3
From: Ingo Molnar <mingo@elte.hu>

Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 include/asm-ia64/percpu.h |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Index: linux-x86.q/include/asm-ia64/percpu.h
===================================================================
--- linux-x86.q.orig/include/asm-ia64/percpu.h
+++ linux-x86.q/include/asm-ia64/percpu.h
@@ -15,12 +15,12 @@
 
 #include <linux/threads.h>
 
+#ifdef CONFIG_SMP
+
 #ifdef HAVE_MODEL_SMALL_ATTRIBUTE
 # define PER_CPU_ATTRIBUTES	__attribute__((__model__ (__small__)))
 #endif
 
-#ifdef CONFIG_SMP
-
 #define __my_cpu_offset	__ia64_per_cpu_var(local_per_cpu_offset)
 
 extern void *per_cpu_init(void);


^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: x86/non-x86: percpu, node ids, apic ids x86.git fixup
  2008-01-30 19:46                 ` Ingo Molnar
@ 2008-01-30 19:49                   ` Ingo Molnar
  2008-01-30 20:00                   ` Luck, Tony
  1 sibling, 0 replies; 35+ messages in thread
From: Ingo Molnar @ 2008-01-30 19:49 UTC (permalink / raw)
  To: Luck, Tony
  Cc: Mike Travis, Geert Uytterhoeven, Linus Torvalds, Thomas Gleixner,
	Linux Kernel Development, Linux/PPC Development, linux-ia64,
	sparclinux


* Ingo Molnar <mingo@elte.hu> wrote:

> > Some place in there.  The CONFIG_SMP=n path in ia64 makes quite 
> > radical changes ... rather than putting all the per-cpu stuff into 
> > the top 64K of address space and providing a per-cpu TLB mapping for 
> > that range to a different physical address ... it just makes all the 
> > per-cpu stuff link as ordinary variables in .data.  The error 
> > messages indicate that some of the new code is unaware of this.
> 
> ah, that was the vital clue. The patch below makes the small memory 
> model only defined on SMP, and makes the config build/link fine here. 
> Does this build and boot on your box?

if this works for you then could you please send me your Acked-by as 
well, for this and the other ia64 changes, so that we can send these to 
Linus ASAP?

	Ingo

^ permalink raw reply	[flat|nested] 35+ messages in thread

* RE: x86/non-x86: percpu, node ids, apic ids x86.git fixup
  2008-01-30 19:46                 ` Ingo Molnar
  2008-01-30 19:49                   ` Ingo Molnar
@ 2008-01-30 20:00                   ` Luck, Tony
  2008-01-30 20:02                     ` Ingo Molnar
  1 sibling, 1 reply; 35+ messages in thread
From: Luck, Tony @ 2008-01-30 20:00 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Mike Travis, Geert Uytterhoeven, Linus Torvalds, Thomas Gleixner,
	Linux Kernel Development, Linux/PPC Development, linux-ia64,
	sparclinux

> ah, that was the vital clue. The patch below makes the small memory 
> model only defined on SMP, and makes the config build/link fine here. 
> Does this build and boot on your box?

I applied this on top of the git pull from
 git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86.git

and I see see a build problem for SMP=n :-(

-Tony

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: x86/non-x86: percpu, node ids, apic ids x86.git fixup
  2008-01-30 20:00                   ` Luck, Tony
@ 2008-01-30 20:02                     ` Ingo Molnar
  2008-01-30 20:17                       ` Luck, Tony
  0 siblings, 1 reply; 35+ messages in thread
From: Ingo Molnar @ 2008-01-30 20:02 UTC (permalink / raw)
  To: Luck, Tony
  Cc: Mike Travis, Geert Uytterhoeven, Linus Torvalds, Thomas Gleixner,
	Linux Kernel Development, Linux/PPC Development, linux-ia64,
	sparclinux


* Luck, Tony <tony.luck@intel.com> wrote:

> > ah, that was the vital clue. The patch below makes the small memory 
> > model only defined on SMP, and makes the config build/link fine here. 
> > Does this build and boot on your box?
> 
> I applied this on top of the git pull from
>  git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86.git
> 
> and I see see a build problem for SMP=n :-(

could you send the .config you are using?

	Ingo

^ permalink raw reply	[flat|nested] 35+ messages in thread

* RE: x86/non-x86: percpu, node ids, apic ids x86.git fixup
  2008-01-30 20:02                     ` Ingo Molnar
@ 2008-01-30 20:17                       ` Luck, Tony
  2008-01-30 20:59                         ` Ingo Molnar
  0 siblings, 1 reply; 35+ messages in thread
From: Luck, Tony @ 2008-01-30 20:17 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Mike Travis, Geert Uytterhoeven, Linus Torvalds, Thomas Gleixner,
	Linux Kernel Development, Linux/PPC Development, linux-ia64,
	sparclinux

[-- Attachment #1: Type: text/plain, Size: 72 bytes --]

> could you send the .config you are using?

Ok.  Attached.

-Tony

[-- Attachment #2: upconfig --]
[-- Type: application/octet-stream, Size: 30898 bytes --]

#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.24
# Wed Jan 30 11:54:32 2008
#
CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"

#
# General setup
#
CONFIG_EXPERIMENTAL=y
CONFIG_BROKEN_ON_SMP=y
CONFIG_INIT_ENV_ARG_LIMIT=32
CONFIG_LOCALVERSION=""
CONFIG_LOCALVERSION_AUTO=y
CONFIG_SWAP=y
CONFIG_SYSVIPC=y
CONFIG_SYSVIPC_SYSCTL=y
CONFIG_POSIX_MQUEUE=y
# CONFIG_BSD_PROCESS_ACCT is not set
# CONFIG_TASKSTATS is not set
# CONFIG_USER_NS is not set
# CONFIG_PID_NS is not set
# CONFIG_AUDIT is not set
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
CONFIG_LOG_BUF_SHIFT=20
# CONFIG_CGROUPS is not set
CONFIG_FAIR_GROUP_SCHED=y
CONFIG_FAIR_USER_SCHED=y
# CONFIG_FAIR_CGROUP_SCHED is not set
CONFIG_SYSFS_DEPRECATED=y
# CONFIG_RELAY is not set
CONFIG_BLK_DEV_INITRD=y
CONFIG_INITRAMFS_SOURCE=""
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_SYSCTL=y
# CONFIG_EMBEDDED is not set
CONFIG_SYSCTL_SYSCALL=y
CONFIG_KALLSYMS=y
CONFIG_KALLSYMS_ALL=y
# CONFIG_KALLSYMS_EXTRA_PASS is not set
CONFIG_HOTPLUG=y
CONFIG_PRINTK=y
CONFIG_BUG=y
CONFIG_ELF_CORE=y
CONFIG_BASE_FULL=y
CONFIG_FUTEX=y
CONFIG_ANON_INODES=y
CONFIG_EPOLL=y
CONFIG_SIGNALFD=y
CONFIG_EVENTFD=y
CONFIG_SHMEM=y
CONFIG_VM_EVENT_COUNTERS=y
CONFIG_SLUB_DEBUG=y
# CONFIG_SLAB is not set
CONFIG_SLUB=y
# CONFIG_SLOB is not set
CONFIG_SLABINFO=y
CONFIG_RT_MUTEXES=y
# CONFIG_TINY_SHMEM is not set
CONFIG_BASE_SMALL=0
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
# CONFIG_MODULE_FORCE_UNLOAD is not set
CONFIG_MODVERSIONS=y
CONFIG_MODULE_SRCVERSION_ALL=y
CONFIG_KMOD=y
CONFIG_BLOCK=y
# CONFIG_BLK_DEV_IO_TRACE is not set
# CONFIG_BLK_DEV_BSG is not set

#
# IO Schedulers
#
CONFIG_IOSCHED_NOOP=y
CONFIG_IOSCHED_AS=y
CONFIG_IOSCHED_DEADLINE=y
CONFIG_IOSCHED_CFQ=y
CONFIG_DEFAULT_AS=y
# CONFIG_DEFAULT_DEADLINE is not set
# CONFIG_DEFAULT_CFQ is not set
# CONFIG_DEFAULT_NOOP is not set
CONFIG_DEFAULT_IOSCHED="anticipatory"
CONFIG_CLASSIC_RCU=y
# CONFIG_PREEMPT_RCU is not set

#
# Processor type and features
#
CONFIG_IA64=y
CONFIG_64BIT=y
CONFIG_ZONE_DMA=y
CONFIG_QUICKLIST=y
CONFIG_MMU=y
CONFIG_SWIOTLB=y
CONFIG_RWSEM_XCHGADD_ALGORITHM=y
# CONFIG_ARCH_HAS_ILOG2_U32 is not set
# CONFIG_ARCH_HAS_ILOG2_U64 is not set
CONFIG_HUGETLB_PAGE_SIZE_VARIABLE=y
CONFIG_GENERIC_FIND_NEXT_BIT=y
CONFIG_GENERIC_CALIBRATE_DELAY=y
CONFIG_GENERIC_TIME=y
CONFIG_GENERIC_TIME_VSYSCALL=y
CONFIG_HAVE_SETUP_PER_CPU_AREA=y
CONFIG_DMI=y
CONFIG_EFI=y
CONFIG_GENERIC_IOMAP=y
CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
CONFIG_AUDIT_ARCH=y
# CONFIG_IA64_GENERIC is not set
CONFIG_IA64_DIG=y
# CONFIG_IA64_HP_ZX1 is not set
# CONFIG_IA64_HP_ZX1_SWIOTLB is not set
# CONFIG_IA64_SGI_SN2 is not set
# CONFIG_IA64_HP_SIM is not set
# CONFIG_ITANIUM is not set
CONFIG_MCKINLEY=y
# CONFIG_IA64_PAGE_SIZE_4KB is not set
# CONFIG_IA64_PAGE_SIZE_8KB is not set
# CONFIG_IA64_PAGE_SIZE_16KB is not set
CONFIG_IA64_PAGE_SIZE_64KB=y
CONFIG_PGTABLE_3=y
# CONFIG_PGTABLE_4 is not set
# CONFIG_HZ_100 is not set
CONFIG_HZ_250=y
# CONFIG_HZ_300 is not set
# CONFIG_HZ_1000 is not set
CONFIG_HZ=250
# CONFIG_SCHED_HRTICK is not set
CONFIG_IA64_L1_CACHE_SHIFT=7
CONFIG_IA64_CYCLONE=y
CONFIG_IOSAPIC=y
CONFIG_FORCE_MAX_ZONEORDER=17
# CONFIG_SMP is not set
CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y
CONFIG_PREEMPT_NONE=y
# CONFIG_PREEMPT_VOLUNTARY is not set
# CONFIG_PREEMPT is not set
CONFIG_RCU_TRACE=y
CONFIG_SELECT_MEMORY_MODEL=y
CONFIG_FLATMEM_MANUAL=y
# CONFIG_DISCONTIGMEM_MANUAL is not set
# CONFIG_SPARSEMEM_MANUAL is not set
CONFIG_FLATMEM=y
CONFIG_FLAT_NODE_MEM_MAP=y
# CONFIG_SPARSEMEM_STATIC is not set
CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y
CONFIG_SPLIT_PTLOCK_CPUS=4
CONFIG_RESOURCES_64BIT=y
CONFIG_ZONE_DMA_FLAG=1
CONFIG_BOUNCE=y
CONFIG_NR_QUICK=1
CONFIG_VIRT_TO_BUS=y
CONFIG_ARCH_SELECT_MEMORY_MODEL=y
CONFIG_ARCH_DISCONTIGMEM_ENABLE=y
CONFIG_ARCH_FLATMEM_ENABLE=y
CONFIG_ARCH_SPARSEMEM_ENABLE=y
CONFIG_ARCH_POPULATES_NODE_MAP=y
CONFIG_VIRTUAL_MEM_MAP=y
CONFIG_HOLES_IN_ZONE=y
# CONFIG_IA32_SUPPORT is not set
# CONFIG_COMPAT_FOR_U64_ALIGNMENT is not set
CONFIG_IA64_MCA_RECOVERY=y
CONFIG_PERFMON=y
CONFIG_IA64_PALINFO=y
# CONFIG_IA64_MC_ERR_INJECT is not set
# CONFIG_IA64_ESI is not set
# CONFIG_IA64_HP_AML_NFW is not set
CONFIG_KEXEC=y
# CONFIG_CRASH_DUMP is not set

#
# Firmware Drivers
#
CONFIG_EFI_VARS=y
CONFIG_EFI_PCDP=y
CONFIG_DMIID=y
CONFIG_BINFMT_ELF=y
CONFIG_BINFMT_MISC=m

#
# Power management and ACPI
#
CONFIG_PM=y
CONFIG_PM_LEGACY=y
# CONFIG_PM_DEBUG is not set
CONFIG_ACPI=y
CONFIG_ACPI_PROCFS=y
CONFIG_ACPI_PROCFS_POWER=y
CONFIG_ACPI_SYSFS_POWER=y
CONFIG_ACPI_PROC_EVENT=y
CONFIG_ACPI_BUTTON=m
CONFIG_ACPI_FAN=m
# CONFIG_ACPI_DOCK is not set
CONFIG_ACPI_PROCESSOR=m
CONFIG_ACPI_THERMAL=m
CONFIG_ACPI_BLACKLIST_YEAR=0
# CONFIG_ACPI_DEBUG is not set
CONFIG_ACPI_EC=y
CONFIG_ACPI_POWER=y
CONFIG_ACPI_SYSTEM=y
CONFIG_ACPI_CONTAINER=m

#
# CPU Frequency scaling
#
# CONFIG_CPU_FREQ is not set

#
# Bus options (PCI, PCMCIA)
#
CONFIG_PCI=y
CONFIG_PCI_DOMAINS=y
CONFIG_PCI_SYSCALL=y
# CONFIG_PCIEPORTBUS is not set
CONFIG_ARCH_SUPPORTS_MSI=y
# CONFIG_PCI_MSI is not set
CONFIG_PCI_LEGACY=y
# CONFIG_PCI_DEBUG is not set
CONFIG_HOTPLUG_PCI=m
# CONFIG_HOTPLUG_PCI_FAKE is not set
CONFIG_HOTPLUG_PCI_ACPI=m
# CONFIG_HOTPLUG_PCI_ACPI_IBM is not set
# CONFIG_HOTPLUG_PCI_CPCI is not set
# CONFIG_HOTPLUG_PCI_SHPC is not set
# CONFIG_PCCARD is not set

#
# Networking
#
CONFIG_NET=y

#
# Networking options
#
CONFIG_PACKET=y
# CONFIG_PACKET_MMAP is not set
CONFIG_UNIX=y
CONFIG_XFRM=y
# CONFIG_XFRM_USER is not set
# CONFIG_XFRM_SUB_POLICY is not set
# CONFIG_XFRM_MIGRATE is not set
# CONFIG_XFRM_STATISTICS is not set
# CONFIG_NET_KEY is not set
CONFIG_INET=y
CONFIG_IP_MULTICAST=y
# CONFIG_IP_ADVANCED_ROUTER is not set
CONFIG_IP_FIB_HASH=y
# CONFIG_IP_PNP is not set
# CONFIG_NET_IPIP is not set
# CONFIG_NET_IPGRE is not set
# CONFIG_IP_MROUTE is not set
CONFIG_ARPD=y
CONFIG_SYN_COOKIES=y
# CONFIG_INET_AH is not set
# CONFIG_INET_ESP is not set
# CONFIG_INET_IPCOMP is not set
# CONFIG_INET_XFRM_TUNNEL is not set
# CONFIG_INET_TUNNEL is not set
CONFIG_INET_XFRM_MODE_TRANSPORT=y
CONFIG_INET_XFRM_MODE_TUNNEL=y
CONFIG_INET_XFRM_MODE_BEET=y
# CONFIG_INET_LRO is not set
CONFIG_INET_DIAG=y
CONFIG_INET_TCP_DIAG=y
# CONFIG_TCP_CONG_ADVANCED is not set
CONFIG_TCP_CONG_CUBIC=y
CONFIG_DEFAULT_TCP_CONG="cubic"
# CONFIG_TCP_MD5SIG is not set
# CONFIG_IPV6 is not set
# CONFIG_INET6_XFRM_TUNNEL is not set
# CONFIG_INET6_TUNNEL is not set
# CONFIG_NETWORK_SECMARK is not set
# CONFIG_NETFILTER is not set
# CONFIG_IP_DCCP is not set
# CONFIG_IP_SCTP is not set
# CONFIG_TIPC is not set
# CONFIG_ATM is not set
# CONFIG_BRIDGE is not set
# CONFIG_VLAN_8021Q is not set
# CONFIG_DECNET is not set
# CONFIG_LLC2 is not set
# CONFIG_IPX is not set
# CONFIG_ATALK is not set
# CONFIG_X25 is not set
# CONFIG_LAPB is not set
# CONFIG_ECONET is not set
# CONFIG_WAN_ROUTER is not set
# CONFIG_NET_SCHED is not set

#
# Network testing
#
# CONFIG_NET_PKTGEN is not set
# CONFIG_HAMRADIO is not set
# CONFIG_CAN is not set
# CONFIG_IRDA is not set
# CONFIG_BT is not set
# CONFIG_AF_RXRPC is not set

#
# Wireless
#
# CONFIG_CFG80211 is not set
# CONFIG_WIRELESS_EXT is not set
# CONFIG_MAC80211 is not set
# CONFIG_IEEE80211 is not set
# CONFIG_RFKILL is not set
# CONFIG_NET_9P is not set

#
# Device Drivers
#

#
# Generic Driver Options
#
CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
CONFIG_STANDALONE=y
CONFIG_PREVENT_FIRMWARE_BUILD=y
CONFIG_FW_LOADER=m
# CONFIG_DEBUG_DRIVER is not set
# CONFIG_DEBUG_DEVRES is not set
# CONFIG_SYS_HYPERVISOR is not set
# CONFIG_CONNECTOR is not set
# CONFIG_MTD is not set
# CONFIG_PARPORT is not set
CONFIG_PNP=y
# CONFIG_PNP_DEBUG is not set

#
# Protocols
#
CONFIG_PNPACPI=y
CONFIG_BLK_DEV=y
# CONFIG_BLK_CPQ_DA is not set
# CONFIG_BLK_CPQ_CISS_DA is not set
# CONFIG_BLK_DEV_DAC960 is not set
# CONFIG_BLK_DEV_UMEM is not set
# CONFIG_BLK_DEV_COW_COMMON is not set
CONFIG_BLK_DEV_LOOP=m
CONFIG_BLK_DEV_CRYPTOLOOP=m
CONFIG_BLK_DEV_NBD=m
# CONFIG_BLK_DEV_SX8 is not set
# CONFIG_BLK_DEV_UB is not set
CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_COUNT=16
CONFIG_BLK_DEV_RAM_SIZE=4096
CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
# CONFIG_CDROM_PKTCDVD is not set
# CONFIG_ATA_OVER_ETH is not set
CONFIG_MISC_DEVICES=y
# CONFIG_PHANTOM is not set
# CONFIG_EEPROM_93CX6 is not set
# CONFIG_SGI_IOC4 is not set
# CONFIG_TIFM_CORE is not set
CONFIG_IDE=y
CONFIG_IDE_MAX_HWIFS=4
CONFIG_BLK_DEV_IDE=y

#
# Please see Documentation/ide.txt for help/info on IDE drives
#
# CONFIG_BLK_DEV_IDE_SATA is not set
CONFIG_BLK_DEV_IDEDISK=y
# CONFIG_IDEDISK_MULTI_MODE is not set
CONFIG_BLK_DEV_IDECD=y
# CONFIG_BLK_DEV_IDETAPE is not set
CONFIG_BLK_DEV_IDEFLOPPY=y
CONFIG_BLK_DEV_IDESCSI=m
# CONFIG_BLK_DEV_IDEACPI is not set
# CONFIG_IDE_TASK_IOCTL is not set
CONFIG_IDE_PROC_FS=y

#
# IDE chipset support/bugfixes
#
# CONFIG_IDE_GENERIC is not set
# CONFIG_BLK_DEV_PLATFORM is not set
# CONFIG_BLK_DEV_IDEPNP is not set

#
# PCI IDE chipsets support
#
CONFIG_BLK_DEV_IDEPCI=y
CONFIG_IDEPCI_PCIBUS_ORDER=y
# CONFIG_BLK_DEV_OFFBOARD is not set
CONFIG_BLK_DEV_GENERIC=y
# CONFIG_BLK_DEV_OPTI621 is not set
CONFIG_BLK_DEV_IDEDMA_PCI=y
# CONFIG_BLK_DEV_AEC62XX is not set
# CONFIG_BLK_DEV_ALI15X3 is not set
# CONFIG_BLK_DEV_AMD74XX is not set
CONFIG_BLK_DEV_CMD64X=y
# CONFIG_BLK_DEV_TRIFLEX is not set
# CONFIG_BLK_DEV_CY82C693 is not set
# CONFIG_BLK_DEV_CS5520 is not set
# CONFIG_BLK_DEV_CS5530 is not set
# CONFIG_BLK_DEV_HPT34X is not set
# CONFIG_BLK_DEV_HPT366 is not set
# CONFIG_BLK_DEV_JMICRON is not set
# CONFIG_BLK_DEV_SC1200 is not set
CONFIG_BLK_DEV_PIIX=y
# CONFIG_BLK_DEV_IT8213 is not set
# CONFIG_BLK_DEV_IT821X is not set
# CONFIG_BLK_DEV_NS87415 is not set
# CONFIG_BLK_DEV_PDC202XX_OLD is not set
# CONFIG_BLK_DEV_PDC202XX_NEW is not set
# CONFIG_BLK_DEV_SVWKS is not set
# CONFIG_BLK_DEV_SIIMAGE is not set
# CONFIG_BLK_DEV_SLC90E66 is not set
# CONFIG_BLK_DEV_TRM290 is not set
# CONFIG_BLK_DEV_VIA82CXXX is not set
# CONFIG_BLK_DEV_TC86C001 is not set
CONFIG_BLK_DEV_IDEDMA=y
CONFIG_IDE_ARCH_OBSOLETE_INIT=y
# CONFIG_BLK_DEV_HD is not set

#
# SCSI device support
#
# CONFIG_RAID_ATTRS is not set
CONFIG_SCSI=y
CONFIG_SCSI_DMA=y
# CONFIG_SCSI_TGT is not set
CONFIG_SCSI_NETLINK=y
CONFIG_SCSI_PROC_FS=y

#
# SCSI support type (disk, tape, CD-ROM)
#
CONFIG_BLK_DEV_SD=y
CONFIG_CHR_DEV_ST=m
# CONFIG_CHR_DEV_OSST is not set
CONFIG_BLK_DEV_SR=m
# CONFIG_BLK_DEV_SR_VENDOR is not set
CONFIG_CHR_DEV_SG=m
# CONFIG_CHR_DEV_SCH is not set

#
# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
#
# CONFIG_SCSI_MULTI_LUN is not set
# CONFIG_SCSI_CONSTANTS is not set
# CONFIG_SCSI_LOGGING is not set
# CONFIG_SCSI_SCAN_ASYNC is not set
CONFIG_SCSI_WAIT_SCAN=m

#
# SCSI Transports
#
CONFIG_SCSI_SPI_ATTRS=y
CONFIG_SCSI_FC_ATTRS=y
# CONFIG_SCSI_ISCSI_ATTRS is not set
# CONFIG_SCSI_SAS_LIBSAS is not set
# CONFIG_SCSI_SRP_ATTRS is not set
CONFIG_SCSI_LOWLEVEL=y
# CONFIG_ISCSI_TCP is not set
# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
# CONFIG_SCSI_3W_9XXX is not set
# CONFIG_SCSI_ACARD is not set
# CONFIG_SCSI_AACRAID is not set
# CONFIG_SCSI_AIC7XXX is not set
# CONFIG_SCSI_AIC7XXX_OLD is not set
# CONFIG_SCSI_AIC79XX is not set
# CONFIG_SCSI_AIC94XX is not set
# CONFIG_SCSI_ADVANSYS is not set
# CONFIG_SCSI_ARCMSR is not set
# CONFIG_MEGARAID_NEWGEN is not set
# CONFIG_MEGARAID_LEGACY is not set
# CONFIG_MEGARAID_SAS is not set
# CONFIG_SCSI_HPTIOP is not set
# CONFIG_SCSI_DMX3191D is not set
# CONFIG_SCSI_FUTURE_DOMAIN is not set
# CONFIG_SCSI_IPS is not set
# CONFIG_SCSI_INITIO is not set
# CONFIG_SCSI_INIA100 is not set
# CONFIG_SCSI_STEX is not set
CONFIG_SCSI_SYM53C8XX_2=y
CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1
CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16
CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64
CONFIG_SCSI_SYM53C8XX_MMIO=y
CONFIG_SCSI_QLOGIC_1280=y
# CONFIG_SCSI_QLA_FC is not set
# CONFIG_SCSI_QLA_ISCSI is not set
# CONFIG_SCSI_LPFC is not set
# CONFIG_SCSI_DC395x is not set
# CONFIG_SCSI_DC390T is not set
# CONFIG_SCSI_DEBUG is not set
# CONFIG_SCSI_SRP is not set
# CONFIG_ATA is not set
CONFIG_MD=y
CONFIG_BLK_DEV_MD=m
CONFIG_MD_LINEAR=m
CONFIG_MD_RAID0=m
CONFIG_MD_RAID1=m
# CONFIG_MD_RAID10 is not set
# CONFIG_MD_RAID456 is not set
CONFIG_MD_MULTIPATH=m
# CONFIG_MD_FAULTY is not set
CONFIG_BLK_DEV_DM=m
# CONFIG_DM_DEBUG is not set
CONFIG_DM_CRYPT=m
CONFIG_DM_SNAPSHOT=m
CONFIG_DM_MIRROR=m
CONFIG_DM_ZERO=m
# CONFIG_DM_MULTIPATH is not set
# CONFIG_DM_DELAY is not set
# CONFIG_DM_UEVENT is not set
CONFIG_FUSION=y
CONFIG_FUSION_SPI=y
CONFIG_FUSION_FC=y
# CONFIG_FUSION_SAS is not set
CONFIG_FUSION_MAX_SGE=128
CONFIG_FUSION_CTL=y
# CONFIG_FUSION_LOGGING is not set

#
# IEEE 1394 (FireWire) support
#
# CONFIG_FIREWIRE is not set
# CONFIG_IEEE1394 is not set
# CONFIG_I2O is not set
CONFIG_NETDEVICES=y
# CONFIG_NETDEVICES_MULTIQUEUE is not set
CONFIG_DUMMY=m
# CONFIG_BONDING is not set
# CONFIG_MACVLAN is not set
# CONFIG_EQUALIZER is not set
# CONFIG_TUN is not set
# CONFIG_VETH is not set
# CONFIG_NET_SB1000 is not set
# CONFIG_ARCNET is not set
# CONFIG_PHYLIB is not set
CONFIG_NET_ETHERNET=y
CONFIG_MII=m
# CONFIG_HAPPYMEAL is not set
# CONFIG_SUNGEM is not set
# CONFIG_CASSINI is not set
# CONFIG_NET_VENDOR_3COM is not set
CONFIG_NET_TULIP=y
# CONFIG_DE2104X is not set
CONFIG_TULIP=m
# CONFIG_TULIP_MWI is not set
# CONFIG_TULIP_MMIO is not set
# CONFIG_TULIP_NAPI is not set
# CONFIG_DE4X5 is not set
# CONFIG_WINBOND_840 is not set
# CONFIG_DM9102 is not set
# CONFIG_ULI526X is not set
# CONFIG_HP100 is not set
# CONFIG_IBM_NEW_EMAC_ZMII is not set
# CONFIG_IBM_NEW_EMAC_RGMII is not set
# CONFIG_IBM_NEW_EMAC_TAH is not set
# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
CONFIG_NET_PCI=y
# CONFIG_PCNET32 is not set
# CONFIG_AMD8111_ETH is not set
# CONFIG_ADAPTEC_STARFIRE is not set
# CONFIG_B44 is not set
# CONFIG_FORCEDETH is not set
CONFIG_EEPRO100=m
CONFIG_E100=m
# CONFIG_FEALNX is not set
# CONFIG_NATSEMI is not set
# CONFIG_NE2K_PCI is not set
# CONFIG_8139CP is not set
# CONFIG_8139TOO is not set
# CONFIG_R6040 is not set
# CONFIG_SIS900 is not set
# CONFIG_EPIC100 is not set
# CONFIG_SUNDANCE is not set
# CONFIG_VIA_RHINE is not set
# CONFIG_SC92031 is not set
CONFIG_NETDEV_1000=y
# CONFIG_ACENIC is not set
# CONFIG_DL2K is not set
CONFIG_E1000=y
# CONFIG_E1000_NAPI is not set
# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
# CONFIG_E1000E is not set
# CONFIG_E1000E_ENABLED is not set
# CONFIG_IP1000 is not set
# CONFIG_IGB is not set
# CONFIG_NS83820 is not set
# CONFIG_HAMACHI is not set
# CONFIG_YELLOWFIN is not set
# CONFIG_R8169 is not set
# CONFIG_SIS190 is not set
# CONFIG_SKGE is not set
# CONFIG_SKY2 is not set
# CONFIG_SK98LIN is not set
# CONFIG_VIA_VELOCITY is not set
CONFIG_TIGON3=y
# CONFIG_BNX2 is not set
# CONFIG_QLA3XXX is not set
# CONFIG_ATL1 is not set
CONFIG_NETDEV_10000=y
# CONFIG_CHELSIO_T1 is not set
# CONFIG_CHELSIO_T3 is not set
# CONFIG_IXGBE is not set
# CONFIG_IXGB is not set
# CONFIG_S2IO is not set
# CONFIG_MYRI10GE is not set
# CONFIG_NETXEN_NIC is not set
# CONFIG_NIU is not set
# CONFIG_MLX4_CORE is not set
# CONFIG_TEHUTI is not set
# CONFIG_BNX2X is not set
# CONFIG_TR is not set

#
# Wireless LAN
#
# CONFIG_WLAN_PRE80211 is not set
# CONFIG_WLAN_80211 is not set

#
# USB Network Adapters
#
# CONFIG_USB_CATC is not set
# CONFIG_USB_KAWETH is not set
# CONFIG_USB_PEGASUS is not set
# CONFIG_USB_RTL8150 is not set
# CONFIG_USB_USBNET is not set
# CONFIG_WAN is not set
# CONFIG_FDDI is not set
# CONFIG_HIPPI is not set
# CONFIG_PPP is not set
# CONFIG_SLIP is not set
# CONFIG_NET_FC is not set
CONFIG_NETCONSOLE=y
# CONFIG_NETCONSOLE_DYNAMIC is not set
CONFIG_NETPOLL=y
# CONFIG_NETPOLL_TRAP is not set
CONFIG_NET_POLL_CONTROLLER=y
# CONFIG_ISDN is not set
# CONFIG_PHONE is not set

#
# Input device support
#
CONFIG_INPUT=y
# CONFIG_INPUT_FF_MEMLESS is not set
# CONFIG_INPUT_POLLDEV is not set

#
# Userland interfaces
#
CONFIG_INPUT_MOUSEDEV=y
CONFIG_INPUT_MOUSEDEV_PSAUX=y
CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
# CONFIG_INPUT_JOYDEV is not set
# CONFIG_INPUT_EVDEV is not set
# CONFIG_INPUT_EVBUG is not set

#
# Input Device Drivers
#
CONFIG_INPUT_KEYBOARD=y
CONFIG_KEYBOARD_ATKBD=y
# CONFIG_KEYBOARD_SUNKBD is not set
# CONFIG_KEYBOARD_LKKBD is not set
# CONFIG_KEYBOARD_XTKBD is not set
# CONFIG_KEYBOARD_NEWTON is not set
# CONFIG_KEYBOARD_STOWAWAY is not set
CONFIG_INPUT_MOUSE=y
CONFIG_MOUSE_PS2=y
CONFIG_MOUSE_PS2_ALPS=y
CONFIG_MOUSE_PS2_LOGIPS2PP=y
CONFIG_MOUSE_PS2_SYNAPTICS=y
CONFIG_MOUSE_PS2_LIFEBOOK=y
CONFIG_MOUSE_PS2_TRACKPOINT=y
# CONFIG_MOUSE_PS2_TOUCHKIT is not set
# CONFIG_MOUSE_SERIAL is not set
# CONFIG_MOUSE_APPLETOUCH is not set
# CONFIG_MOUSE_VSXXXAA is not set
# CONFIG_INPUT_JOYSTICK is not set
# CONFIG_INPUT_TABLET is not set
# CONFIG_INPUT_TOUCHSCREEN is not set
# CONFIG_INPUT_MISC is not set

#
# Hardware I/O ports
#
CONFIG_SERIO=y
CONFIG_SERIO_I8042=y
# CONFIG_SERIO_SERPORT is not set
# CONFIG_SERIO_PCIPS2 is not set
CONFIG_SERIO_LIBPS2=y
# CONFIG_SERIO_RAW is not set
CONFIG_GAMEPORT=m
# CONFIG_GAMEPORT_NS558 is not set
# CONFIG_GAMEPORT_L4 is not set
# CONFIG_GAMEPORT_EMU10K1 is not set
# CONFIG_GAMEPORT_FM801 is not set

#
# Character devices
#
CONFIG_VT=y
CONFIG_VT_CONSOLE=y
CONFIG_HW_CONSOLE=y
# CONFIG_VT_HW_CONSOLE_BINDING is not set
CONFIG_SERIAL_NONSTANDARD=y
# CONFIG_COMPUTONE is not set
# CONFIG_ROCKETPORT is not set
# CONFIG_CYCLADES is not set
# CONFIG_DIGIEPCA is not set
# CONFIG_MOXA_INTELLIO is not set
# CONFIG_MOXA_SMARTIO is not set
# CONFIG_MOXA_SMARTIO_NEW is not set
# CONFIG_ISI is not set
# CONFIG_SYNCLINKMP is not set
# CONFIG_SYNCLINK_GT is not set
# CONFIG_N_HDLC is not set
# CONFIG_RISCOM8 is not set
# CONFIG_SPECIALIX is not set
# CONFIG_SX is not set
# CONFIG_RIO is not set
# CONFIG_STALDRV is not set
# CONFIG_NOZOMI is not set

#
# Serial drivers
#
CONFIG_SERIAL_8250=y
CONFIG_SERIAL_8250_CONSOLE=y
CONFIG_SERIAL_8250_PCI=y
CONFIG_SERIAL_8250_PNP=y
CONFIG_SERIAL_8250_NR_UARTS=6
CONFIG_SERIAL_8250_RUNTIME_UARTS=4
CONFIG_SERIAL_8250_EXTENDED=y
CONFIG_SERIAL_8250_SHARE_IRQ=y
# CONFIG_SERIAL_8250_DETECT_IRQ is not set
# CONFIG_SERIAL_8250_RSA is not set

#
# Non-8250 serial port support
#
CONFIG_SERIAL_CORE=y
CONFIG_SERIAL_CORE_CONSOLE=y
# CONFIG_SERIAL_JSM is not set
CONFIG_UNIX98_PTYS=y
CONFIG_LEGACY_PTYS=y
CONFIG_LEGACY_PTY_COUNT=256
# CONFIG_IPMI_HANDLER is not set
# CONFIG_HW_RANDOM is not set
CONFIG_EFI_RTC=y
# CONFIG_R3964 is not set
# CONFIG_APPLICOM is not set
CONFIG_RAW_DRIVER=m
CONFIG_MAX_RAW_DEVS=256
CONFIG_HPET=y
# CONFIG_HPET_RTC_IRQ is not set
CONFIG_HPET_MMAP=y
# CONFIG_HANGCHECK_TIMER is not set
# CONFIG_TCG_TPM is not set
CONFIG_DEVPORT=y
# CONFIG_I2C is not set

#
# SPI support
#
# CONFIG_SPI is not set
# CONFIG_SPI_MASTER is not set
# CONFIG_W1 is not set
CONFIG_POWER_SUPPLY=y
# CONFIG_POWER_SUPPLY_DEBUG is not set
# CONFIG_PDA_POWER is not set
# CONFIG_BATTERY_DS2760 is not set
CONFIG_HWMON=y
# CONFIG_HWMON_VID is not set
# CONFIG_SENSORS_I5K_AMB is not set
# CONFIG_SENSORS_F71805F is not set
# CONFIG_SENSORS_F71882FG is not set
# CONFIG_SENSORS_IT87 is not set
# CONFIG_SENSORS_PC87360 is not set
# CONFIG_SENSORS_PC87427 is not set
# CONFIG_SENSORS_SIS5595 is not set
# CONFIG_SENSORS_SMSC47M1 is not set
# CONFIG_SENSORS_SMSC47B397 is not set
# CONFIG_SENSORS_VIA686A is not set
# CONFIG_SENSORS_VT1211 is not set
# CONFIG_SENSORS_VT8231 is not set
# CONFIG_SENSORS_W83627HF is not set
# CONFIG_SENSORS_W83627EHF is not set
# CONFIG_HWMON_DEBUG_CHIP is not set
# CONFIG_WATCHDOG is not set

#
# Sonics Silicon Backplane
#
CONFIG_SSB_POSSIBLE=y
# CONFIG_SSB is not set

#
# Multifunction device drivers
#
# CONFIG_MFD_SM501 is not set

#
# Multimedia devices
#
# CONFIG_VIDEO_DEV is not set
# CONFIG_DVB_CORE is not set
CONFIG_DAB=y
# CONFIG_USB_DABUSB is not set

#
# Graphics support
#
CONFIG_AGP=m
CONFIG_AGP_I460=m
CONFIG_DRM=m
CONFIG_DRM_TDFX=m
CONFIG_DRM_R128=m
CONFIG_DRM_RADEON=m
CONFIG_DRM_MGA=m
CONFIG_DRM_SIS=m
# CONFIG_DRM_VIA is not set
# CONFIG_DRM_SAVAGE is not set
# CONFIG_VGASTATE is not set
# CONFIG_VIDEO_OUTPUT_CONTROL is not set
# CONFIG_FB is not set
# CONFIG_BACKLIGHT_LCD_SUPPORT is not set

#
# Display device support
#
# CONFIG_DISPLAY_SUPPORT is not set

#
# Console display driver support
#
CONFIG_VGA_CONSOLE=y
# CONFIG_VGACON_SOFT_SCROLLBACK is not set
CONFIG_DUMMY_CONSOLE=y

#
# Sound
#
# CONFIG_SOUND is not set
CONFIG_HID_SUPPORT=y
CONFIG_HID=y
# CONFIG_HID_DEBUG is not set
# CONFIG_HIDRAW is not set

#
# USB Input Devices
#
CONFIG_USB_HID=y
# CONFIG_USB_HIDINPUT_POWERBOOK is not set
# CONFIG_HID_FF is not set
# CONFIG_USB_HIDDEV is not set
CONFIG_USB_SUPPORT=y
CONFIG_USB_ARCH_HAS_HCD=y
CONFIG_USB_ARCH_HAS_OHCI=y
CONFIG_USB_ARCH_HAS_EHCI=y
CONFIG_USB=y
# CONFIG_USB_DEBUG is not set

#
# Miscellaneous USB options
#
CONFIG_USB_DEVICEFS=y
CONFIG_USB_DEVICE_CLASS=y
# CONFIG_USB_DYNAMIC_MINORS is not set
# CONFIG_USB_SUSPEND is not set
# CONFIG_USB_PERSIST is not set
# CONFIG_USB_OTG is not set

#
# USB Host Controller Drivers
#
CONFIG_USB_EHCI_HCD=m
# CONFIG_USB_EHCI_SPLIT_ISO is not set
# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
# CONFIG_USB_EHCI_TT_NEWSCHED is not set
# CONFIG_USB_ISP116X_HCD is not set
CONFIG_USB_OHCI_HCD=m
# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
CONFIG_USB_OHCI_LITTLE_ENDIAN=y
CONFIG_USB_UHCI_HCD=y
# CONFIG_USB_SL811_HCD is not set
# CONFIG_USB_R8A66597_HCD is not set

#
# USB Device Class drivers
#
# CONFIG_USB_ACM is not set
# CONFIG_USB_PRINTER is not set

#
# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
#

#
# may also be needed; see USB_STORAGE Help for more information
#
CONFIG_USB_STORAGE=m
# CONFIG_USB_STORAGE_DEBUG is not set
# CONFIG_USB_STORAGE_DATAFAB is not set
# CONFIG_USB_STORAGE_FREECOM is not set
# CONFIG_USB_STORAGE_ISD200 is not set
# CONFIG_USB_STORAGE_DPCM is not set
# CONFIG_USB_STORAGE_USBAT is not set
# CONFIG_USB_STORAGE_SDDR09 is not set
# CONFIG_USB_STORAGE_SDDR55 is not set
# CONFIG_USB_STORAGE_JUMPSHOT is not set
# CONFIG_USB_STORAGE_ALAUDA is not set
# CONFIG_USB_STORAGE_KARMA is not set
# CONFIG_USB_LIBUSUAL is not set

#
# USB Imaging devices
#
# CONFIG_USB_MDC800 is not set
# CONFIG_USB_MICROTEK is not set
# CONFIG_USB_MON is not set

#
# USB port drivers
#

#
# USB Serial Converter support
#
# CONFIG_USB_SERIAL is not set

#
# USB Miscellaneous drivers
#
# CONFIG_USB_EMI62 is not set
# CONFIG_USB_EMI26 is not set
# CONFIG_USB_ADUTUX is not set
# CONFIG_USB_AUERSWALD is not set
# CONFIG_USB_RIO500 is not set
# CONFIG_USB_LEGOTOWER is not set
# CONFIG_USB_LCD is not set
# CONFIG_USB_BERRY_CHARGE is not set
# CONFIG_USB_LED is not set
# CONFIG_USB_CYPRESS_CY7C63 is not set
# CONFIG_USB_CYTHERM is not set
# CONFIG_USB_PHIDGET is not set
# CONFIG_USB_IDMOUSE is not set
# CONFIG_USB_FTDI_ELAN is not set
# CONFIG_USB_APPLEDISPLAY is not set
# CONFIG_USB_SISUSBVGA is not set
# CONFIG_USB_LD is not set
# CONFIG_USB_TRANCEVIBRATOR is not set
# CONFIG_USB_IOWARRIOR is not set
# CONFIG_USB_TEST is not set

#
# USB DSL modem support
#

#
# USB Gadget Support
#
# CONFIG_USB_GADGET is not set
# CONFIG_MMC is not set
# CONFIG_NEW_LEDS is not set
# CONFIG_INFINIBAND is not set
# CONFIG_RTC_CLASS is not set

#
# Userspace I/O
#
# CONFIG_UIO is not set
# CONFIG_MSPEC is not set

#
# File systems
#
CONFIG_EXT2_FS=y
CONFIG_EXT2_FS_XATTR=y
CONFIG_EXT2_FS_POSIX_ACL=y
CONFIG_EXT2_FS_SECURITY=y
# CONFIG_EXT2_FS_XIP is not set
CONFIG_EXT3_FS=y
CONFIG_EXT3_FS_XATTR=y
CONFIG_EXT3_FS_POSIX_ACL=y
CONFIG_EXT3_FS_SECURITY=y
# CONFIG_EXT4DEV_FS is not set
CONFIG_JBD=y
# CONFIG_JBD_DEBUG is not set
CONFIG_FS_MBCACHE=y
CONFIG_REISERFS_FS=y
# CONFIG_REISERFS_CHECK is not set
# CONFIG_REISERFS_PROC_INFO is not set
CONFIG_REISERFS_FS_XATTR=y
CONFIG_REISERFS_FS_POSIX_ACL=y
CONFIG_REISERFS_FS_SECURITY=y
# CONFIG_JFS_FS is not set
CONFIG_FS_POSIX_ACL=y
CONFIG_XFS_FS=y
# CONFIG_XFS_QUOTA is not set
# CONFIG_XFS_SECURITY is not set
# CONFIG_XFS_POSIX_ACL is not set
# CONFIG_XFS_RT is not set
# CONFIG_GFS2_FS is not set
# CONFIG_OCFS2_FS is not set
# CONFIG_MINIX_FS is not set
# CONFIG_ROMFS_FS is not set
CONFIG_INOTIFY=y
CONFIG_INOTIFY_USER=y
# CONFIG_QUOTA is not set
CONFIG_DNOTIFY=y
CONFIG_AUTOFS_FS=y
CONFIG_AUTOFS4_FS=y
# CONFIG_FUSE_FS is not set

#
# CD-ROM/DVD Filesystems
#
CONFIG_ISO9660_FS=m
CONFIG_JOLIET=y
# CONFIG_ZISOFS is not set
CONFIG_UDF_FS=m
CONFIG_UDF_NLS=y

#
# DOS/FAT/NT Filesystems
#
CONFIG_FAT_FS=y
# CONFIG_MSDOS_FS is not set
CONFIG_VFAT_FS=y
CONFIG_FAT_DEFAULT_CODEPAGE=437
CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
CONFIG_NTFS_FS=m
# CONFIG_NTFS_DEBUG is not set
# CONFIG_NTFS_RW is not set

#
# Pseudo filesystems
#
CONFIG_PROC_FS=y
CONFIG_PROC_KCORE=y
CONFIG_PROC_SYSCTL=y
CONFIG_SYSFS=y
CONFIG_TMPFS=y
# CONFIG_TMPFS_POSIX_ACL is not set
CONFIG_HUGETLBFS=y
CONFIG_HUGETLB_PAGE=y
# CONFIG_CONFIGFS_FS is not set

#
# Miscellaneous filesystems
#
# CONFIG_ADFS_FS is not set
# CONFIG_AFFS_FS is not set
# CONFIG_HFS_FS is not set
# CONFIG_HFSPLUS_FS is not set
# CONFIG_BEFS_FS is not set
# CONFIG_BFS_FS is not set
# CONFIG_EFS_FS is not set
# CONFIG_CRAMFS is not set
# CONFIG_VXFS_FS is not set
# CONFIG_HPFS_FS is not set
# CONFIG_QNX4FS_FS is not set
# CONFIG_SYSV_FS is not set
# CONFIG_UFS_FS is not set
CONFIG_NETWORK_FILESYSTEMS=y
CONFIG_NFS_FS=m
CONFIG_NFS_V3=y
# CONFIG_NFS_V3_ACL is not set
CONFIG_NFS_V4=y
CONFIG_NFS_DIRECTIO=y
CONFIG_NFSD=m
CONFIG_NFSD_V3=y
# CONFIG_NFSD_V3_ACL is not set
CONFIG_NFSD_V4=y
CONFIG_NFSD_TCP=y
CONFIG_LOCKD=m
CONFIG_LOCKD_V4=y
CONFIG_EXPORTFS=m
CONFIG_NFS_COMMON=y
CONFIG_SUNRPC=m
CONFIG_SUNRPC_GSS=m
# CONFIG_SUNRPC_BIND34 is not set
CONFIG_RPCSEC_GSS_KRB5=m
# CONFIG_RPCSEC_GSS_SPKM3 is not set
CONFIG_SMB_FS=m
CONFIG_SMB_NLS_DEFAULT=y
CONFIG_SMB_NLS_REMOTE="cp437"
CONFIG_CIFS=m
# CONFIG_CIFS_STATS is not set
# CONFIG_CIFS_WEAK_PW_HASH is not set
# CONFIG_CIFS_XATTR is not set
# CONFIG_CIFS_DEBUG2 is not set
# CONFIG_CIFS_EXPERIMENTAL is not set
# CONFIG_NCP_FS is not set
# CONFIG_CODA_FS is not set
# CONFIG_AFS_FS is not set

#
# Partition Types
#
CONFIG_PARTITION_ADVANCED=y
# CONFIG_ACORN_PARTITION is not set
# CONFIG_OSF_PARTITION is not set
# CONFIG_AMIGA_PARTITION is not set
# CONFIG_ATARI_PARTITION is not set
# CONFIG_MAC_PARTITION is not set
CONFIG_MSDOS_PARTITION=y
# CONFIG_BSD_DISKLABEL is not set
# CONFIG_MINIX_SUBPARTITION is not set
# CONFIG_SOLARIS_X86_PARTITION is not set
# CONFIG_UNIXWARE_DISKLABEL is not set
# CONFIG_LDM_PARTITION is not set
CONFIG_SGI_PARTITION=y
# CONFIG_ULTRIX_PARTITION is not set
# CONFIG_SUN_PARTITION is not set
# CONFIG_KARMA_PARTITION is not set
CONFIG_EFI_PARTITION=y
# CONFIG_SYSV68_PARTITION is not set
CONFIG_NLS=y
CONFIG_NLS_DEFAULT="iso8859-1"
CONFIG_NLS_CODEPAGE_437=y
CONFIG_NLS_CODEPAGE_737=m
CONFIG_NLS_CODEPAGE_775=m
CONFIG_NLS_CODEPAGE_850=m
CONFIG_NLS_CODEPAGE_852=m
CONFIG_NLS_CODEPAGE_855=m
CONFIG_NLS_CODEPAGE_857=m
CONFIG_NLS_CODEPAGE_860=m
CONFIG_NLS_CODEPAGE_861=m
CONFIG_NLS_CODEPAGE_862=m
CONFIG_NLS_CODEPAGE_863=m
CONFIG_NLS_CODEPAGE_864=m
CONFIG_NLS_CODEPAGE_865=m
CONFIG_NLS_CODEPAGE_866=m
CONFIG_NLS_CODEPAGE_869=m
CONFIG_NLS_CODEPAGE_936=m
CONFIG_NLS_CODEPAGE_950=m
CONFIG_NLS_CODEPAGE_932=m
CONFIG_NLS_CODEPAGE_949=m
CONFIG_NLS_CODEPAGE_874=m
CONFIG_NLS_ISO8859_8=m
CONFIG_NLS_CODEPAGE_1250=m
CONFIG_NLS_CODEPAGE_1251=m
# CONFIG_NLS_ASCII is not set
CONFIG_NLS_ISO8859_1=y
CONFIG_NLS_ISO8859_2=m
CONFIG_NLS_ISO8859_3=m
CONFIG_NLS_ISO8859_4=m
CONFIG_NLS_ISO8859_5=m
CONFIG_NLS_ISO8859_6=m
CONFIG_NLS_ISO8859_7=m
CONFIG_NLS_ISO8859_9=m
CONFIG_NLS_ISO8859_13=m
CONFIG_NLS_ISO8859_14=m
CONFIG_NLS_ISO8859_15=m
CONFIG_NLS_KOI8_R=m
CONFIG_NLS_KOI8_U=m
CONFIG_NLS_UTF8=m
# CONFIG_DLM is not set

#
# Library routines
#
CONFIG_BITREVERSE=y
# CONFIG_CRC_CCITT is not set
# CONFIG_CRC16 is not set
# CONFIG_CRC_ITU_T is not set
CONFIG_CRC32=y
# CONFIG_CRC7 is not set
# CONFIG_LIBCRC32C is not set
CONFIG_PLIST=y
CONFIG_HAS_IOMEM=y
CONFIG_HAS_IOPORT=y
CONFIG_HAS_DMA=y
CONFIG_GENERIC_HARDIRQS=y
CONFIG_GENERIC_IRQ_PROBE=y
CONFIG_IRQ_PER_CPU=y
CONFIG_INSTRUMENTATION=y
# CONFIG_PROFILING is not set
# CONFIG_KPROBES is not set
# CONFIG_MARKERS is not set

#
# Kernel hacking
#
# CONFIG_PRINTK_TIME is not set
CONFIG_ENABLE_WARN_DEPRECATED=y
CONFIG_ENABLE_MUST_CHECK=y
CONFIG_MAGIC_SYSRQ=y
# CONFIG_UNUSED_SYMBOLS is not set
CONFIG_DEBUG_FS=y
# CONFIG_HEADERS_CHECK is not set
# CONFIG_DEBUG_SECTION_MISMATCH is not set
CONFIG_DEBUG_KERNEL=y
# CONFIG_DEBUG_SHIRQ is not set
CONFIG_DETECT_SOFTLOCKUP=y
CONFIG_SCHED_DEBUG=y
# CONFIG_SCHEDSTATS is not set
# CONFIG_TIMER_STATS is not set
# CONFIG_SLUB_DEBUG_ON is not set
# CONFIG_DEBUG_RT_MUTEXES is not set
# CONFIG_RT_MUTEX_TESTER is not set
# CONFIG_DEBUG_SPINLOCK is not set
CONFIG_DEBUG_MUTEXES=y
# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
# CONFIG_DEBUG_KOBJECT is not set
# CONFIG_DEBUG_INFO is not set
# CONFIG_DEBUG_VM is not set
# CONFIG_DEBUG_LIST is not set
# CONFIG_DEBUG_SG is not set
CONFIG_FORCED_INLINING=y
# CONFIG_BOOT_PRINTK_DELAY is not set
# CONFIG_RCU_TORTURE_TEST is not set
# CONFIG_BACKTRACE_SELF_TEST is not set
# CONFIG_FAULT_INJECTION is not set
# CONFIG_SAMPLES is not set
CONFIG_IA64_GRANULE_16MB=y
# CONFIG_IA64_GRANULE_64MB is not set
# CONFIG_IA64_PRINT_HAZARDS is not set
# CONFIG_DISABLE_VHPT is not set
# CONFIG_IA64_DEBUG_CMPXCHG is not set
# CONFIG_IA64_DEBUG_IRQ is not set

#
# Security options
#
# CONFIG_KEYS is not set
# CONFIG_SECURITY is not set
# CONFIG_SECURITY_FILE_CAPABILITIES is not set
CONFIG_CRYPTO=y
CONFIG_CRYPTO_ALGAPI=y
CONFIG_CRYPTO_BLKCIPHER=m
# CONFIG_CRYPTO_SEQIV is not set
CONFIG_CRYPTO_MANAGER=m
# CONFIG_CRYPTO_HMAC is not set
# CONFIG_CRYPTO_XCBC is not set
# CONFIG_CRYPTO_NULL is not set
# CONFIG_CRYPTO_MD4 is not set
CONFIG_CRYPTO_MD5=y
# CONFIG_CRYPTO_SHA1 is not set
# CONFIG_CRYPTO_SHA256 is not set
# CONFIG_CRYPTO_SHA512 is not set
# CONFIG_CRYPTO_WP512 is not set
# CONFIG_CRYPTO_TGR192 is not set
# CONFIG_CRYPTO_GF128MUL is not set
CONFIG_CRYPTO_ECB=m
CONFIG_CRYPTO_CBC=m
CONFIG_CRYPTO_PCBC=m
# CONFIG_CRYPTO_LRW is not set
# CONFIG_CRYPTO_XTS is not set
# CONFIG_CRYPTO_CTR is not set
# CONFIG_CRYPTO_GCM is not set
# CONFIG_CRYPTO_CCM is not set
# CONFIG_CRYPTO_CRYPTD is not set
CONFIG_CRYPTO_DES=m
# CONFIG_CRYPTO_FCRYPT is not set
# CONFIG_CRYPTO_BLOWFISH is not set
# CONFIG_CRYPTO_TWOFISH is not set
# CONFIG_CRYPTO_SERPENT is not set
# CONFIG_CRYPTO_AES is not set
# CONFIG_CRYPTO_CAST5 is not set
# CONFIG_CRYPTO_CAST6 is not set
# CONFIG_CRYPTO_TEA is not set
# CONFIG_CRYPTO_ARC4 is not set
# CONFIG_CRYPTO_KHAZAD is not set
# CONFIG_CRYPTO_ANUBIS is not set
# CONFIG_CRYPTO_SEED is not set
# CONFIG_CRYPTO_SALSA20 is not set
# CONFIG_CRYPTO_DEFLATE is not set
# CONFIG_CRYPTO_MICHAEL_MIC is not set
# CONFIG_CRYPTO_CRC32C is not set
# CONFIG_CRYPTO_CAMELLIA is not set
# CONFIG_CRYPTO_TEST is not set
# CONFIG_CRYPTO_AUTHENC is not set
# CONFIG_CRYPTO_LZO is not set
CONFIG_CRYPTO_HW=y
# CONFIG_CRYPTO_DEV_HIFN_795X is not set

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: x86/non-x86: percpu, node ids, apic ids x86.git fixup
  2008-01-30 20:17                       ` Luck, Tony
@ 2008-01-30 20:59                         ` Ingo Molnar
  2008-01-30 21:15                           ` Luck, Tony
  2008-01-31  0:57                           ` Luck, Tony
  0 siblings, 2 replies; 35+ messages in thread
From: Ingo Molnar @ 2008-01-30 20:59 UTC (permalink / raw)
  To: Luck, Tony
  Cc: Mike Travis, Geert Uytterhoeven, Linus Torvalds, Thomas Gleixner,
	Linux Kernel Development, Linux/PPC Development, linux-ia64,
	sparclinux


* Luck, Tony <tony.luck@intel.com> wrote:

> > could you send the .config you are using?
> 
> Ok.  Attached.

thanks a ton - this produced a link error here too.

after half an hour of head scratching, the updated patch below solves 
the build problem.

The problem i believe is this code in arch/ia64/kernel/mca_asm.S:

#define GET_IA64_MCA_DATA(reg)                                          \
        GET_THIS_PADDR(reg, ia64_mca_data)                              \
        ;;                                                              \
        ld8 reg=[reg]

this i believe builds an implicit dependency between the mca_asm.o 
position within the image and the ia64_mca_data percpu variable it 
accesses - it relies on the immediate 22 addressing mode that has 4MB of 
scope. Per chance, the .config you sent creates a 14MB image, and the 
percpu variables moved too far away for the linker to be able to fulfill 
this constraint.

The workaround is to define PER_CPU_ATTRIBUTES to link percpu variables 
back into the .percpu section on UP too - which ia64 links specially 
into its vmlinux.lds. But ultimately i think the better solution would 
be to remove this dependency between arch/ia64/kernel/mca_asm.S and the 
position of the percpu data.

Is my analysis correct? Do you like my fix and does the patch build and 
boot on your system? Thanks,

	Ingo

--------------->
Subject: ia64: on UP percpu variables are not small memory model
From: Ingo Molnar <mingo@elte.hu>

Tony says:

| The CONFIG_SMP=n path in ia64 makes quite radical changes ... rather
| than putting all the per-cpu stuff into the top 64K of address space
| and providing a per-cpu TLB mapping for that range to a different
| physical address ... it just makes all the per-cpu stuff link as ordinary
| variables in .data.

the new generic percpu code got confused about this as PER_CPU_ATTRIBUTES
was defined even on UP, so it picked up that small memory model - which
was not possible to get linked. The right fix is to only define that
on SMP. This resolved the build failures in my cross-compiling environment.

also link these variables into the .percpu section - some assembly code 
has offset dependencies.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 include/asm-ia64/percpu.h |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Index: linux-x86.q/include/asm-ia64/percpu.h
===================================================================
--- linux-x86.q.orig/include/asm-ia64/percpu.h
+++ linux-x86.q/include/asm-ia64/percpu.h
@@ -15,18 +15,20 @@
 
 #include <linux/threads.h>
 
+#ifdef CONFIG_SMP
+
 #ifdef HAVE_MODEL_SMALL_ATTRIBUTE
 # define PER_CPU_ATTRIBUTES	__attribute__((__model__ (__small__)))
 #endif
 
-#ifdef CONFIG_SMP
-
 #define __my_cpu_offset	__ia64_per_cpu_var(local_per_cpu_offset)
 
 extern void *per_cpu_init(void);
 
 #else /* ! SMP */
 
+#define PER_CPU_ATTRIBUTES	__attribute__((__section__(".data.percpu")))
+
 #define per_cpu_init()				(__phys_per_cpu_start)
 
 #endif	/* SMP */

^ permalink raw reply	[flat|nested] 35+ messages in thread

* RE: x86/non-x86: percpu, node ids, apic ids x86.git fixup
  2008-01-30 20:59                         ` Ingo Molnar
@ 2008-01-30 21:15                           ` Luck, Tony
  2008-01-30 21:20                             ` Ingo Molnar
  2008-01-31  0:57                           ` Luck, Tony
  1 sibling, 1 reply; 35+ messages in thread
From: Luck, Tony @ 2008-01-30 21:15 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Mike Travis, Geert Uytterhoeven, Linus Torvalds, Thomas Gleixner,
	Linux Kernel Development, Linux/PPC Development, linux-ia64,
	sparclinux

> this i believe builds an implicit dependency between the mca_asm.o 
> position within the image and the ia64_mca_data percpu variable it 
> accesses - it relies on the immediate 22 addressing mode that has 4MB of 
> scope. Per chance, the .config you sent creates a 14MB image, and the 
> percpu variables moved too far away for the linker to be able to fulfill 
> this constraint.

Sounds very plausible.

> The workaround is to define PER_CPU_ATTRIBUTES to link percpu variables 
> back into the .percpu section on UP too - which ia64 links specially 
> into its vmlinux.lds. But ultimately i think the better solution would 
> be to remove this dependency between arch/ia64/kernel/mca_asm.S and the 
> position of the percpu data.

Yup.  That fixes the build ... the resulting binary doesn't boot though :-(
I just realized that it has been a while since I tried booting a UP
kernel ... so the problem may be unrelated bitrot elsewhere.

Overall you are right that the mca_asm.S code should not be dependent on
the relative location of the data objects.

I'll start digging on why this doesn't boot ... but you might as well
send the fixes so far upstream to Linus so that the SMP fix is available
(which is all anyone really cares about ... there are very, very few
UP ia64 systems in existence).

Acked-by: Tony Luck <tony.luck@intel.com>


-Tony

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: x86/non-x86: percpu, node ids, apic ids x86.git fixup
  2008-01-30 18:49             ` Ingo Molnar
                                 ` (2 preceding siblings ...)
  2008-01-30 19:13               ` Olof Johansson
@ 2008-01-30 21:18               ` Geoff Levand
  3 siblings, 0 replies; 35+ messages in thread
From: Geoff Levand @ 2008-01-30 21:18 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Luck, Tony, sparclinux, linux-ia64, Linux Kernel Development,
	Mike Travis, Linux/PPC Development, Geert Uytterhoeven,
	Thomas Gleixner, Linus Torvalds

Ingo Molnar wrote:
> * Luck, Tony <tony.luck@intel.com> wrote:
> 
>> > Could you check the patch below? With this applied to latest -git, 
>> > ia64 buils fine for me in a cross-compiling environment. (but i dont 
>> > know whether it boots ...)
>> 
>> Uni-processor build still fails with this patch (config is 
>> arch/ia64/configs/tiger_defconfig with CONFIG_SMP switched from =y to 
>> =n).
> 
> could you try the full patchset that Travis has just sent and which i've 
> put into x86.git, you can pull it from:
> 
>     git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86.git
> 
> it's a fixes only tree, ontop of Linus-very-latest. Head 4b9e425c25f84. 
> [pull from ssh://master.kernel.org if it's not on git.kernel.org yet, 
> uploaded it this very minute.]

Just FYI, the following diff from the above tree applied to linux-2.6.git
works with ps3_defconfig on the PS3 (powerpc):

  git diff dd430ca20c40ecccd6954a7efd13d4398f507728..3823daf866c272c670dda7dc6179a647da64467f

-Geoff


^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: x86/non-x86: percpu, node ids, apic ids x86.git fixup
  2008-01-30 21:15                           ` Luck, Tony
@ 2008-01-30 21:20                             ` Ingo Molnar
  0 siblings, 0 replies; 35+ messages in thread
From: Ingo Molnar @ 2008-01-30 21:20 UTC (permalink / raw)
  To: Luck, Tony
  Cc: Mike Travis, Geert Uytterhoeven, Linus Torvalds, Thomas Gleixner,
	Linux Kernel Development, Linux/PPC Development, linux-ia64,
	sparclinux


* Luck, Tony <tony.luck@intel.com> wrote:

> I'll start digging on why this doesn't boot ... but you might as well 
> send the fixes so far upstream to Linus so that the SMP fix is 
> available (which is all anyone really cares about ... there are very, 
> very few UP ia64 systems in existence).
> 
> Acked-by: Tony Luck <tony.luck@intel.com>

thanks alot! Can i also add your Acked-by to this patch:

  Subject: ia64: use generic percpu
  From: travis@sgi.com

it seems like a sensible cleanup to me.

	Ingo

^ permalink raw reply	[flat|nested] 35+ messages in thread

* [powerpc changes] Re: x86/non-x86: percpu, node ids, apic ids x86.git fixup
  2008-01-30 19:13               ` Olof Johansson
  2008-01-30 19:18                 ` Ingo Molnar
@ 2008-01-30 21:25                 ` Ingo Molnar
  2008-01-30 21:39                   ` Olof Johansson
  2008-01-30 21:56                   ` Geoff Levand
  1 sibling, 2 replies; 35+ messages in thread
From: Ingo Molnar @ 2008-01-30 21:25 UTC (permalink / raw)
  To: Olof Johansson, Paul Mackerras, anton, Geert Uytterhoeven
  Cc: Luck, Tony, sparclinux, linux-ia64, Linux Kernel Development,
	Mike Travis, Linux/PPC Development, Geert Uytterhoeven,
	Thomas Gleixner, Linus Torvalds


* Olof Johansson <olof@lixom.net> wrote:

> > could you try the full patchset that Travis has just sent and which 
> > i've put into x86.git, you can pull it from:
> 
> Looks ok for powerpc so far, I haven't gotten through all defconfigs 
> yet but the first ones that failed before build now. pasemi_defconfig 
> boots as well.

could the PowerPC maintainers please Ack the following patch (attached 
below):

  Subject: POWERPC: use generic per cpu
  From: travis@sgi.com

so that we can push this fix upstream ASAP?

	Ingo

--------------->
Subject: POWERPC: use generic per cpu
From: travis@sgi.com

Powerpc has a way to determine the address of the per cpu area of the
currently executing processor via the paca and the array of per cpu
offsets is avoided by looking up the per cpu area from the remote
paca's (copying x86_64).

Cc: Paul Mackerras <paulus@samba.org>
Cc: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Signed-off-by: Mike Travis <travis@sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 include/asm-powerpc/percpu.h |   22 +++-------------------
 1 file changed, 3 insertions(+), 19 deletions(-)

Index: linux-x86.q/include/asm-powerpc/percpu.h
===================================================================
--- linux-x86.q.orig/include/asm-powerpc/percpu.h
+++ linux-x86.q/include/asm-powerpc/percpu.h
@@ -13,28 +13,12 @@
 #include <asm/paca.h>
 
 #define __per_cpu_offset(cpu) (paca[cpu].data_offset)
-#define __my_cpu_offset() get_paca()->data_offset
+#define __my_cpu_offset get_paca()->data_offset
 #define per_cpu_offset(x) (__per_cpu_offset(x))
 
-/* var is in discarded region: offset to particular copy we want */
-#define per_cpu(var, cpu) (*RELOC_HIDE(&per_cpu__##var, __per_cpu_offset(cpu)))
-#define __get_cpu_var(var) (*RELOC_HIDE(&per_cpu__##var, __my_cpu_offset()))
-#define __raw_get_cpu_var(var) (*RELOC_HIDE(&per_cpu__##var, local_paca->data_offset))
+#endif /* CONFIG_SMP */
+#endif /* __powerpc64__ */
 
-extern void setup_per_cpu_areas(void);
-
-#else /* ! SMP */
-
-#define per_cpu(var, cpu)			(*((void)(cpu), &per_cpu__##var))
-#define __get_cpu_var(var)			per_cpu__##var
-#define __raw_get_cpu_var(var)			per_cpu__##var
-
-#endif	/* SMP */
-
-#define DECLARE_PER_CPU(type, name) extern __typeof__(type) per_cpu__##name
-
-#else
 #include <asm-generic/percpu.h>
-#endif
 
 #endif /* _ASM_POWERPC_PERCPU_H_ */

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [powerpc changes] Re: x86/non-x86: percpu, node ids, apic ids x86.git fixup
  2008-01-30 21:25                 ` [powerpc changes] " Ingo Molnar
@ 2008-01-30 21:39                   ` Olof Johansson
  2008-01-30 21:56                   ` Geoff Levand
  1 sibling, 0 replies; 35+ messages in thread
From: Olof Johansson @ 2008-01-30 21:39 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Paul Mackerras, anton, Geert Uytterhoeven, Luck, Tony,
	sparclinux, linux-ia64, Linux Kernel Development, Mike Travis,
	Linux/PPC Development, Thomas Gleixner, Linus Torvalds

On Wed, Jan 30, 2008 at 10:25:58PM +0100, Ingo Molnar wrote:
> 
> * Olof Johansson <olof@lixom.net> wrote:
> 
> > > could you try the full patchset that Travis has just sent and which 
> > > i've put into x86.git, you can pull it from:
> > 
> > Looks ok for powerpc so far, I haven't gotten through all defconfigs 
> > yet but the first ones that failed before build now. pasemi_defconfig 
> > boots as well.
> 
> could the PowerPC maintainers please Ack the following patch (attached 
> below):
> 
>   Subject: POWERPC: use generic per cpu
>   From: travis@sgi.com
> 
> so that we can push this fix upstream ASAP?

> Subject: POWERPC: use generic per cpu
> From: travis@sgi.com
> 
> Powerpc has a way to determine the address of the per cpu area of the
> currently executing processor via the paca and the array of per cpu
> offsets is avoided by looking up the per cpu area from the remote
> paca's (copying x86_64).
> 
> Cc: Paul Mackerras <paulus@samba.org>
> Cc: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
> Signed-off-by: Mike Travis <travis@sgi.com>
> Signed-off-by: Ingo Molnar <mingo@elte.hu>

Paul is at LCA, I'm not sure if he's reading email. Looks good to me so:

Acked-by: Olof Johansson <olof@lixom.net>


-Olof

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [powerpc changes] Re: x86/non-x86: percpu, node ids, apic ids x86.git fixup
  2008-01-30 21:25                 ` [powerpc changes] " Ingo Molnar
  2008-01-30 21:39                   ` Olof Johansson
@ 2008-01-30 21:56                   ` Geoff Levand
  1 sibling, 0 replies; 35+ messages in thread
From: Geoff Levand @ 2008-01-30 21:56 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Olof Johansson, Paul Mackerras, anton, Geert Uytterhoeven, Luck,
	Tony, linux-ia64, Linux Kernel Development, Mike Travis,
	Linux/PPC Development, sparclinux, Thomas Gleixner,
	Linus Torvalds

Ingo Molnar wrote:
> * Olof Johansson <olof@lixom.net> wrote:
> 
>> > could you try the full patchset that Travis has just sent and which 
>> > i've put into x86.git, you can pull it from:
>> 
>> Looks ok for powerpc so far, I haven't gotten through all defconfigs 
>> yet but the first ones that failed before build now. pasemi_defconfig 
>> boots as well.
> 
> could the PowerPC maintainers please Ack the following patch (attached 
> below):
> 
>   Subject: POWERPC: use generic per cpu
>   From: travis@sgi.com
> 
> so that we can push this fix upstream ASAP?
> 
> 	Ingo
> 
> --------------->
> Subject: POWERPC: use generic per cpu
> From: travis@sgi.com
> 
> Powerpc has a way to determine the address of the per cpu area of the
> currently executing processor via the paca and the array of per cpu
> offsets is avoided by looking up the per cpu area from the remote
> paca's (copying x86_64).
> 
> Cc: Paul Mackerras <paulus@samba.org>
> Cc: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
> Signed-off-by: Mike Travis <travis@sgi.com>
> Signed-off-by: Ingo Molnar <mingo@elte.hu>
> ---
>  include/asm-powerpc/percpu.h |   22 +++-------------------
>  1 file changed, 3 insertions(+), 19 deletions(-)

Tested on PS3 with ps3_defconfig and works OK.

Acked-by: Geoff Levand <geoffrey.levand@am.sony.com>


^ permalink raw reply	[flat|nested] 35+ messages in thread

* RE: x86/non-x86: percpu, node ids, apic ids x86.git fixup
  2008-01-30 20:59                         ` Ingo Molnar
  2008-01-30 21:15                           ` Luck, Tony
@ 2008-01-31  0:57                           ` Luck, Tony
  2008-01-31  9:06                             ` Ingo Molnar
  1 sibling, 1 reply; 35+ messages in thread
From: Luck, Tony @ 2008-01-31  0:57 UTC (permalink / raw)
  To: Luck, Tony, Ingo Molnar
  Cc: Mike Travis, Geert Uytterhoeven, Linus Torvalds, Thomas Gleixner,
	Linux Kernel Development, Linux/PPC Development, linux-ia64,
	sparclinux

> I'll start digging on why this doesn't boot ... but you might as well
> send the fixes so far upstream to Linus so that the SMP fix is available

Well a pure 2.6.24 version compiled with CONFIG_SMP=n booted just fine, so
the breakage is recent ... and more than likely related to this change.

I've only had a casual dig at the failing case ... kernel dies in memset()
as called from kmem_cache_alloc() with the address being written as
0x4000000000117b48 (which is off in the virtual address space range used
by users ... not a kernel address).

I'll dig some more tomorrow.

-Tony

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: x86/non-x86: percpu, node ids, apic ids x86.git fixup
  2008-01-31  0:57                           ` Luck, Tony
@ 2008-01-31  9:06                             ` Ingo Molnar
  2008-01-31 18:34                               ` Luck, Tony
  0 siblings, 1 reply; 35+ messages in thread
From: Ingo Molnar @ 2008-01-31  9:06 UTC (permalink / raw)
  To: Luck, Tony
  Cc: Mike Travis, Geert Uytterhoeven, Linus Torvalds, Thomas Gleixner,
	Linux Kernel Development, Linux/PPC Development, linux-ia64,
	sparclinux


* Luck, Tony <tony.luck@intel.com> wrote:

> > I'll start digging on why this doesn't boot ... but you might as well
> > send the fixes so far upstream to Linus so that the SMP fix is available
> 
> Well a pure 2.6.24 version compiled with CONFIG_SMP=n booted just 
> fine, so the breakage is recent ... and more than likely related to 
> this change.
> 
> I've only had a casual dig at the failing case ... kernel dies in 
> memset() as called from kmem_cache_alloc() with the address being 
> written as 0x4000000000117b48 (which is off in the virtual address 
> space range used by users ... not a kernel address).

hm, as far as i could check, on ia64 UP the .percpu section link 
difference was the only ia64 difference i could find out of those 
changes. Could you try to copy a 2.6.24 include/asm-generic/percpu.h, 
include/asm-ia64.h and include/linux/percpu.h into your current tree, 
and see whether that boots? If yes, then it's the percpu changes. The 
patch below does this ontop of very latest -git - and it builds fine 
with your UP config with a crosscompiler.

> I'll dig some more tomorrow.

thanks.

	Ingo

---
 include/asm-generic/percpu.h |   99 ++++++++++++++++---------------------------
 include/asm-ia64/percpu.h    |   57 +++++++++++++++++++-----
 include/linux/percpu.h       |   20 --------
 3 files changed, 82 insertions(+), 94 deletions(-)

Index: linux-x86.q/include/asm-generic/percpu.h
===================================================================
--- linux-x86.q.orig/include/asm-generic/percpu.h
+++ linux-x86.q/include/asm-generic/percpu.h
@@ -3,79 +3,54 @@
 #include <linux/compiler.h>
 #include <linux/threads.h>
 
-/*
- * Determine the real variable name from the name visible in the
- * kernel sources.
- */
-#define per_cpu_var(var) per_cpu__##var
-
+#define __GENERIC_PER_CPU
 #ifdef CONFIG_SMP
 
-/*
- * per_cpu_offset() is the offset that has to be added to a
- * percpu variable to get to the instance for a certain processor.
- *
- * Most arches use the __per_cpu_offset array for those offsets but
- * some arches have their own ways of determining the offset (x86_64, s390).
- */
-#ifndef __per_cpu_offset
 extern unsigned long __per_cpu_offset[NR_CPUS];
 
 #define per_cpu_offset(x) (__per_cpu_offset[x])
-#endif
-
-/*
- * Determine the offset for the currently active processor.
- * An arch may define __my_cpu_offset to provide a more effective
- * means of obtaining the offset to the per cpu variables of the
- * current processor.
- */
-#ifndef __my_cpu_offset
-#define __my_cpu_offset per_cpu_offset(raw_smp_processor_id())
-#define my_cpu_offset per_cpu_offset(smp_processor_id())
-#else
-#define my_cpu_offset __my_cpu_offset
-#endif
-
-/*
- * Add a offset to a pointer but keep the pointer as is.
- *
- * Only S390 provides its own means of moving the pointer.
- */
-#ifndef SHIFT_PERCPU_PTR
-#define SHIFT_PERCPU_PTR(__p, __offset)	RELOC_HIDE((__p), (__offset))
-#endif
-
-/*
- * A percpu variable may point to a discarded regions. The following are
- * established ways to produce a usable pointer from the percpu variable
- * offset.
- */
-#define per_cpu(var, cpu) \
-	(*SHIFT_PERCPU_PTR(&per_cpu_var(var), per_cpu_offset(cpu)))
-#define __get_cpu_var(var) \
-	(*SHIFT_PERCPU_PTR(&per_cpu_var(var), my_cpu_offset))
-#define __raw_get_cpu_var(var) \
-	(*SHIFT_PERCPU_PTR(&per_cpu_var(var), __my_cpu_offset))
-
-
-#ifdef CONFIG_HAVE_SETUP_PER_CPU_AREA
-extern void setup_per_cpu_areas(void);
-#endif
 
+/* Separate out the type, so (int[3], foo) works. */
+#define DEFINE_PER_CPU(type, name) \
+    __attribute__((__section__(".data.percpu"))) __typeof__(type) per_cpu__##name
+
+#define DEFINE_PER_CPU_SHARED_ALIGNED(type, name)		\
+    __attribute__((__section__(".data.percpu.shared_aligned"))) \
+    __typeof__(type) per_cpu__##name				\
+    ____cacheline_aligned_in_smp
+
+/* var is in discarded region: offset to particular copy we want */
+#define per_cpu(var, cpu) (*({				\
+	extern int simple_identifier_##var(void);	\
+	RELOC_HIDE(&per_cpu__##var, __per_cpu_offset[cpu]); }))
+#define __get_cpu_var(var) per_cpu(var, smp_processor_id())
+#define __raw_get_cpu_var(var) per_cpu(var, raw_smp_processor_id())
+
+/* A macro to avoid #include hell... */
+#define percpu_modcopy(pcpudst, src, size)			\
+do {								\
+	unsigned int __i;					\
+	for_each_possible_cpu(__i)				\
+		memcpy((pcpudst)+__per_cpu_offset[__i],		\
+		       (src), (size));				\
+} while (0)
 #else /* ! SMP */
 
-#define per_cpu(var, cpu)			(*((void)(cpu), &per_cpu_var(var)))
-#define __get_cpu_var(var)			per_cpu_var(var)
-#define __raw_get_cpu_var(var)			per_cpu_var(var)
+#define DEFINE_PER_CPU(type, name) \
+    __typeof__(type) per_cpu__##name
+
+#define DEFINE_PER_CPU_SHARED_ALIGNED(type, name)	\
+    DEFINE_PER_CPU(type, name)
+
+#define per_cpu(var, cpu)			(*((void)(cpu), &per_cpu__##var))
+#define __get_cpu_var(var)			per_cpu__##var
+#define __raw_get_cpu_var(var)			per_cpu__##var
 
 #endif	/* SMP */
 
-#ifndef PER_CPU_ATTRIBUTES
-#define PER_CPU_ATTRIBUTES
-#endif
+#define DECLARE_PER_CPU(type, name) extern __typeof__(type) per_cpu__##name
 
-#define DECLARE_PER_CPU(type, name) extern PER_CPU_ATTRIBUTES \
-					__typeof__(type) per_cpu_var(name)
+#define EXPORT_PER_CPU_SYMBOL(var) EXPORT_SYMBOL(per_cpu__##var)
+#define EXPORT_PER_CPU_SYMBOL_GPL(var) EXPORT_SYMBOL_GPL(per_cpu__##var)
 
 #endif /* _ASM_GENERIC_PERCPU_H_ */
Index: linux-x86.q/include/asm-ia64/percpu.h
===================================================================
--- linux-x86.q.orig/include/asm-ia64/percpu.h
+++ linux-x86.q/include/asm-ia64/percpu.h
@@ -15,36 +15,69 @@
 
 #include <linux/threads.h>
 
-#ifdef CONFIG_SMP
-
 #ifdef HAVE_MODEL_SMALL_ATTRIBUTE
-# define PER_CPU_ATTRIBUTES	__attribute__((__model__ (__small__)))
+# define __SMALL_ADDR_AREA	__attribute__((__model__ (__small__)))
+#else
+# define __SMALL_ADDR_AREA
 #endif
 
-#define __my_cpu_offset	__ia64_per_cpu_var(local_per_cpu_offset)
+#define DECLARE_PER_CPU(type, name)				\
+	extern __SMALL_ADDR_AREA __typeof__(type) per_cpu__##name
+
+/* Separate out the type, so (int[3], foo) works. */
+#define DEFINE_PER_CPU(type, name)				\
+	__attribute__((__section__(".data.percpu")))		\
+	__SMALL_ADDR_AREA __typeof__(type) per_cpu__##name
+
+#ifdef CONFIG_SMP
+#define DEFINE_PER_CPU_SHARED_ALIGNED(type, name)			\
+	__attribute__((__section__(".data.percpu.shared_aligned")))	\
+	__SMALL_ADDR_AREA __typeof__(type) per_cpu__##name		\
+	____cacheline_aligned_in_smp
+#else
+#define DEFINE_PER_CPU_SHARED_ALIGNED(type, name)	\
+	DEFINE_PER_CPU(type, name)
+#endif
+
+/*
+ * Pretty much a literal copy of asm-generic/percpu.h, except that percpu_modcopy() is an
+ * external routine, to avoid include-hell.
+ */
+#ifdef CONFIG_SMP
+
+extern unsigned long __per_cpu_offset[NR_CPUS];
+#define per_cpu_offset(x) (__per_cpu_offset[x])
 
+/* Equal to __per_cpu_offset[smp_processor_id()], but faster to access: */
+DECLARE_PER_CPU(unsigned long, local_per_cpu_offset);
+
+#define per_cpu(var, cpu)  (*RELOC_HIDE(&per_cpu__##var, __per_cpu_offset[cpu]))
+#define __get_cpu_var(var) (*RELOC_HIDE(&per_cpu__##var, __ia64_per_cpu_var(local_per_cpu_offset)))
+#define __raw_get_cpu_var(var) (*RELOC_HIDE(&per_cpu__##var, __ia64_per_cpu_var(local_per_cpu_offset)))
+
+extern void percpu_modcopy(void *pcpudst, const void *src, unsigned long size);
+extern void setup_per_cpu_areas (void);
 extern void *per_cpu_init(void);
 
 #else /* ! SMP */
 
-#define PER_CPU_ATTRIBUTES	__attribute__((__section__(".data.percpu")))
-
+#define per_cpu(var, cpu)			(*((void)(cpu), &per_cpu__##var))
+#define __get_cpu_var(var)			per_cpu__##var
+#define __raw_get_cpu_var(var)			per_cpu__##var
 #define per_cpu_init()				(__phys_per_cpu_start)
 
 #endif	/* SMP */
 
+#define EXPORT_PER_CPU_SYMBOL(var)		EXPORT_SYMBOL(per_cpu__##var)
+#define EXPORT_PER_CPU_SYMBOL_GPL(var)		EXPORT_SYMBOL_GPL(per_cpu__##var)
+
 /*
  * Be extremely careful when taking the address of this variable!  Due to virtual
  * remapping, it is different from the canonical address returned by __get_cpu_var(var)!
  * On the positive side, using __ia64_per_cpu_var() instead of __get_cpu_var() is slightly
  * more efficient.
  */
-#define __ia64_per_cpu_var(var)	per_cpu__##var
-
-#include <asm-generic/percpu.h>
-
-/* Equal to __per_cpu_offset[smp_processor_id()], but faster to access: */
-DECLARE_PER_CPU(unsigned long, local_per_cpu_offset);
+#define __ia64_per_cpu_var(var)	(per_cpu__##var)
 
 #endif /* !__ASSEMBLY__ */
 
Index: linux-x86.q/include/linux/percpu.h
===================================================================
--- linux-x86.q.orig/include/linux/percpu.h
+++ linux-x86.q/include/linux/percpu.h
@@ -9,26 +9,6 @@
 
 #include <asm/percpu.h>
 
-#ifdef CONFIG_SMP
-#define DEFINE_PER_CPU(type, name)					\
-	__attribute__((__section__(".data.percpu")))			\
-	PER_CPU_ATTRIBUTES __typeof__(type) per_cpu__##name
-
-#define DEFINE_PER_CPU_SHARED_ALIGNED(type, name)			\
-	__attribute__((__section__(".data.percpu.shared_aligned")))	\
-	PER_CPU_ATTRIBUTES __typeof__(type) per_cpu__##name		\
-	____cacheline_aligned_in_smp
-#else
-#define DEFINE_PER_CPU(type, name)					\
-	PER_CPU_ATTRIBUTES __typeof__(type) per_cpu__##name
-
-#define DEFINE_PER_CPU_SHARED_ALIGNED(type, name)		      \
-	DEFINE_PER_CPU(type, name)
-#endif
-
-#define EXPORT_PER_CPU_SYMBOL(var) EXPORT_SYMBOL(per_cpu__##var)
-#define EXPORT_PER_CPU_SYMBOL_GPL(var) EXPORT_SYMBOL_GPL(per_cpu__##var)
-
 /* Enough to cover all DEFINE_PER_CPUs in kernel, including modules. */
 #ifndef PERCPU_ENOUGH_ROOM
 #ifdef CONFIG_MODULES

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: x86/non-x86: percpu, node ids, apic ids x86.git fixup
  2008-01-30 19:33               ` Luck, Tony
  2008-01-30 19:46                 ` Ingo Molnar
@ 2008-01-31 10:47                 ` Adrian Bunk
  1 sibling, 0 replies; 35+ messages in thread
From: Adrian Bunk @ 2008-01-31 10:47 UTC (permalink / raw)
  To: Luck, Tony
  Cc: Mike Travis, Ingo Molnar, Geert Uytterhoeven, Linus Torvalds,
	Thomas Gleixner, Linux Kernel Development, Linux/PPC Development,
	linux-ia64, sparclinux, Ivan Kokshaysky

On Wed, Jan 30, 2008 at 11:33:29AM -0800, Luck, Tony wrote:
> > I'm having trouble replicating this error.  With the latest linux-2.6.git
> > plus the patch I just sent, I get the following errors:
> >
> > drivers/input/mouse/psmouse-base.c:45: error: __param_proto causes a section type conflict
> > drivers/md/md.c:5881: error: __param_start_ro causes a section type conflict
> 
> Weird.  psmouse-base.c builds ok for me.  Perhaps there is a compiler
> version difference?  I'm running a rather old 3.4.6 that came with
> my RHEL 4.5 release.
>...

It depends on the compiler version.

And you were in the Cc of Ivan's patch that fixes it... [1]

> -Tony

cu
Adrian

[1] http://lkml.org/lkml/2007/12/27/29

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


^ permalink raw reply	[flat|nested] 35+ messages in thread

* RE: x86/non-x86: percpu, node ids, apic ids x86.git fixup
  2008-01-31  9:06                             ` Ingo Molnar
@ 2008-01-31 18:34                               ` Luck, Tony
  2008-01-31 23:28                                 ` Luck, Tony
  2008-02-05 19:05                                 ` Luck, Tony
  0 siblings, 2 replies; 35+ messages in thread
From: Luck, Tony @ 2008-01-31 18:34 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Mike Travis, Geert Uytterhoeven, Linus Torvalds, Thomas Gleixner,
	Linux Kernel Development, Linux/PPC Development, linux-ia64,
	sparclinux

> hm, as far as i could check, on ia64 UP the .percpu section link 
> difference was the only ia64 difference i could find out of those 
> changes. Could you try to copy a 2.6.24 include/asm-generic/percpu.h, 
> include/asm-ia64.h and include/linux/percpu.h into your current tree, 
> and see whether that boots? If yes, then it's the percpu changes. The 
> patch below does this ontop of very latest -git - and it builds fine 
> with your UP config with a crosscompiler.

Applied that patch and UP kernel built ok, and then crashed in the
same place with the memset() to a user-looking address from kmem_cache_alloc()

So the percpu changes are innocent ... something else since 2.6.24 is
to blame.  Only 5749 commits :-)  I'll start bisecting.

-Tony

^ permalink raw reply	[flat|nested] 35+ messages in thread

* RE: x86/non-x86: percpu, node ids, apic ids x86.git fixup
  2008-01-31 18:34                               ` Luck, Tony
@ 2008-01-31 23:28                                 ` Luck, Tony
  2008-02-05 19:05                                 ` Luck, Tony
  1 sibling, 0 replies; 35+ messages in thread
From: Luck, Tony @ 2008-01-31 23:28 UTC (permalink / raw)
  To: Luck, Tony, Ingo Molnar
  Cc: Mike Travis, Geert Uytterhoeven, Linus Torvalds, Thomas Gleixner,
	Linux Kernel Development, Linux/PPC Development, linux-ia64,
	sparclinux

> So the percpu changes are innocent ... something else since 2.6.24 is
> to blame.  Only 5749 commits :-)  I'll start bisecting.

12 bisections later ... nothing!  I think I got lost in the
maze.  Bisection #5 had a crash, but it looked to be a very
differnt crash (and looked to happen later than the bug I was
hunting).  So I marked that as "good" on the theory that it
looked like this bug wasn't in the kernel. Same thing happened
at bisection #9.  But I ended up with:

commit bfada697bd534d2c16fd07fbef3a4924c4d4e014
Author: Pavel Emelyanov <xemul@openvz.org>
Date:   Sun Dec 2 00:57:08 2007 +1100

    [IPV4]: Use ctl paths to register devinet sysctls


Which just looks too improbable to be the cause of the UP
crash.  Git won't revert it out from top of tree automatically
so I can't easily test whether some weird magic means that
this is the buggy commit.

Perhaps the issue is another offset of object X in kernel w.r.t.
object Y ... and so the good/bad choices in the bisection are
actually pretty random depending on how much code is stuffed
between X & Y at each bisection point.

-Tony

^ permalink raw reply	[flat|nested] 35+ messages in thread

* RE: x86/non-x86: percpu, node ids, apic ids x86.git fixup
  2008-01-31 18:34                               ` Luck, Tony
  2008-01-31 23:28                                 ` Luck, Tony
@ 2008-02-05 19:05                                 ` Luck, Tony
  1 sibling, 0 replies; 35+ messages in thread
From: Luck, Tony @ 2008-02-05 19:05 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Mike Travis, Geert Uytterhoeven, Linus Torvalds, Thomas Gleixner,
	Linux Kernel Development, Linux/PPC Development, linux-ia64,
	sparclinux

> Applied that patch and UP kernel built ok, and then crashed in the
> same place with the memset() to a user-looking address from kmem_cache_alloc()
>
> So the percpu changes are innocent ... something else since 2.6.24 is
> to blame.  Only 5749 commits :-)  I'll start bisecting.

The bisection narrowed in on an innocent patch in ipv4 space.  Meanwhile
the rush of patches continues.  When I retested yesterday when Linus
HEAD was 8af03e782... the CONFIG_SMP=n kernel worked perfectly.  So
maybe it was fixed?  Or maybe the bug depends on the relative
location of various bits of code/data and as the kernel grows and
shrinks with incoming changes the problem comes and goes :-(

-Tony

^ permalink raw reply	[flat|nested] 35+ messages in thread

end of thread, other threads:[~2008-02-05 19:08 UTC | newest]

Thread overview: 35+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <200801301414.m0UEEgCC006371@hera.kernel.org>
2008-01-30 15:27 ` x86/non-x86: percpu, node ids, apic ids x86.git fixup Geert Uytterhoeven
2008-01-30 16:02   ` Mike Travis
2008-01-30 16:10     ` Ingo Molnar
2008-01-30 17:13       ` Luck, Tony
2008-01-30 18:06         ` Ingo Molnar
2008-01-30 18:20           ` Mike Travis
2008-01-30 18:31           ` Luck, Tony
2008-01-30 18:41             ` Mike Travis
2008-01-30 18:49             ` Ingo Molnar
2008-01-30 19:05               ` Ingo Molnar
2008-01-30 19:10               ` Luck, Tony
2008-01-30 19:13               ` Olof Johansson
2008-01-30 19:18                 ` Ingo Molnar
2008-01-30 21:25                 ` [powerpc changes] " Ingo Molnar
2008-01-30 21:39                   ` Olof Johansson
2008-01-30 21:56                   ` Geoff Levand
2008-01-30 21:18               ` Geoff Levand
2008-01-30 19:17             ` Mike Travis
2008-01-30 19:30               ` Ingo Molnar
2008-01-30 19:33               ` Luck, Tony
2008-01-30 19:46                 ` Ingo Molnar
2008-01-30 19:49                   ` Ingo Molnar
2008-01-30 20:00                   ` Luck, Tony
2008-01-30 20:02                     ` Ingo Molnar
2008-01-30 20:17                       ` Luck, Tony
2008-01-30 20:59                         ` Ingo Molnar
2008-01-30 21:15                           ` Luck, Tony
2008-01-30 21:20                             ` Ingo Molnar
2008-01-31  0:57                           ` Luck, Tony
2008-01-31  9:06                             ` Ingo Molnar
2008-01-31 18:34                               ` Luck, Tony
2008-01-31 23:28                                 ` Luck, Tony
2008-02-05 19:05                                 ` Luck, Tony
2008-01-31 10:47                 ` Adrian Bunk
2008-01-30 18:35           ` Olof Johansson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).