]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - arch/ia64/kernel/head.S
Merge git://git.infradead.org/hdrinstall-2.6
[mv-sheeva.git] / arch / ia64 / kernel / head.S
index 0d535d65eea6aa98bcd6e4e4b4f797c1fde76d7b..561b8f1d3bc7dbb62c05f41494f856b199afe2ab 100644 (file)
  *   Support for CPU Hotplug
  */
 
-#include <linux/config.h>
 
 #include <asm/asmmacro.h>
 #include <asm/fpu.h>
 #include <asm/kregs.h>
 #include <asm/mmu_context.h>
-#include <asm/offsets.h>
+#include <asm/asm-offsets.h>
 #include <asm/pal.h>
 #include <asm/pgtable.h>
 #include <asm/processor.h>
@@ -95,6 +94,10 @@ RestRR:                                                                                      \
        add             _idx1=1,_idx1;;                                         \
        br.cloop.sptk.few       RestRR
 
+#define SET_AREA_FOR_BOOTING_CPU(reg1, reg2) \
+       movl reg1=sal_state_for_booting_cpu;;   \
+       ld8 reg2=[reg1];;
+
 /*
  * Adjust region registers saved before starting to save
  * break regs and rest of the states that need to be preserved.
@@ -150,7 +153,8 @@ RestRR:                                                                                     \
        stf.spill.nta [_reg1]=f31,16;;
 
 #else
-#define SAL_TO_OS_BOOT_HANDOFF_STATE_SAVE(a1,a2)
+#define SET_AREA_FOR_BOOTING_CPU(a1, a2)
+#define SAL_TO_OS_BOOT_HANDOFF_STATE_SAVE(a1,a2, a3)
 #define SAVE_REGION_REGS(_tmp, _r0, _r1, _r2, _r3, _r4, _r5, _r6, _r7)
 #define STORE_REGION_REGS(ptr, _r0, _r1, _r2, _r3, _r4, _r5, _r6, _r7)
 #endif
@@ -260,8 +264,7 @@ start_ap:
        ;;
 1:     // now we are in virtual mode
 
-       movl r2=sal_state_for_booting_cpu;;
-       ld8 r16=[r2];;
+       SET_AREA_FOR_BOOTING_CPU(r2, r16);
 
        STORE_REGION_REGS(r16, r8,r9,r10,r11,r12,r13,r14,r15);
        SAL_TO_OS_BOOT_HANDOFF_STATE_SAVE(r16,r17,r25)
@@ -348,6 +351,7 @@ 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
        ;;
        mov ar.bspstore=r2      // establish the new RSE stack
        ;;
@@ -1056,7 +1060,7 @@ SET_REG(b5);
         * the clobber lists for spin_lock() in include/asm-ia64/spinlock.h.
         */
 
-#if __GNUC__ < 3 || (__GNUC__ == 3 && __GNUC_MINOR__ < 3)
+#if (__GNUC__ == 3 && __GNUC_MINOR__ < 3)
 
 GLOBAL_ENTRY(ia64_spinlock_contention_pre3_4)
        .prologue