diff options
author | David S. Miller <davem@davemloft.net> | 2008-02-13 19:20:45 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-04-23 23:32:11 -0700 |
commit | b97094560b991af5c62391014e72bfa4c3a3701f (patch) | |
tree | fbdc76cea526c0170982419717b6a3fe6a64c0f3 /arch/sparc64/kernel/smp.c | |
parent | 9422273ba7d139537720c8c47514925d9a621e0d (diff) | |
download | blackbird-op-linux-b97094560b991af5c62391014e72bfa4c3a3701f.tar.gz blackbird-op-linux-b97094560b991af5c62391014e72bfa4c3a3701f.zip |
[SPARC64]: Call real_setup_per_cpu_areas() earlier and use lmb_alloc().
We have to do it like this before we can move the PROM and MDESC device
tree code over to using lmb_alloc().
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc64/kernel/smp.c')
-rw-r--r-- | arch/sparc64/kernel/smp.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/arch/sparc64/kernel/smp.c b/arch/sparc64/kernel/smp.c index 59f020d69d4c..524b88920947 100644 --- a/arch/sparc64/kernel/smp.c +++ b/arch/sparc64/kernel/smp.c @@ -20,7 +20,7 @@ #include <linux/cache.h> #include <linux/jiffies.h> #include <linux/profile.h> -#include <linux/bootmem.h> +#include <linux/lmb.h> #include <asm/head.h> #include <asm/ptrace.h> @@ -1431,7 +1431,7 @@ EXPORT_SYMBOL(__per_cpu_shift); void __init real_setup_per_cpu_areas(void) { - unsigned long goal, size, i; + unsigned long paddr, goal, size, i; char *ptr; /* Copy section for each CPU (we discard the original) */ @@ -1441,8 +1441,13 @@ void __init real_setup_per_cpu_areas(void) for (size = PAGE_SIZE; size < goal; size <<= 1UL) __per_cpu_shift++; - ptr = alloc_bootmem_pages(size * NR_CPUS); + paddr = lmb_alloc(size * NR_CPUS, PAGE_SIZE); + if (!paddr) { + prom_printf("Cannot allocate per-cpu memory.\n"); + prom_halt(); + } + ptr = __va(paddr); __per_cpu_base = ptr - __per_cpu_start; for (i = 0; i < NR_CPUS; i++, ptr += size) |