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

sparc: Call OF and MD cpu scanning explicitly from paging_init()

We need to split up the cpu present mask setup from the cpu_data
initialization, and this is a first step towards that.

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

+6 -8
+1
arch/sparc/include/asm/prom.h
··· 87 87 88 88 extern void prom_build_devicetree(void); 89 89 extern void of_populate_present_mask(void); 90 + extern void of_fill_in_cpu_data(void); 90 91 91 92 /* Dummy ref counting routines - to be implemented later */ 92 93 static inline struct device_node *of_node_get(struct device_node *node)
-4
arch/sparc/kernel/mdesc.c
··· 919 919 { 920 920 struct mdesc_handle *hp; 921 921 unsigned long len, real_len, status; 922 - cpumask_t mask; 923 922 924 923 (void) sun4v_mach_desc(0UL, 0UL, &len); 925 924 ··· 942 943 cur_mdesc = hp; 943 944 944 945 report_platform_properties(); 945 - 946 - cpus_setall(mask); 947 - mdesc_fill_in_cpu_data(mask); 948 946 }
-1
arch/sparc/kernel/prom.h
··· 22 22 23 23 extern char *build_path_component(struct device_node *dp); 24 24 extern void of_console_init(void); 25 - extern void of_fill_in_cpu_data(void); 26 25 27 26 extern unsigned int prom_early_allocated; 28 27
-2
arch/sparc/kernel/prom_common.c
··· 313 313 314 314 printk("PROM: Built device tree with %u bytes of memory.\n", 315 315 prom_early_allocated); 316 - 317 - of_fill_in_cpu_data(); 318 316 }
+1
arch/sparc/mm/init_32.c
··· 358 358 protection_map[15] = PAGE_SHARED; 359 359 btfixup(); 360 360 prom_build_devicetree(); 361 + of_fill_in_cpu_data(); 361 362 device_scan(); 362 363 } 363 364
+4 -1
arch/sparc/mm/init_64.c
··· 1806 1806 real_setup_per_cpu_areas(); 1807 1807 1808 1808 prom_build_devicetree(); 1809 + of_fill_in_cpu_data(); 1809 1810 1810 - if (tlb_type == hypervisor) 1811 + if (tlb_type == hypervisor) { 1811 1812 sun4v_mdesc_init(); 1813 + mdesc_fill_in_cpu_data(CPU_MASK_ALL); 1814 + } 1812 1815 1813 1816 /* Once the OF device tree and MDESC have been setup, we know 1814 1817 * the list of possible cpus. Therefore we can allocate the