mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
[PATCH] cpu to node relationship fixup: map cpu to node
Assume that a cpu is *physically* offlined at boot time... Because smpboot.c::smp_boot_cpu_map() canoot find cpu's sapicid, numa.c::build_cpu_to_node_map() cannot build cpu<->node map for offlined cpu. For such cpus, cpu_to_node map should be fixed at cpu-hot-add. This mapping should be done before cpu onlining. This patch also handles cpu hotremove case. Signed-off-by: KAMEZAWA Hiroyuki <[email protected]> Cc: "Luck, Tony" <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
0899298649
commit
3212fe1594
3 changed files with 40 additions and 4 deletions
|
|
@ -64,6 +64,10 @@ extern int paddr_to_nid(unsigned long paddr);
|
|||
|
||||
#define local_nodeid (cpu_to_node_map[smp_processor_id()])
|
||||
|
||||
extern void map_cpu_to_node(int cpu, int nid);
|
||||
extern void unmap_cpu_from_node(int cpu, int nid);
|
||||
|
||||
|
||||
#else /* !CONFIG_NUMA */
|
||||
|
||||
#define paddr_to_nid(addr) 0
|
||||
|
|
|
|||
Loading…
Reference in a new issue