summaryrefslogtreecommitdiffstats
path: root/include/asm-x86/topology.h
diff options
context:
space:
mode:
authortravis@sgi.com <travis@sgi.com>2008-01-30 13:33:22 +0100
committerIngo Molnar <mingo@elte.hu>2008-01-30 13:33:22 +0100
commitc49a4955ea504c82f6b690491639bba5b8c1dc47 (patch)
treebadef899e3e3376c1af68b942b7f6c8ff9a36df5 /include/asm-x86/topology.h
parent602a54a8cab2759fceb20b3e0c2a27c4eac005df (diff)
downloadop-kernel-dev-c49a4955ea504c82f6b690491639bba5b8c1dc47.zip
op-kernel-dev-c49a4955ea504c82f6b690491639bba5b8c1dc47.tar.gz
x86: add debug of invalid per_cpu map accesses
Provide a means to trap usages of per_cpu map variables before they are setup. Define CONFIG_DEBUG_PER_CPU_MAPS to activate. Signed-off-by: Mike Travis <travis@sgi.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include/asm-x86/topology.h')
-rw-r--r--include/asm-x86/topology.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/asm-x86/topology.h b/include/asm-x86/topology.h
index 040374f..f1e1232 100644
--- a/include/asm-x86/topology.h
+++ b/include/asm-x86/topology.h
@@ -66,6 +66,13 @@ static inline int early_cpu_to_node(int cpu)
static inline int cpu_to_node(int cpu)
{
+#ifdef CONFIG_DEBUG_PER_CPU_MAPS
+ if(x86_cpu_to_node_map_early_ptr) {
+ printk("KERN_NOTICE cpu_to_node(%d): usage too early!\n",
+ (int)cpu);
+ BUG();
+ }
+#endif
if(per_cpu_offset(cpu))
return per_cpu(x86_cpu_to_node_map, cpu);
else
OpenPOWER on IntegriCloud