aboutsummaryrefslogtreecommitdiff
path: root/arch/sparc64/mm/init.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-08-13 20:48:25 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2008-08-13 20:48:25 -0700
commit0ff8285075a1242dbc969b6b4b1719d692931a02 (patch)
tree75498fec971960aa9a038846cf7d2561a49bce73 /arch/sparc64/mm/init.c
parent8d0968abd03ec6b407df117adc773562386702fa (diff)
parent6f63e781eaf6a741fc65f773017154b20ed4ce3b (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6: sparc64: Handle stack trace attempts before irqstacks are setup. sparc64: Implement IRQ stacks. sparc: remove include of linux/of_device.h from asm/of_device.h sparc64: Fix recursion in stack overflow detection handling. sparc/drivers: use linux/of_device.h instead of asm/of_device.h sparc64: Don't MAGIC_SYSRQ ifdef smp_fetch_global_regs and support code.
Diffstat (limited to 'arch/sparc64/mm/init.c')
-rw-r--r--arch/sparc64/mm/init.c11
1 files changed, 11 insertions, 0 deletions
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 <asm/sstate.h>
#include <asm/mdesc.h>
#include <asm/cpudata.h>
+#include <asm/irq.h>
#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);