sparc32,leon: operate on boot-cpu IRQ controller registers
[deliverable/linux.git] / arch / sparc / kernel / head_32.S
index 520c615d37664c19f15671a2a26a5cb7af64db89..58778575983847d37b60ba88c9de2c7cd2883c63 100644 (file)
@@ -810,27 +810,24 @@ found_version:
 got_prop:
 #ifdef CONFIG_SPARC_LEON
                /* no cpu-type check is needed, it is a SPARC-LEON */
-#ifdef CONFIG_SMP
-               ba leon_smp_init
-                nop
 
-               .global leon_smp_init
-leon_smp_init:
-               /* let boot_cpu_id default to 0 (master always 0) */
+               sethi   %hi(boot_cpu_id), %g2   ! boot-cpu index
 
-               rd     %asr17,%g1
-               srl    %g1,28,%g1
+#ifdef CONFIG_SMP
+               ldub    [%g2 + %lo(boot_cpu_id)], %g1
+               cmp     %g1, 0xff               ! unset means first CPU
+               bne     leon_smp_cpu_startup    ! continue only with master
+                nop
+#endif
+               /* Get CPU-ID from most significant 4-bit of ASR17 */
+               rd     %asr17, %g1
+               srl    %g1, 28, %g1
 
-               cmp %g0,%g1
-                beq sun4c_continue_boot         !continue with master
-               nop
+               /* Update boot_cpu_id only on boot cpu */
+               stub    %g1, [%g2 + %lo(boot_cpu_id)]
 
-               ba leon_smp_cpu_startup
-                nop
-#else
                ba sun4c_continue_boot
                 nop
-#endif
 #endif
                set     cputypval, %o2
                ldub    [%o2 + 0x4], %l1
This page took 0.097981 seconds and 5 git commands to generate.