powerpc: Fix compile error with CONFIG_TAU=y
[safe/jmp/linux-2.6] / arch / powerpc / kernel / prom.c
index ab9b291..2eccd0e 100644 (file)
@@ -78,15 +78,13 @@ extern struct rtas_t rtas;
 extern struct lmb lmb;
 extern unsigned long klimit;
 
-static unsigned long memory_limit;
-
 static int __initdata dt_root_addr_cells;
 static int __initdata dt_root_size_cells;
 
 #ifdef CONFIG_PPC64
 static int __initdata iommu_is_off;
 int __initdata iommu_force_on;
-extern unsigned long tce_alloc_start, tce_alloc_end;
+unsigned long tce_alloc_start, tce_alloc_end;
 #endif
 
 typedef u32 cell_t;
@@ -1110,22 +1108,22 @@ static int __init early_init_dt_scan_cpus(unsigned long node,
        }
 #endif
 
-#ifdef CONFIG_PPC64
+       boot_cpuid = 0;
+       boot_cpuid_phys = 0;
        if (initial_boot_params && initial_boot_params->version >= 2) {
                /* version 2 of the kexec param format adds the phys cpuid
                 * of booted proc.
                 */
                boot_cpuid_phys = initial_boot_params->boot_cpuid_phys;
-               boot_cpuid = 0;
        } else {
-               /* Check if it's the boot-cpu, set it's hw index in paca now */
+               /* Check if it's the boot-cpu, set it's hw index now */
                if (get_flat_dt_prop(node, "linux,boot-cpu", NULL) != NULL) {
                        prop = get_flat_dt_prop(node, "reg", NULL);
-                       set_hard_smp_processor_id(0, prop == NULL ? 0 : *prop);
-                       boot_cpuid_phys = get_hard_smp_processor_id(0);
+                       if (prop != NULL)
+                               boot_cpuid_phys = *prop;
                }
        }
-#endif
+       set_hard_smp_processor_id(0, boot_cpuid_phys);
 
 #ifdef CONFIG_ALTIVEC
        /* Check if we have a VMX and eventually update CPU features */