[PATCH] 2.5.8 fix for percpu area

Dipankar Sarma (dipankar@in.ibm.com)
Tue, 16 Apr 2002 12:57:17 +0530


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

-- 
Dipankar Sarma  <dipankar@in.ibm.com> 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 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/