]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/powerpc/kernel/setup_64.c
PCI: powerpc: use generic pci_enable_resources()
[linux-2.6-omap-h63xx.git] / arch / powerpc / kernel / setup_64.c
index 3089eaed3256c7dda38f6922679cfeef57693019..3b1529c103ef4a545da877bfe4d2de81cf41abe7 100644 (file)
@@ -291,23 +291,16 @@ static void __init initialize_cache_info(void)
                if ( num_cpus == 1 ) {
                        const u32 *sizep, *lsizep;
                        u32 size, lsize;
-                       const char *dc, *ic;
-
-                       /* Then read cache informations */
-                       if (machine_is(powermac)) {
-                               dc = "d-cache-block-size";
-                               ic = "i-cache-block-size";
-                       } else {
-                               dc = "d-cache-line-size";
-                               ic = "i-cache-line-size";
-                       }
 
                        size = 0;
                        lsize = cur_cpu_spec->dcache_bsize;
                        sizep = of_get_property(np, "d-cache-size", NULL);
                        if (sizep != NULL)
                                size = *sizep;
-                       lsizep = of_get_property(np, dc, NULL);
+                       lsizep = of_get_property(np, "d-cache-block-size", NULL);
+                       /* fallback if block size missing */
+                       if (lsizep == NULL)
+                               lsizep = of_get_property(np, "d-cache-line-size", NULL);
                        if (lsizep != NULL)
                                lsize = *lsizep;
                        if (sizep == 0 || lsizep == 0)
@@ -324,7 +317,9 @@ static void __init initialize_cache_info(void)
                        sizep = of_get_property(np, "i-cache-size", NULL);
                        if (sizep != NULL)
                                size = *sizep;
-                       lsizep = of_get_property(np, ic, NULL);
+                       lsizep = of_get_property(np, "i-cache-block-size", NULL);
+                       if (lsizep == NULL)
+                               lsizep = of_get_property(np, "i-cache-line-size", NULL);
                        if (lsizep != NULL)
                                lsize = *lsizep;
                        if (sizep == 0 || lsizep == 0)
@@ -426,11 +421,14 @@ void __init setup_system(void)
        printk("-----------------------------------------------------\n");
        printk("ppc64_pft_size                = 0x%lx\n", ppc64_pft_size);
        printk("physicalMemorySize            = 0x%lx\n", lmb_phys_mem_size());
-       printk("ppc64_caches.dcache_line_size = 0x%x\n",
-              ppc64_caches.dline_size);
-       printk("ppc64_caches.icache_line_size = 0x%x\n",
-              ppc64_caches.iline_size);
-       printk("htab_address                  = 0x%p\n", htab_address);
+       if (ppc64_caches.dline_size != 0x80)
+               printk("ppc64_caches.dcache_line_size = 0x%x\n",
+                      ppc64_caches.dline_size);
+       if (ppc64_caches.iline_size != 0x80)
+               printk("ppc64_caches.icache_line_size = 0x%x\n",
+                      ppc64_caches.iline_size);
+       if (htab_address)
+               printk("htab_address                  = 0x%p\n", htab_address);
        printk("htab_hash_mask                = 0x%lx\n", htab_hash_mask);
 #if PHYSICAL_START > 0
        printk("physical_start                = 0x%x\n", PHYSICAL_START);
@@ -530,7 +528,8 @@ void __init setup_arch(char **cmdline_p)
        conswitchp = &dummy_con;
 #endif
 
-       ppc_md.setup_arch();
+       if (ppc_md.setup_arch)
+               ppc_md.setup_arch();
 
        paging_init();
        ppc64_boot_msg(0x15, "Setup Done");
@@ -596,6 +595,9 @@ void __init setup_per_cpu_areas(void)
                paca[i].data_offset = ptr - __per_cpu_start;
                memcpy(ptr, __per_cpu_start, __per_cpu_end - __per_cpu_start);
        }
+
+       /* Now that per_cpu is setup, initialize cpu_sibling_map */
+       smp_setup_cpu_sibling_map();
 }
 #endif