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 <travis@sgi.com>
---
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!
--
--
| KOSAKI Motohiro | [bug?] tg3: Failed to load firmware "tigon/tg3_tso.bin" |
| Faik Uygur | Re: Linux 2.6.21-rc1 |
| Greg KH | [GIT PATCH] driver core patches against 2.6.24 |
| Trent Piepho | [PATCH] [POWERPC] Improve (in|out)_beXX() asm code |
git: | |
| Jarek Poplawski | [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| David Miller | [GIT]: Networking |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| Jens Axboe | Re: [BUG] New Kernel Bugs |
