Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

Signed-off-by: David S. Miller <davem@davemloft.net>

+9 -10
+1
arch/sparc/kernel/ds.c
··· 544 544 resp_len, ncpus, mask, 545 545 DR_CPU_STAT_CONFIGURED); 546 546 547 + mdesc_populate_present_mask(mask); 547 548 mdesc_fill_in_cpu_data(mask); 548 549 549 550 for_each_cpu_mask(cpu, *mask) {
-1
arch/sparc/kernel/mdesc.c
··· 861 861 { 862 862 struct mdesc_handle *hp; 863 863 864 - mdesc_populate_present_mask(mask); 865 864 mdesc_iterate_over_cpus(fill_in_one_cpu, NULL, mask); 866 865 867 866 #ifdef CONFIG_SMP
-1
arch/sparc/kernel/prom_64.c
··· 535 535 if (tlb_type == hypervisor) 536 536 return; 537 537 538 - of_populate_present_mask(); 539 538 of_iterate_over_cpus(fill_in_one_cpu, 0); 540 539 541 540 smp_fill_in_sib_core_maps();
+4
arch/sparc/kernel/smp_64.c
··· 1399 1399 1400 1400 /* Setup %g5 for the boot cpu. */ 1401 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 }
+4 -8
arch/sparc/mm/init_64.c
··· 1799 1799 if (tlb_type == hypervisor) 1800 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 1802 prom_build_devicetree(); 1809 - of_fill_in_cpu_data(); 1803 + of_populate_present_mask(); 1810 1804 1811 1805 if (tlb_type == hypervisor) { 1812 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 } 1809 + 1810 + real_setup_per_cpu_areas(); 1815 1811 1816 1812 /* Once the OF device tree and MDESC have been setup, we know 1817 1813 * the list of possible cpus. Therefore we can allocate the