mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-12-05 02:10:17 -05:00
x86: add debug of invalid per_cpu map accesses
dont crash survivable situations. Signed-off-by: Ingo Molnar <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]>
This commit is contained in:
parent
c49a4955ea
commit
5f5cd8fd60
1 changed files with 5 additions and 4 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue