Commit b696fdc2 authored by David S. Miller's avatar David S. Miller

sparc64: Defer cpu_data() setup until end of per-cpu data initialization.

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent a2094502
...@@ -544,6 +544,7 @@ static int __cpuinit dr_cpu_configure(struct ds_info *dp, ...@@ -544,6 +544,7 @@ static int __cpuinit dr_cpu_configure(struct ds_info *dp,
resp_len, ncpus, mask, resp_len, ncpus, mask,
DR_CPU_STAT_CONFIGURED); DR_CPU_STAT_CONFIGURED);
mdesc_populate_present_mask(mask);
mdesc_fill_in_cpu_data(mask); mdesc_fill_in_cpu_data(mask);
for_each_cpu_mask(cpu, *mask) { for_each_cpu_mask(cpu, *mask) {
......
...@@ -861,7 +861,6 @@ void __cpuinit mdesc_fill_in_cpu_data(cpumask_t *mask) ...@@ -861,7 +861,6 @@ void __cpuinit mdesc_fill_in_cpu_data(cpumask_t *mask)
{ {
struct mdesc_handle *hp; struct mdesc_handle *hp;
mdesc_populate_present_mask(mask);
mdesc_iterate_over_cpus(fill_in_one_cpu, NULL, mask); mdesc_iterate_over_cpus(fill_in_one_cpu, NULL, mask);
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
......
...@@ -535,7 +535,6 @@ void __init of_fill_in_cpu_data(void) ...@@ -535,7 +535,6 @@ void __init of_fill_in_cpu_data(void)
if (tlb_type == hypervisor) if (tlb_type == hypervisor)
return; return;
of_populate_present_mask();
of_iterate_over_cpus(fill_in_one_cpu, 0); of_iterate_over_cpus(fill_in_one_cpu, 0);
smp_fill_in_sib_core_maps(); smp_fill_in_sib_core_maps();
......
...@@ -1399,4 +1399,8 @@ void __init real_setup_per_cpu_areas(void) ...@@ -1399,4 +1399,8 @@ void __init real_setup_per_cpu_areas(void)
/* Setup %g5 for the boot cpu. */ /* Setup %g5 for the boot cpu. */
__local_per_cpu_offset = __per_cpu_offset(smp_processor_id()); __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);
} }
...@@ -1799,20 +1799,16 @@ void __init paging_init(void) ...@@ -1799,20 +1799,16 @@ void __init paging_init(void)
if (tlb_type == hypervisor) if (tlb_type == hypervisor)
sun4v_ktsb_register(); 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(); prom_build_devicetree();
of_fill_in_cpu_data(); of_populate_present_mask();
if (tlb_type == hypervisor) { if (tlb_type == hypervisor) {
sun4v_mdesc_init(); 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 /* Once the OF device tree and MDESC have been setup, we know
* the list of possible cpus. Therefore we can allocate the * the list of possible cpus. Therefore we can allocate the
* IRQ stacks. * IRQ stacks.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment