sparc64: Use node local allocations for IRQ stacks.

Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
David S. Miller 2012-04-26 20:50:34 -07:00
parent 625d693e97
commit 5ed56f1ad9
1 changed files with 15 additions and 10 deletions

View File

@ -1748,22 +1748,27 @@ void __init paging_init(void)
#endif #endif
} }
/* Once the OF device tree and MDESC have been setup, we know
* the list of possible cpus. Therefore we can allocate the
* IRQ stacks.
*/
for_each_possible_cpu(i) {
/* XXX Use node local allocations... XXX */
softirq_stack[i] = __va(memblock_alloc(THREAD_SIZE, THREAD_SIZE));
hardirq_stack[i] = __va(memblock_alloc(THREAD_SIZE, THREAD_SIZE));
}
/* Setup bootmem... */ /* Setup bootmem... */
last_valid_pfn = end_pfn = bootmem_init(phys_base); last_valid_pfn = end_pfn = bootmem_init(phys_base);
#ifndef CONFIG_NEED_MULTIPLE_NODES #ifndef CONFIG_NEED_MULTIPLE_NODES
max_mapnr = last_valid_pfn; max_mapnr = last_valid_pfn;
#endif #endif
/* Once the OF device tree and MDESC have been setup, we know
* the list of possible cpus. Therefore we can allocate the
* IRQ stacks.
*/
for_each_possible_cpu(i) {
int node = cpu_to_node(i);
softirq_stack[i] = __alloc_bootmem_node(NODE_DATA(node),
THREAD_SIZE,
THREAD_SIZE, 0);
hardirq_stack[i] = __alloc_bootmem_node(NODE_DATA(node),
THREAD_SIZE,
THREAD_SIZE, 0);
}
kernel_physical_mapping_init(); kernel_physical_mapping_init();
{ {