From 23c2675f0c78a8e65dcabaf6d121f85c3f0ae9d2 Mon Sep 17 00:00:00 2001 From: Michal Meloun Date: Sun, 31 Jan 2016 08:06:22 +0000 Subject: [PATCH] ARM: Next round of cleanup in swtch-v*.S. - remove now useless #if __ARM_ARCH conditional - use macro for accessing CP15 registers - remove unused PCPU_SIZE Pointed by: kib --- sys/arm/arm/swtch-v4.S | 1 - sys/arm/arm/swtch-v6.S | 8 +++----- 2 files changed, 3 insertions(+), 6 deletions(-) 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 */