Messages in this thread | | | Date | Thu, 23 Mar 2006 14:35:47 -0800 (PST) | Subject | Re: [PATCH] Make __get_cpu_var use raw_smp_processor_id() | From | "David S. Miller" <> |
| |
From: "J.A. Magallon" <jamagallon@able.es> Date: Thu, 23 Mar 2006 22:11:25 +0100
> --- linux-2.6.15-rc5/include/asm-generic/percpu.h.orig 2005-12-21 15:13:27.000000000 -0600 > +++ linux-2.6.15-rc5/include/asm-generic/percpu.h 2005-12-21 15:13:43.000000000 -0600 > @@ -13,7 +13,7 @@ extern unsigned long __per_cpu_offset[NR > > /* var is in discarded region: offset to particular copy we want */ > #define per_cpu(var, cpu) (*RELOC_HIDE(&per_cpu__##var, __per_cpu_offset[cpu])) > -#define __get_cpu_var(var) per_cpu(var, smp_processor_id()) > +#define __get_cpu_var(var) per_cpu(var, raw_smp_processor_id())
I'm skeptical because this has caught real bugs in the past.
Unfortunately other platforms that hard-code the per-cpu area into a cpu register, and thus implement __get_cpu_var() without a smp_processor_id() call, don't get the debugging check. - 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/
| |