* [PATCH] 2.5.8 fix for percpu area
@ 2002-04-16 7:27 Dipankar Sarma
2002-04-17 6:57 ` Rusty Russell
0 siblings, 1 reply; 3+ messages in thread
From: Dipankar Sarma @ 2002-04-16 7:27 UTC (permalink / raw)
To: linux-kernel; +Cc: Rusty Russell
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] 2.5.8 fix for percpu area
2002-04-16 7:27 [PATCH] 2.5.8 fix for percpu area Dipankar Sarma
@ 2002-04-17 6:57 ` Rusty Russell
2002-04-17 7:15 ` Dipankar Sarma
0 siblings, 1 reply; 3+ messages in thread
From: Rusty Russell @ 2002-04-17 6:57 UTC (permalink / raw)
To: dipankar; +Cc: linux-kernel
In message <20020416125716.A31123@in.ibm.com> you write:
> 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.
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.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] 2.5.8 fix for percpu area
2002-04-17 6:57 ` Rusty Russell
@ 2002-04-17 7:15 ` Dipankar Sarma
0 siblings, 0 replies; 3+ messages in thread
From: Dipankar Sarma @ 2002-04-17 7:15 UTC (permalink / raw)
To: Rusty Russell; +Cc: linux-kernel
On Wed, Apr 17, 2002 at 04:57:44PM +1000, Rusty Russell wrote:
> In message <20020416125716.A31123@in.ibm.com> you write:
> > 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.
>
> You should be including "linux/percpu.h" which defines __per_cpu_data
> for UP.
I didn't know that existed. This works.
>
> 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).
Ok. I will make a new patch for my own use until you fix gets included.
Thanks
--
Dipankar Sarma <dipankar@in.ibm.com> http://lse.sourceforge.net
Linux Technology Center, IBM Software Lab, Bangalore, India.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2002-04-17 11:13 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-04-16 7:27 [PATCH] 2.5.8 fix for percpu area Dipankar Sarma
2002-04-17 6:57 ` Rusty Russell
2002-04-17 7:15 ` Dipankar Sarma
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox