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
This commit is contained in:
Michal Meloun 2016-01-31 08:06:22 +00:00
parent 038659e7dd
commit 23c2675f0c
2 changed files with 3 additions and 6 deletions

View File

@ -99,7 +99,6 @@ __FBSDID("$FreeBSD$");
.Lcurpcpu:
.word _C_LABEL(__pcpu)
.word PCPU_SIZE
.Lblocked_lock:
.word _C_LABEL(blocked_lock)

View File

@ -85,13 +85,14 @@
#include <machine/asm.h>
#include <machine/asmacros.h>
#include <machine/armreg.h>
#include <machine/sysreg.h>
#include <machine/vfp.h>
__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 <machine/sysreg.h>
ENTRY(cpu_context_switch) /* QQQ: What about macro instead of function? */
DSB
mcr CP15_TTBR0(r0) /* set the new TTB */