]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/ia64/kernel/head.S
Merge branch 'ec' into test
[linux-2.6-omap-h63xx.git] / arch / ia64 / kernel / head.S
index db540e58c783b9e43a7d2b99b0843a6089c470df..66e491d8baac3130a4dd68581662395b94a951b4 100644 (file)
@@ -359,7 +359,32 @@ start_ap:
        mov ar.rsc=0            // place RSE in enforced lazy mode
        ;;
        loadrs                  // clear the dirty partition
-       mov IA64_KR(PER_CPU_DATA)=r0    // clear physical per-CPU base
+       movl r19=__phys_per_cpu_start
+       mov r18=PERCPU_PAGE_SIZE
+       ;;
+#ifndef CONFIG_SMP
+       add r19=r19,r18
+       ;;
+#else
+(isAP) br.few 2f
+       movl r20=__cpu0_per_cpu
+       ;;
+       shr.u r18=r18,3
+1:
+       ld8 r21=[r19],8;;
+       st8[r20]=r21,8
+       adds r18=-1,r18;;
+       cmp4.lt p7,p6=0,r18
+(p7)   br.cond.dptk.few 1b
+       mov r19=r20
+       ;;
+2:
+#endif
+       tpa r19=r19
+       ;;
+       .pred.rel.mutex isBP,isAP
+(isBP) mov IA64_KR(PER_CPU_DATA)=r19   // per-CPU base for cpu0
+(isAP) mov IA64_KR(PER_CPU_DATA)=r0    // clear physical per-CPU base
        ;;
        mov ar.bspstore=r2      // establish the new RSE stack
        ;;
@@ -1123,7 +1148,7 @@ SET_REG(b5);
         *   p15    - used to track flag status.
         *
         * If you patch this code to use more registers, do not forget to update
-        * the clobber lists for spin_lock() in include/asm-ia64/spinlock.h.
+        * the clobber lists for spin_lock() in arch/ia64/include/asm/spinlock.h.
         */
 
 #if (__GNUC__ == 3 && __GNUC_MINOR__ < 3)