diff options
Diffstat (limited to 'arch/sparc/kernel/setup_64.c')
| -rw-r--r-- | arch/sparc/kernel/setup_64.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/arch/sparc/kernel/setup_64.c b/arch/sparc/kernel/setup_64.c index 599f1207eed2..6b7331d198e9 100644 --- a/arch/sparc/kernel/setup_64.c +++ b/arch/sparc/kernel/setup_64.c | |||
| @@ -31,6 +31,7 @@ | |||
| 31 | #include <linux/initrd.h> | 31 | #include <linux/initrd.h> |
| 32 | #include <linux/module.h> | 32 | #include <linux/module.h> |
| 33 | #include <linux/start_kernel.h> | 33 | #include <linux/start_kernel.h> |
| 34 | #include <linux/bootmem.h> | ||
| 34 | 35 | ||
| 35 | #include <asm/io.h> | 36 | #include <asm/io.h> |
| 36 | #include <asm/processor.h> | 37 | #include <asm/processor.h> |
| @@ -50,6 +51,8 @@ | |||
| 50 | #include <asm/elf.h> | 51 | #include <asm/elf.h> |
| 51 | #include <asm/mdesc.h> | 52 | #include <asm/mdesc.h> |
| 52 | #include <asm/cacheflush.h> | 53 | #include <asm/cacheflush.h> |
| 54 | #include <asm/dma.h> | ||
| 55 | #include <asm/irq.h> | ||
| 53 | 56 | ||
| 54 | #ifdef CONFIG_IP_PNP | 57 | #ifdef CONFIG_IP_PNP |
| 55 | #include <net/ipconfig.h> | 58 | #include <net/ipconfig.h> |
| @@ -590,6 +593,22 @@ static void __init init_sparc64_elf_hwcap(void) | |||
| 590 | pause_patch(); | 593 | pause_patch(); |
| 591 | } | 594 | } |
| 592 | 595 | ||
| 596 | void __init alloc_irqstack_bootmem(void) | ||
| 597 | { | ||
| 598 | unsigned int i, node; | ||
| 599 | |||
| 600 | for_each_possible_cpu(i) { | ||
| 601 | node = cpu_to_node(i); | ||
| 602 | |||
| 603 | softirq_stack[i] = __alloc_bootmem_node(NODE_DATA(node), | ||
| 604 | THREAD_SIZE, | ||
| 605 | THREAD_SIZE, 0); | ||
| 606 | hardirq_stack[i] = __alloc_bootmem_node(NODE_DATA(node), | ||
| 607 | THREAD_SIZE, | ||
| 608 | THREAD_SIZE, 0); | ||
| 609 | } | ||
| 610 | } | ||
| 611 | |||
| 593 | void __init setup_arch(char **cmdline_p) | 612 | void __init setup_arch(char **cmdline_p) |
| 594 | { | 613 | { |
| 595 | /* Initialize PROM console and command line. */ | 614 | /* Initialize PROM console and command line. */ |
| @@ -650,6 +669,13 @@ void __init setup_arch(char **cmdline_p) | |||
| 650 | 669 | ||
| 651 | paging_init(); | 670 | paging_init(); |
| 652 | init_sparc64_elf_hwcap(); | 671 | init_sparc64_elf_hwcap(); |
| 672 | smp_fill_in_cpu_possible_map(); | ||
| 673 | /* | ||
| 674 | * Once the OF device tree and MDESC have been setup and nr_cpus has | ||
| 675 | * been parsed, we know the list of possible cpus. Therefore we can | ||
| 676 | * allocate the IRQ stacks. | ||
| 677 | */ | ||
| 678 | alloc_irqstack_bootmem(); | ||
| 653 | } | 679 | } |
| 654 | 680 | ||
| 655 | extern int stop_a_enabled; | 681 | extern int stop_a_enabled; |
