[PATCH] Important per-cpu fix.

From: Rusty Russell (rusty@rustcorp.com.au)
Date: Tue Sep 03 2002 - 21:35:41 EST


Frankly, I'm amazed the kernel worked for long without this.

Every linker script thinks the section is called .data.percpu.
Without this patch, every CPU ends up sharing the same "per-cpu"
variable.

This might explain the wierd per-cpu problem reports from Andrew and
Dave, and also that nagging feeling that I'm an idiot...

Rusty.

--
  Anyone who quotes me in their sig is an idiot. -- Rusty Russell.

--- working-2.5.33-hotcpu-cpudown-i386/include/asm-generic/percpu.h.~1~ Wed Aug 28 09:29:50 2002 +++ working-2.5.33-hotcpu-cpudown-i386/include/asm-generic/percpu.h Wed Sep 4 12:32:34 2002 @@ -10,7 +10,7 @@ /* Separate out the type, so (int[3], foo) works. */ #ifndef MODULE #define DEFINE_PER_CPU(type, name) \ - __attribute__((__section__(".percpu"))) __typeof__(type) name##__per_cpu + __attribute__((__section__(".data.percpu"))) __typeof__(type) name##__per_cpu #endif /* var is in discarded region: offset to particular copy we want */ - 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/



This archive was generated by hypermail 2b29 : Sat Sep 07 2002 - 22:00:20 EST