Commit 6b9166f0 authored by Christophe Leroy's avatar Christophe Leroy Committed by Michael Ellerman

powerpc/32: Fix CONFIG_VIRT_CPU_ACCOUNTING_NATIVE for 40x/booke

40x/booke have another path to reach 3f from transfer_to_handler,
make sure it also calls ACCOUNT_CPU_USER_ENTRY() when
CONFIG_VIRT_CPU_ACCOUNTING_NATIVE is selected.
Signed-off-by: default avatarChristophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent 78ca1108
...@@ -166,6 +166,13 @@ transfer_to_handler: ...@@ -166,6 +166,13 @@ transfer_to_handler:
internal debug mode bit to do this. */ internal debug mode bit to do this. */
lwz r12,THREAD_DBCR0(r12) lwz r12,THREAD_DBCR0(r12)
andis. r12,r12,DBCR0_IDM@h andis. r12,r12,DBCR0_IDM@h
#endif
#ifdef CONFIG_VIRT_CPU_ACCOUNTING_NATIVE
CURRENT_THREAD_INFO(r9, r1)
tophys(r9, r9)
ACCOUNT_CPU_USER_ENTRY(r9, r11, r12)
#endif
#if defined(CONFIG_40x) || defined(CONFIG_BOOKE)
beq+ 3f beq+ 3f
/* From user and task is ptraced - load up global dbcr0 */ /* From user and task is ptraced - load up global dbcr0 */
li r12,-1 /* clear all pending debug events */ li r12,-1 /* clear all pending debug events */
...@@ -185,11 +192,6 @@ transfer_to_handler: ...@@ -185,11 +192,6 @@ transfer_to_handler:
addi r12,r12,-1 addi r12,r12,-1
stw r12,4(r11) stw r12,4(r11)
#endif #endif
#ifdef CONFIG_VIRT_CPU_ACCOUNTING_NATIVE
CURRENT_THREAD_INFO(r9, r1)
tophys(r9, r9)
ACCOUNT_CPU_USER_ENTRY(r9, r11, r12)
#endif
b 3f b 3f
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment