diff --git a/sys/arm/arm/swtch-v4.S b/sys/arm/arm/swtch-v4.S index 19933e1345be..52dc88c8f85e 100644 --- a/sys/arm/arm/swtch-v4.S +++ b/sys/arm/arm/swtch-v4.S @@ -99,7 +99,6 @@ __FBSDID("$FreeBSD$"); .Lcurpcpu: .word _C_LABEL(__pcpu) - .word PCPU_SIZE .Lblocked_lock: .word _C_LABEL(blocked_lock) diff --git a/sys/arm/arm/swtch-v6.S b/sys/arm/arm/swtch-v6.S index 34788eb001a2..3822cdbfe16a 100644 --- a/sys/arm/arm/swtch-v6.S +++ b/sys/arm/arm/swtch-v6.S @@ -85,13 +85,14 @@ #include #include #include +#include #include __FBSDID("$FreeBSD$"); -#if __ARM_ARCH >= 6 && defined(SMP) +#if defined(SMP) #define GET_PCPU(tmp, tmp2) \ - mrc p15, 0, tmp, c0, c0, 5; \ + mrc CP15_MPIDR(tmp); \ and tmp, tmp, #0xf; \ ldr tmp2, .Lcurpcpu+4; \ mul tmp, tmp, tmp2; \ @@ -113,9 +114,6 @@ __FBSDID("$FreeBSD$"); .Lblocked_lock: .word _C_LABEL(blocked_lock) - -#include - ENTRY(cpu_context_switch) /* QQQ: What about macro instead of function? */ DSB mcr CP15_TTBR0(r0) /* set the new TTB */