aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2009-05-27 01:37:25 -0400
committerDavid S. Miller <davem@davemloft.net>2009-06-16 07:56:22 -0400
commitb696fdc259f0d94348a9327bed352fac44d4883d (patch)
tree8fed30584b6fcd5c6cb64f5091add9fd385394a1 /arch
parenta2094502dce23e9ace04d49702aa7a4d5996df55 (diff)
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')
-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,
544 resp_len, ncpus, mask, 544 resp_len, ncpus, mask,
545 DR_CPU_STAT_CONFIGURED); 545 DR_CPU_STAT_CONFIGURED);
546 546
547 mdesc_populate_present_mask(mask);
547 mdesc_fill_in_cpu_data(mask); 548 mdesc_fill_in_cpu_data(mask);
548 549
549 for_each_cpu_mask(cpu, *mask) { 550 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)
861{ 861{
862 struct mdesc_handle *hp; 862 struct mdesc_handle *hp;
863 863
864 mdesc_populate_present_mask(mask);
865 mdesc_iterate_over_cpus(fill_in_one_cpu, NULL, mask); 864 mdesc_iterate_over_cpus(fill_in_one_cpu, NULL, mask);
866 865
867#ifdef CONFIG_SMP 866#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)
535 if (tlb_type == hypervisor) 535 if (tlb_type == hypervisor)
536 return; 536 return;
537 537
538 of_populate_present_mask();
539 of_iterate_over_cpus(fill_in_one_cpu, 0); 538 of_iterate_over_cpus(fill_in_one_cpu, 0);
540 539
541 smp_fill_in_sib_core_maps(); 540 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)
1399 1399
1400 /* Setup %g5 for the boot cpu. */ 1400 /* Setup %g5 for the boot cpu. */
1401 __local_per_cpu_offset = __per_cpu_offset(smp_processor_id()); 1401 __local_per_cpu_offset = __per_cpu_offset(smp_processor_id());
1402
1403 of_fill_in_cpu_data();
1404 if (tlb_type == hypervisor)
1405 mdesc_fill_in_cpu_data(CPU_MASK_ALL_PTR);
1402} 1406}
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)
1799 if (tlb_type == hypervisor) 1799 if (tlb_type == hypervisor)
1800 sun4v_ktsb_register(); 1800 sun4v_ktsb_register();
1801 1801
1802 /* We must setup the per-cpu areas before we pull in the
1803 * PROM and the MDESC. The code there fills in cpu and
1804 * other information into per-cpu data structures.
1805 */
1806 real_setup_per_cpu_areas();
1807
1808 prom_build_devicetree(); 1802 prom_build_devicetree();
1809 of_fill_in_cpu_data(); 1803 of_populate_present_mask();
1810 1804
1811 if (tlb_type == hypervisor) { 1805 if (tlb_type == hypervisor) {
1812 sun4v_mdesc_init(); 1806 sun4v_mdesc_init();
1813 mdesc_fill_in_cpu_data(CPU_MASK_ALL_PTR); 1807 mdesc_populate_present_mask(CPU_MASK_ALL_PTR);
1814 } 1808 }
1815 1809
1810 real_setup_per_cpu_areas();
1811
1816 /* Once the OF device tree and MDESC have been setup, we know 1812 /* Once the OF device tree and MDESC have been setup, we know
1817 * the list of possible cpus. Therefore we can allocate the 1813 * the list of possible cpus. Therefore we can allocate the
1818 * IRQ stacks. 1814 * IRQ stacks.