Commit bd0f8cb9 authored by Rusty Russell's avatar Rusty Russell Committed by Linus Torvalds

[PATCH] Important per-cpu fix.

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...
parent 1350c3f2
......@@ -10,7 +10,7 @@ extern unsigned long __per_cpu_offset[NR_CPUS];
/* 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 */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment