summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorcognet <cognet@FreeBSD.org>2005-03-01 20:51:37 +0000
committercognet <cognet@FreeBSD.org>2005-03-01 20:51:37 +0000
commit42a8b3a5679e4bc34e942b115953f21edef85b88 (patch)
tree6014569cb810b129837aed3a174acb49ebd9ceae /sys
parent33b81ea30f1b0e40dffb5af12ef4bdb195d8d52f (diff)
downloadFreeBSD-src-42a8b3a5679e4bc34e942b115953f21edef85b88.zip
FreeBSD-src-42a8b3a5679e4bc34e942b115953f21edef85b88.tar.gz
In cpu_throw(), correctly calculate td->td_md.md_tp.
In cpu_switch(), set the DACR even if we're switching to a kernel thread.
Diffstat (limited to 'sys')
-rw-r--r--sys/arm/arm/swtch.S4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/arm/arm/swtch.S b/sys/arm/arm/swtch.S
index a52298b..2ea5028 100644
--- a/sys/arm/arm/swtch.S
+++ b/sys/arm/arm/swtch.S
@@ -202,8 +202,7 @@ ENTRY(cpu_throw)
str r5, [r6]
/* Set the new tp */
- ldr r6, [r5, #(TD_MD)]
- add r6, r6, #(MD_TP)
+ ldr r6, [r5, #(TD_MD + MD_TP)]
mov r5, #ARM_TP_ADDRESS
str r6, [r5]
@@ -300,6 +299,7 @@ ENTRY(cpu_switch)
ldr r5, [r9, #(PCB_DACR)] /* r5 = new DACR */
mov r2, #DOMAIN_CLIENT
cmp r5, r2, lsl #(PMAP_DOMAIN_KERNEL * 2) /* Sw to kernel thread? */
+ mcreq p15, 0, r5, c3, c0, 0 /* Update DACR for new context */
beq .Lcs_context_switched /* Yup. Don't flush cache */
mrc p15, 0, r0, c3, c0, 0 /* r0 = old DACR */
/*
OpenPOWER on IntegriCloud