2.5.8 fix for percpu area
PATCH 1/1 2.5.8 fix for percpu area
The percpu area stuff is broken in two places -
Missing stub for setup_per_cpu_areas() in the UP case and missing definition of __per_cpu_data attribute in percpu.h. Here is a patch that fixes these. Please apply.
Thanks
Signature · 33 lines
Dipankar Sarma <[email protected]> http://lse.sourceforge.net Linux Technology Center, IBM Software Lab, Bangalore, India. [percpufix-2.5.8-1.patch] diff -urN linux-2.5.8-base/include/asm-generic/percpu.h linux-2.5.8-percpufix/include/asm-generic/percpu.h --- linux-2.5.8-base/include/asm-generic/percpu.h Mon Apr 15 00:48:47 2002 +++ linux-2.5.8-percpufix/include/asm-generic/percpu.h Tue Apr 16 11:49:28 2002 @@ -4,6 +4,8 @@ #define __GENERIC_PER_CPU #include <linux/compiler.h> +#define __per_cpu_data __attribute__((section(".data.percpu"))) + extern unsigned long __per_cpu_offset[NR_CPUS]; /* var is in discarded region: offset to particular copy we want */ diff -urN linux-2.5.8-base/init/main.c linux-2.5.8-percpufix/init/main.c --- linux-2.5.8-base/init/main.c Mon Apr 15 00:48:46 2002 +++ linux-2.5.8-percpufix/init/main.c Tue Apr 16 11:50:57 2002 @@ -272,6 +272,10 @@ #define smp_init() do { } while (0) #endif +static inline void setup_per_cpu_areas(void) +{ +} + #else #ifdef __GENERIC_PER_CPU
In message <[email protected]> you write:
Quoted 5 lines
The percpu area stuff is broken in two places -
Missing stub for
setup_per_cpu_areas()in the UP case and missing definition of__per_cpu_dataattribute inpercpu.h. Here is a patch that fixes these. Please apply.
You should be including "linux/percpu.h" which defines __per_cpu_data for UP.
The other fix is to move the whole #ifdef __GENERIC_PER_CPU ... setup_per_cpu_areas(void) { ...#endif out from inside the #ifdef CONFIG_SMP block (patch sent).
Thanks,
Rusty.
--
Anyone who quotes me in their sig is an idiot. -- Rusty Russell.
Quoted 9 lines · Rusty Russell
In message <[email protected]> you write:
Quoted 5 lines
The percpu area stuff is broken in two places -
Missing stub for
setup_per_cpu_areas()in the UP case and missing definition of__per_cpu_dataattribute inpercpu.h. Here is a patch that fixes these. Please apply.You should be including "
linux/percpu.h" which defines__per_cpu_datafor UP.
I didn't know that existed. This works.
Quoted 4 lines
The other fix is to move the whole #ifdef
__GENERIC_PER_CPU...setup_per_cpu_areas(void){ ...#endif out from inside the #ifdefCONFIG_SMPblock (patch sent).
Ok. I will make a new patch for my own use until you fix gets included.
Thanks
Signature · 2 lines
Dipankar Sarma <[email protected]> http://lse.sourceforge.net Linux Technology Center, IBM Software Lab, Bangalore, India.