sparc: Call OF and MD cpu scanning explicitly from paging_init()
authorDavid S. Miller <davem@davemloft.net>
Wed, 1 Apr 2009 10:13:15 +0000 (03:13 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 16 Jun 2009 11:56:19 +0000 (04:56 -0700)
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>
arch/sparc/include/asm/prom.h
arch/sparc/kernel/mdesc.c
arch/sparc/kernel/prom.h
arch/sparc/kernel/prom_common.c
arch/sparc/mm/init_32.c
arch/sparc/mm/init_64.c

index 1b15212563cde2da9f148c51e462cfe7920b6df8..be8d7aaeb60d104563e4c88936da08d7c284828a 100644 (file)
@@ -87,6 +87,7 @@ extern int of_node_to_nid(struct device_node *dp);
 
 extern void prom_build_devicetree(void);
 extern void of_populate_present_mask(void);
+extern void of_fill_in_cpu_data(void);
 
 /* Dummy ref counting routines - to be implemented later */
 static inline struct device_node *of_node_get(struct device_node *node)
index f50af3f9a2c90771c48aa7d44a7f5b54c9c49943..602cbb70dd51b946291e040ab226d67e9352df5c 100644 (file)
@@ -919,7 +919,6 @@ void __init sun4v_mdesc_init(void)
 {
        struct mdesc_handle *hp;
        unsigned long len, real_len, status;
-       cpumask_t mask;
 
        (void) sun4v_mach_desc(0UL, 0UL, &len);
 
@@ -943,7 +942,4 @@ void __init sun4v_mdesc_init(void)
        cur_mdesc = hp;
 
        report_platform_properties();
-
-       cpus_setall(mask);
-       mdesc_fill_in_cpu_data(mask);
 }
index bb0f0fda6cab4a4686cbb031a0864c45e3df346a..453397fe5e14035fbc980689d844e5673312d4a3 100644 (file)
@@ -22,7 +22,6 @@ static inline int is_root_node(const struct device_node *dp)
 
 extern char *build_path_component(struct device_node *dp);
 extern void of_console_init(void);
-extern void of_fill_in_cpu_data(void);
 
 extern unsigned int prom_early_allocated;
 
index ff7b591c8946d1ad5f849f0956e4452037f78e66..0fb5789d43c82e84977757251ad78a6fa834d9b5 100644 (file)
@@ -313,6 +313,4 @@ void __init prom_build_devicetree(void)
 
        printk("PROM: Built device tree with %u bytes of memory.\n",
               prom_early_allocated);
-
-       of_fill_in_cpu_data();
 }
index cbb282dab5a7e5d82ac386730d6b3e1244ee08e4..26bb3919ff1fe216eda103883b9ee0aec2f8208e 100644 (file)
@@ -358,6 +358,7 @@ void __init paging_init(void)
        protection_map[15] = PAGE_SHARED;
        btfixup();
        prom_build_devicetree();
+       of_fill_in_cpu_data();
        device_scan();
 }
 
index f26a352c08a068b0b915ddc0d309c394cb2fc966..c589d6e6566835355ea2a48cbfa8a572d21d1403 100644 (file)
@@ -1806,9 +1806,12 @@ void __init paging_init(void)
        real_setup_per_cpu_areas();
 
        prom_build_devicetree();
+       of_fill_in_cpu_data();
 
-       if (tlb_type == hypervisor)
+       if (tlb_type == hypervisor) {
                sun4v_mdesc_init();
+               mdesc_fill_in_cpu_data(CPU_MASK_ALL);
+       }
 
        /* Once the OF device tree and MDESC have been setup, we know
         * the list of possible cpus.  Therefore we can allocate the