From 4f70f7a91bffdcc39f088748dc678953eb9a3fbd Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Tue, 12 Aug 2008 18:33:56 -0700 Subject: sparc64: Implement IRQ stacks. Signed-off-by: David S. Miller --- arch/sparc64/mm/init.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'arch/sparc64/mm') diff --git a/arch/sparc64/mm/init.c b/arch/sparc64/mm/init.c index 4e821b3ecb0..217de3ea29e 100644 --- a/arch/sparc64/mm/init.c +++ b/arch/sparc64/mm/init.c @@ -49,6 +49,7 @@ #include #include #include +#include #define MAX_PHYS_ADDRESS (1UL << 42UL) #define KPTE_BITMAP_CHUNK_SZ (256UL * 1024UL * 1024UL) @@ -1771,6 +1772,16 @@ void __init paging_init(void) if (tlb_type == hypervisor) sun4v_mdesc_init(); + /* 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(lmb_alloc(THREAD_SIZE, THREAD_SIZE)); + hardirq_stack[i] = __va(lmb_alloc(THREAD_SIZE, THREAD_SIZE)); + } + /* Setup bootmem... */ last_valid_pfn = end_pfn = bootmem_init(phys_base); -- cgit v1.2.3