diff options
Diffstat (limited to 'include/asm-x86/topology.h')
-rw-r--r-- | include/asm-x86/topology.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/include/asm-x86/topology.h b/include/asm-x86/topology.h index f1e12329078e..9a8228a177c7 100644 --- a/include/asm-x86/topology.h +++ b/include/asm-x86/topology.h @@ -66,14 +66,15 @@ 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) { +#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(); + dump_stack(); + return ((int *)x86_cpu_to_node_map_early_ptr)[cpu]; } #endif - if(per_cpu_offset(cpu)) + if (per_cpu_offset(cpu)) return per_cpu(x86_cpu_to_node_map, cpu); else return NUMA_NO_NODE; |