From 11c4cd6938aa8d95f435bdf4c17c8076e6c16c20 Mon Sep 17 00:00:00 2001 From: Allen Pais Date: Fri, 2 Dec 2016 13:38:10 +0530 Subject: [PATCH] sparc64: affine strand irq stacks Like the subject says let us NUMA affine the per strand softirq and hardirq stacks. This has been boot tested on T7-4 and T4-1. Ported to UEK4 Orabug: 23050718 Signed-off-by: Bob Picco Signed-off-by: Chris Hyser Signed-off-by: Allen Pais --- arch/sparc/mm/init_64.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/arch/sparc/mm/init_64.c b/arch/sparc/mm/init_64.c index 2824f67107e9..3bc1ab2aa1be 100644 --- a/arch/sparc/mm/init_64.c +++ b/arch/sparc/mm/init_64.c @@ -2763,6 +2763,21 @@ void __init paging_init(void) free_area_init_nodes(max_zone_pfns); } + /* 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 ED we will do this in a NUMA friendly manner. + */ + for_each_possible_cpu(i) { + unsigned long goal = __pa(MAX_DMA_ADDRESS); + int node = cpu_to_node(i); + + softirq_stack[i] = __alloc_bootmem_node_high(NODE_DATA(node), + THREAD_SIZE, + THREAD_SIZE, goal); + hardirq_stack[i] = __alloc_bootmem_node_high(NODE_DATA(node), + THREAD_SIZE, + THREAD_SIZE, goal); + } printk("Booting Linux...\n"); } -- 2.50.1