On Sun, Jan 16, 2005 at 09:50:44PM -0800, Chris Wedgwood wrote:

> Note, even with this removed I'm still seeing a few (many actually)
> "BUG: using smp_processor_id() in preemptible [00000001] code: xxx"
> messages which I've not seen before --- that might be unrelated but
> I do see *many* such messages so I'm sure I would have noticed this
> before or it would have broken something earlier.

Actually, it is unrelated.  Proposed fix:

---

It seems logical that __get_cpu_var should use __smp_processor_id()
rather than smp_processor_id().  Noticed when __get_cpu_var was making
lots of noise with CONFIG_DEBUG_PREEMPT=y

Signed-off-by: Chris Wedgwood <[EMAIL PROTECTED]>



===== include/asm-generic/percpu.h 1.10 vs edited =====
--- 1.10/include/asm-generic/percpu.h   2004-01-18 22:28:34 -08:00
+++ edited/include/asm-generic/percpu.h 2005-01-16 22:32:07 -08:00
@@ -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, __smp_processor_id())
 
 /* A macro to avoid #include hell... */
 #define percpu_modcopy(pcpudst, src, size)                     \
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to