aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc/kernel/smp_64.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2009-04-01 19:15:20 -0400
committerDavid S. Miller <davem@davemloft.net>2009-06-16 07:56:23 -0400
commit73fffc037e2383a0ed126d57bdcda9b369769ae8 (patch)
tree9099954565aac8e2ea1b0e040662d6ca14844027 /arch/sparc/kernel/smp_64.c
parentb696fdc259f0d94348a9327bed352fac44d4883d (diff)
sparc64: Get rid of real_setup_per_cpu_areas().
Now that we defer the cpu_data() initializations to the end of per-cpu setup, we can get rid of this local hack we had to setup the per-cpu areas eary. This is a necessary step in order to support HAVE_DYNAMIC_PER_CPU_AREA since the per-cpu setup must run when page structs are available. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/kernel/smp_64.c')
-rw-r--r--arch/sparc/kernel/smp_64.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/arch/sparc/kernel/smp_64.c b/arch/sparc/kernel/smp_64.c
index 045fbb554a9c..5302344e3cb4 100644
--- a/arch/sparc/kernel/smp_64.c
+++ b/arch/sparc/kernel/smp_64.c
@@ -20,7 +20,7 @@
20#include <linux/cache.h> 20#include <linux/cache.h>
21#include <linux/jiffies.h> 21#include <linux/jiffies.h>
22#include <linux/profile.h> 22#include <linux/profile.h>
23#include <linux/lmb.h> 23#include <linux/bootmem.h>
24#include <linux/cpu.h> 24#include <linux/cpu.h>
25 25
26#include <asm/head.h> 26#include <asm/head.h>
@@ -1371,9 +1371,9 @@ void smp_send_stop(void)
1371{ 1371{
1372} 1372}
1373 1373
1374void __init real_setup_per_cpu_areas(void) 1374void __init setup_per_cpu_areas(void)
1375{ 1375{
1376 unsigned long base, shift, paddr, goal, size, i; 1376 unsigned long base, shift, goal, size, i;
1377 char *ptr; 1377 char *ptr;
1378 1378
1379 /* Copy section for each CPU (we discard the original) */ 1379 /* Copy section for each CPU (we discard the original) */
@@ -1383,13 +1383,12 @@ void __init real_setup_per_cpu_areas(void)
1383 for (size = PAGE_SIZE; size < goal; size <<= 1UL) 1383 for (size = PAGE_SIZE; size < goal; size <<= 1UL)
1384 shift++; 1384 shift++;
1385 1385
1386 paddr = lmb_alloc(size * NR_CPUS, PAGE_SIZE); 1386 ptr = __alloc_bootmem(size * NR_CPUS, PAGE_SIZE, 0);
1387 if (!paddr) { 1387 if (!ptr) {
1388 prom_printf("Cannot allocate per-cpu memory.\n"); 1388 prom_printf("Cannot allocate per-cpu memory.\n");
1389 prom_halt(); 1389 prom_halt();
1390 } 1390 }
1391 1391
1392 ptr = __va(paddr);
1393 base = ptr - __per_cpu_start; 1392 base = ptr - __per_cpu_start;
1394 1393
1395 for (i = 0; i < NR_CPUS; i++, ptr += size) { 1394 for (i = 0; i < NR_CPUS; i++, ptr += size) {