mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [patch] fix smp_processor_id() use in include/asm-generic/percpu.h
@ 2005-12-22 20:35 Suresh Kodati
  2005-12-24  1:08 ` Nathan Lynch
  0 siblings, 1 reply; 2+ messages in thread
From: Suresh Kodati @ 2005-12-22 20:35 UTC (permalink / raw)
  To: linux-kernel

This patch suppresses the following BUG() seen during bootup of 2.6.15-rc5-mm3 on i386 machines by replacing smp_processor_id with raw_smp_processor_id().

<snip>
[   11.258828] Freeing unused kernel memory: 260k freed
[   11.258864] BUG: using smp_processor_id() in preemptible [00000001] code: swapper/1 
[   11.258878] caller is mod_page_state_offset+0x12/0x28
</snip>

Signed-off-by: Suresh Kodati <kodatisu@in.ibm.com>
-- 

include/asm-generic/percpu.h |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

--- 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())
 
 /* A macro to avoid #include hell... */
 #define percpu_modcopy(pcpudst, src, size)			\

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-12-24  1:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-12-22 20:35 [patch] fix smp_processor_id() use in include/asm-generic/percpu.h Suresh Kodati
2005-12-24  1:08 ` Nathan Lynch

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®