diff options
author | David S. Miller <davem@davemloft.net> | 2009-04-01 06:13:15 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-06-16 07:56:19 -0400 |
commit | 890db403d59fbeaf273ed019d0b1862223d80a9a (patch) | |
tree | 361b01ee0f84227bfb84e4390ef94432b5a36aca /arch/sparc | |
parent | 5052f525fde2dcb550cc3b4f15d2bfdd2a5c8782 (diff) |
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>
Diffstat (limited to 'arch/sparc')
-rw-r--r-- | arch/sparc/include/asm/prom.h | 1 | ||||
-rw-r--r-- | arch/sparc/kernel/mdesc.c | 4 | ||||
-rw-r--r-- | arch/sparc/kernel/prom.h | 1 | ||||
-rw-r--r-- | arch/sparc/kernel/prom_common.c | 2 | ||||
-rw-r--r-- | arch/sparc/mm/init_32.c | 1 | ||||
-rw-r--r-- | arch/sparc/mm/init_64.c | 5 |
6 files changed, 6 insertions, 8 deletions
diff --git a/arch/sparc/include/asm/prom.h b/arch/sparc/include/asm/prom.h index 1b15212563cd..be8d7aaeb60d 100644 --- a/arch/sparc/include/asm/prom.h +++ b/arch/sparc/include/asm/prom.h | |||
@@ -87,6 +87,7 @@ extern int of_node_to_nid(struct device_node *dp); | |||
87 | 87 | ||
88 | extern void prom_build_devicetree(void); | 88 | extern void prom_build_devicetree(void); |
89 | extern void of_populate_present_mask(void); | 89 | extern void of_populate_present_mask(void); |
90 | extern void of_fill_in_cpu_data(void); | ||
90 | 91 | ||
91 | /* Dummy ref counting routines - to be implemented later */ | 92 | /* Dummy ref counting routines - to be implemented later */ |
92 | static inline struct device_node *of_node_get(struct device_node *node) | 93 | static inline struct device_node *of_node_get(struct device_node *node) |
diff --git a/arch/sparc/kernel/mdesc.c b/arch/sparc/kernel/mdesc.c index f50af3f9a2c9..602cbb70dd51 100644 --- a/arch/sparc/kernel/mdesc.c +++ b/arch/sparc/kernel/mdesc.c | |||
@@ -919,7 +919,6 @@ void __init sun4v_mdesc_init(void) | |||
919 | { | 919 | { |
920 | struct mdesc_handle *hp; | 920 | struct mdesc_handle *hp; |
921 | unsigned long len, real_len, status; | 921 | unsigned long len, real_len, status; |
922 | cpumask_t mask; | ||
923 | 922 | ||
924 | (void) sun4v_mach_desc(0UL, 0UL, &len); | 923 | (void) sun4v_mach_desc(0UL, 0UL, &len); |
925 | 924 | ||
@@ -943,7 +942,4 @@ void __init sun4v_mdesc_init(void) | |||
943 | cur_mdesc = hp; | 942 | cur_mdesc = hp; |
944 | 943 | ||
945 | report_platform_properties(); | 944 | report_platform_properties(); |
946 | |||
947 | cpus_setall(mask); | ||
948 | mdesc_fill_in_cpu_data(mask); | ||
949 | } | 945 | } |
diff --git a/arch/sparc/kernel/prom.h b/arch/sparc/kernel/prom.h index bb0f0fda6cab..453397fe5e14 100644 --- a/arch/sparc/kernel/prom.h +++ b/arch/sparc/kernel/prom.h | |||
@@ -22,7 +22,6 @@ static inline int is_root_node(const struct device_node *dp) | |||
22 | 22 | ||
23 | extern char *build_path_component(struct device_node *dp); | 23 | extern char *build_path_component(struct device_node *dp); |
24 | extern void of_console_init(void); | 24 | extern void of_console_init(void); |
25 | extern void of_fill_in_cpu_data(void); | ||
26 | 25 | ||
27 | extern unsigned int prom_early_allocated; | 26 | extern unsigned int prom_early_allocated; |
28 | 27 | ||
diff --git a/arch/sparc/kernel/prom_common.c b/arch/sparc/kernel/prom_common.c index ff7b591c8946..0fb5789d43c8 100644 --- a/arch/sparc/kernel/prom_common.c +++ b/arch/sparc/kernel/prom_common.c | |||
@@ -313,6 +313,4 @@ void __init prom_build_devicetree(void) | |||
313 | 313 | ||
314 | printk("PROM: Built device tree with %u bytes of memory.\n", | 314 | printk("PROM: Built device tree with %u bytes of memory.\n", |
315 | prom_early_allocated); | 315 | prom_early_allocated); |
316 | |||
317 | of_fill_in_cpu_data(); | ||
318 | } | 316 | } |
diff --git a/arch/sparc/mm/init_32.c b/arch/sparc/mm/init_32.c index cbb282dab5a7..26bb3919ff1f 100644 --- a/arch/sparc/mm/init_32.c +++ b/arch/sparc/mm/init_32.c | |||
@@ -358,6 +358,7 @@ void __init paging_init(void) | |||
358 | protection_map[15] = PAGE_SHARED; | 358 | protection_map[15] = PAGE_SHARED; |
359 | btfixup(); | 359 | btfixup(); |
360 | prom_build_devicetree(); | 360 | prom_build_devicetree(); |
361 | of_fill_in_cpu_data(); | ||
361 | device_scan(); | 362 | device_scan(); |
362 | } | 363 | } |
363 | 364 | ||
diff --git a/arch/sparc/mm/init_64.c b/arch/sparc/mm/init_64.c index f26a352c08a0..c589d6e65668 100644 --- a/arch/sparc/mm/init_64.c +++ b/arch/sparc/mm/init_64.c | |||
@@ -1806,9 +1806,12 @@ void __init paging_init(void) | |||
1806 | real_setup_per_cpu_areas(); | 1806 | real_setup_per_cpu_areas(); |
1807 | 1807 | ||
1808 | prom_build_devicetree(); | 1808 | prom_build_devicetree(); |
1809 | of_fill_in_cpu_data(); | ||
1809 | 1810 | ||
1810 | if (tlb_type == hypervisor) | 1811 | if (tlb_type == hypervisor) { |
1811 | sun4v_mdesc_init(); | 1812 | sun4v_mdesc_init(); |
1813 | mdesc_fill_in_cpu_data(CPU_MASK_ALL); | ||
1814 | } | ||
1812 | 1815 | ||
1813 | /* Once the OF device tree and MDESC have been setup, we know | 1816 | /* Once the OF device tree and MDESC have been setup, we know |
1814 | * the list of possible cpus. Therefore we can allocate the | 1817 | * the list of possible cpus. Therefore we can allocate the |