summaryrefslogtreecommitdiffstats
path: root/arch/sparc
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2009-05-27 07:37:25 +0200
committerDavid S. Miller <davem@davemloft.net>2009-06-16 13:56:22 +0200
commitb696fdc259f0d94348a9327bed352fac44d4883d (patch)
tree8fed30584b6fcd5c6cb64f5091add9fd385394a1 /arch/sparc
parentsparc64: Make mdesc_fill_in_cpu_data take a cpumask_t pointer. (diff)
downloadlinux-b696fdc259f0d94348a9327bed352fac44d4883d.tar.xz
linux-b696fdc259f0d94348a9327bed352fac44d4883d.zip
sparc64: Defer cpu_data() setup until end of per-cpu data initialization.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc')
-rw-r--r--arch/sparc/kernel/ds.c1
-rw-r--r--arch/sparc/kernel/mdesc.c1
-rw-r--r--arch/sparc/kernel/prom_64.c1
-rw-r--r--arch/sparc/kernel/smp_64.c4
-rw-r--r--arch/sparc/mm/init_64.c12
5 files changed, 9 insertions, 10 deletions
diff --git a/arch/sparc/kernel/ds.c b/arch/sparc/kernel/ds.c
index 51b05c498877..4a700f4b79ce 100644
--- a/arch/sparc/kernel/ds.c
+++ b/arch/sparc/kernel/ds.c
@@ -544,6 +544,7 @@ static int __cpuinit dr_cpu_configure(struct ds_info *dp,
resp_len, ncpus, mask,
DR_CPU_STAT_CONFIGURED);
+ mdesc_populate_present_mask(mask);
mdesc_fill_in_cpu_data(mask);
for_each_cpu_mask(cpu, *mask) {
diff --git a/arch/sparc/kernel/mdesc.c b/arch/sparc/kernel/mdesc.c
index 6d2015e0e574..938da19dc065 100644
--- a/arch/sparc/kernel/mdesc.c
+++ b/arch/sparc/kernel/mdesc.c
@@ -861,7 +861,6 @@ void __cpuinit mdesc_fill_in_cpu_data(cpumask_t *mask)
{
struct mdesc_handle *hp;
- mdesc_populate_present_mask(mask);
mdesc_iterate_over_cpus(fill_in_one_cpu, NULL, mask);
#ifdef CONFIG_SMP
diff --git a/arch/sparc/kernel/prom_64.c b/arch/sparc/kernel/prom_64.c
index 4d92f488fae1..fb06ac2bd38f 100644
--- a/arch/sparc/kernel/prom_64.c
+++ b/arch/sparc/kernel/prom_64.c
@@ -535,7 +535,6 @@ void __init of_fill_in_cpu_data(void)
if (tlb_type == hypervisor)
return;
- of_populate_present_mask();
of_iterate_over_cpus(fill_in_one_cpu, 0);
smp_fill_in_sib_core_maps();
diff --git a/arch/sparc/kernel/smp_64.c b/arch/sparc/kernel/smp_64.c
index b20f253857b7..045fbb554a9c 100644
--- a/arch/sparc/kernel/smp_64.c
+++ b/arch/sparc/kernel/smp_64.c
@@ -1399,4 +1399,8 @@ void __init real_setup_per_cpu_areas(void)
/* Setup %g5 for the boot cpu. */
__local_per_cpu_offset = __per_cpu_offset(smp_processor_id());
+
+ of_fill_in_cpu_data();
+ if (tlb_type == hypervisor)
+ mdesc_fill_in_cpu_data(CPU_MASK_ALL_PTR);
}
diff --git a/arch/sparc/mm/init_64.c b/arch/sparc/mm/init_64.c
index 87fea94e5125..785f0a24fcbf 100644
--- a/arch/sparc/mm/init_64.c
+++ b/arch/sparc/mm/init_64.c
@@ -1799,20 +1799,16 @@ void __init paging_init(void)
if (tlb_type == hypervisor)
sun4v_ktsb_register();
- /* We must setup the per-cpu areas before we pull in the
- * PROM and the MDESC. The code there fills in cpu and
- * other information into per-cpu data structures.
- */
- real_setup_per_cpu_areas();
-
prom_build_devicetree();
- of_fill_in_cpu_data();
+ of_populate_present_mask();
if (tlb_type == hypervisor) {
sun4v_mdesc_init();
- mdesc_fill_in_cpu_data(CPU_MASK_ALL_PTR);
+ mdesc_populate_present_mask(CPU_MASK_ALL_PTR);
}
+ real_setup_per_cpu_areas();
+
/* Once the OF device tree and MDESC have been setup, we know
* the list of possible cpus. Therefore we can allocate the
* IRQ stacks.