lkml.org 
[lkml]   [2006]   [Mar]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] Make __get_cpu_var use raw_smp_processor_id()
From
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/

\
 
 \ /
  Last update: 2006-03-23 23:38    [W:0.421 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site