Provide a means to trap usages of per_cpu map variables before they are setup. Define CONFIG_DEBUG_PER_CPU_MAPS to activate. Based on 2.6.24-rc8-mm1 + latest (08/1/21) git-x86 Signed-off-by: Mike Travis --- include/asm-x86/topology.h | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) --- a/include/asm-x86/topology.h +++ b/include/asm-x86/topology.h @@ -58,7 +58,7 @@ static inline int early_cpu_to_node(int if (cpu_to_node_map) return cpu_to_node_map[cpu]; - else if(per_cpu_offset(cpu)) + else if (per_cpu_offset(cpu)) return per_cpu(x86_cpu_to_node_map, cpu); else return NUMA_NO_NODE; @@ -71,7 +71,7 @@ static inline int cpu_to_node(int cpu) printk("KERN_NOTICE cpu_to_node(%d): usage too early!\n", (int)cpu); dump_stack(); - return ((u16 *)x86_cpu_to_node_map_early_ptr)[cpu]; + return ((int *)x86_cpu_to_node_map_early_ptr)[cpu]; } #endif if (per_cpu_offset(cpu)) @@ -81,15 +81,6 @@ static inline int cpu_to_node(int cpu) } #endif /* CONFIG_X86_64 */ -static inline int cpu_to_node(int cpu) -{ - if(per_cpu_offset(cpu)) - return per_cpu(x86_cpu_to_node_map, cpu); - else - return NUMA_NO_NODE; -} -#endif /* CONFIG_X86_64 */ - /* * Returns the number of the node containing Node 'node'. This * architecture is flat, so it is a pretty simple function! -- -- 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/