Revert to Fedora kernel-2.6.17-1.2187_FC5 patched with vs2.0.2.1; there are too many...
[linux-2.6.git] / arch / sparc64 / kernel / smp.c
index f62bf3a..f03d52d 100644 (file)
@@ -39,7 +39,6 @@
 #include <asm/starfire.h>
 #include <asm/tlb.h>
 #include <asm/sections.h>
-#include <asm/prom.h>
 
 extern void calibrate_delay(void);
 
@@ -77,42 +76,41 @@ void smp_bogo(struct seq_file *m)
 
 void __init smp_store_cpu_info(int id)
 {
-       struct device_node *dp;
-       int def;
+       int cpu_node, def;
 
        /* multiplier and counter set by
           smp_setup_percpu_timer()  */
        cpu_data(id).udelay_val                 = loops_per_jiffy;
 
-       cpu_find_by_mid(id, &dp);
-       cpu_data(id).clock_tick =
-               of_getintprop_default(dp, "clock-frequency", 0);
+       cpu_find_by_mid(id, &cpu_node);
+       cpu_data(id).clock_tick = prom_getintdefault(cpu_node,
+                                                    "clock-frequency", 0);
 
        def = ((tlb_type == hypervisor) ? (8 * 1024) : (16 * 1024));
-       cpu_data(id).dcache_size =
-               of_getintprop_default(dp, "dcache-size", def);
+       cpu_data(id).dcache_size = prom_getintdefault(cpu_node, "dcache-size",
+                                                     def);
 
        def = 32;
        cpu_data(id).dcache_line_size =
-               of_getintprop_default(dp, "dcache-line-size", def);
+               prom_getintdefault(cpu_node, "dcache-line-size", def);
 
        def = 16 * 1024;
-       cpu_data(id).icache_size =
-               of_getintprop_default(dp, "icache-size", def);
+       cpu_data(id).icache_size = prom_getintdefault(cpu_node, "icache-size",
+                                                     def);
 
        def = 32;
        cpu_data(id).icache_line_size =
-               of_getintprop_default(dp, "icache-line-size", def);
+               prom_getintdefault(cpu_node, "icache-line-size", def);
 
        def = ((tlb_type == hypervisor) ?
               (3 * 1024 * 1024) :
               (4 * 1024 * 1024));
-       cpu_data(id).ecache_size =
-               of_getintprop_default(dp, "ecache-size", def);
+       cpu_data(id).ecache_size = prom_getintdefault(cpu_node, "ecache-size",
+                                                     def);
 
        def = 64;
        cpu_data(id).ecache_line_size =
-               of_getintprop_default(dp, "ecache-line-size", def);
+               prom_getintdefault(cpu_node, "ecache-line-size", def);
 
        printk("CPU[%d]: Caches "
               "D[sz(%d):line_sz(%d)] "
@@ -344,10 +342,10 @@ static int __devinit smp_boot_one_cpu(unsigned int cpu)
 
                prom_startcpu_cpuid(cpu, entry, cookie);
        } else {
-               struct device_node *dp;
+               int cpu_node;
 
-               cpu_find_by_mid(cpu, &dp);
-               prom_startcpu(dp->node, entry, cookie);
+               cpu_find_by_mid(cpu, &cpu_node);
+               prom_startcpu(cpu_node, entry, cookie);
        }
 
        for (timeout = 0; timeout < 5000000; timeout++) {
@@ -1291,8 +1289,7 @@ int setup_profiling_timer(unsigned int multiplier)
 
 static void __init smp_tune_scheduling(void)
 {
-       struct device_node *dp;
-       int instance;
+       int instance, node;
        unsigned int def, smallest = ~0U;
 
        def = ((tlb_type == hypervisor) ?
@@ -1300,10 +1297,10 @@ static void __init smp_tune_scheduling(void)
               (4 * 1024 * 1024));
 
        instance = 0;
-       while (!cpu_find_by_instance(instance, &dp, NULL)) {
+       while (!cpu_find_by_instance(instance, &node, NULL)) {
                unsigned int val;
 
-               val = of_getintprop_default(dp, "ecache-size", def);
+               val = prom_getintdefault(node, "ecache-size", def);
                if (val < smallest)
                        smallest = val;