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 / traps.c
index 68420e2..563db52 100644 (file)
@@ -9,6 +9,7 @@
  * I like traps on v9, :))))
  */
 
+#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/sched.h>  /* for jiffies */
 #include <linux/kernel.h>
@@ -41,7 +42,6 @@
 #ifdef CONFIG_KMOD
 #include <linux/kmod.h>
 #endif
-#include <asm/prom.h>
 
 ATOMIC_NOTIFIER_HEAD(sparc64die_chain);
 
@@ -807,8 +807,7 @@ extern unsigned int cheetah_deferred_trap_vector[], cheetah_deferred_trap_vector
 void __init cheetah_ecache_flush_init(void)
 {
        unsigned long largest_size, smallest_linesize, order, ver;
-       struct device_node *dp;
-       int i, instance, sz;
+       int node, i, instance;
 
        /* Scan all cpu device tree nodes, note two values:
         * 1) largest E-cache size
@@ -818,14 +817,14 @@ void __init cheetah_ecache_flush_init(void)
        smallest_linesize = ~0UL;
 
        instance = 0;
-       while (!cpu_find_by_instance(instance, &dp, NULL)) {
+       while (!cpu_find_by_instance(instance, &node, NULL)) {
                unsigned long val;
 
-               val = of_getintprop_default(dp, "ecache-size",
-                                           (2 * 1024 * 1024));
+               val = prom_getintdefault(node, "ecache-size",
+                                        (2 * 1024 * 1024));
                if (val > largest_size)
                        largest_size = val;
-               val = of_getintprop_default(dp, "ecache-line-size", 64);
+               val = prom_getintdefault(node, "ecache-line-size", 64);
                if (val < smallest_linesize)
                        smallest_linesize = val;
                instance++;
@@ -850,16 +849,16 @@ void __init cheetah_ecache_flush_init(void)
        }
 
        /* Now allocate error trap reporting scoreboard. */
-       sz = NR_CPUS * (2 * sizeof(struct cheetah_err_info));
+       node = NR_CPUS * (2 * sizeof(struct cheetah_err_info));
        for (order = 0; order < MAX_ORDER; order++) {
-               if ((PAGE_SIZE << order) >= sz)
+               if ((PAGE_SIZE << order) >= node)
                        break;
        }
        cheetah_error_log = (struct cheetah_err_info *)
                __get_free_pages(GFP_KERNEL, order);
        if (!cheetah_error_log) {
                prom_printf("cheetah_ecache_flush_init: Failed to allocate "
-                           "error logging scoreboard (%d bytes).\n", sz);
+                           "error logging scoreboard (%d bytes).\n", node);
                prom_halt();
        }
        memset(cheetah_error_log, 0, PAGE_SIZE << order);
@@ -2545,9 +2544,7 @@ void __init trap_init(void)
            (TRAP_PER_CPU_TSB_HUGE !=
             offsetof(struct trap_per_cpu, tsb_huge)) ||
            (TRAP_PER_CPU_TSB_HUGE_TEMP !=
-            offsetof(struct trap_per_cpu, tsb_huge_temp)) ||
-           (TRAP_PER_CPU_IRQ_WORKLIST !=
-            offsetof(struct trap_per_cpu, irq_worklist)))
+            offsetof(struct trap_per_cpu, tsb_huge_temp)))
                trap_per_cpu_offsets_are_bolixed_dave();
 
        if ((TSB_CONFIG_TSB !=