1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-15 10:17:20 +00:00

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.
This commit is contained in:
Olivier Houchard 2005-03-01 20:51:37 +00:00
parent 39e38e7623
commit 35e75c686f
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=142955

View File

@ -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 */
/*