So, I guess we're stuck with something like:
DECLARE_PER_CPU(int x);
If we're going to do this, we can also mangle the name as well to
avoid accidental "direct" accesses:
eg:
#define DECLARE_PER_CPU(var)
var##__percpu __attribute__((section(".percpu")))
/* If not SMP: */
#define per_cpu(var) var##__percpu
(From my reading, ## on "int x" and "__per_cpu" is well-defined).
Thoughts?
Rusty.
-- Anyone who quotes me in their sig is an idiot. -- Rusty Russell. - 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/