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

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