From a2314817f1e46d6596a5f86d8f7cd1def5e7846d Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Mon, 12 Aug 2002 20:27:49 -0700 Subject: [PATCH] DECLARE_PER_CPU/DEFINE_PER_CPU patch This old __per_cpu_data define wasn't enough if an arch wants to use the gcc __thread prefix (thread local storage), which needs to go *before* the type in the definition. So we have to go for a DECLARE macro, and while we're there, separate DECLARE and DEFINE, as definitions of per-cpu data cannot live in modules. This also means that accidental direct references to per-cpu variables will be caught at compile time. --- kernel/softirq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'kernel') diff --git a/kernel/softirq.c b/kernel/softirq.c index c5089c2cd2c9..4405e83aaf21 100644 --- a/kernel/softirq.c +++ b/kernel/softirq.c @@ -151,8 +151,8 @@ struct tasklet_head /* Some compilers disobey section attribute on statics when not initialized -- RR */ -static struct tasklet_head tasklet_vec __per_cpu_data = { NULL }; -static struct tasklet_head tasklet_hi_vec __per_cpu_data = { NULL }; +static DEFINE_PER_CPU(struct tasklet_head, tasklet_vec) = { NULL }; +static DEFINE_PER_CPU(struct tasklet_head, tasklet_hi_vec) = { NULL }; void __tasklet_schedule(struct tasklet_struct *t) { -- cgit v1.2.3