mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
powerpc: Fix unpaired __trace_hcall_entry and __trace_hcall_exit
Unpaired calling of __trace_hcall_entry and __trace_hcall_exit could cause incorrect preempt count. And it might happen as the global variable hcall_tracepoint_refcount is checked separately before calling them. Instead, store the value that was used on entry in the stack frame and retreive it from there after the call Reported-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Signed-off-by: Li Zhong <zhong@linux.vnet.ibm.com> Tested-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
This commit is contained in:
parent
a5ccfee05a
commit
ebb7f616ab
1 changed files with 2 additions and 1 deletions
|
@ -36,6 +36,7 @@ BEGIN_FTR_SECTION; \
|
||||||
b 1f; \
|
b 1f; \
|
||||||
END_FTR_SECTION(0, 1); \
|
END_FTR_SECTION(0, 1); \
|
||||||
ld r12,hcall_tracepoint_refcount@toc(r2); \
|
ld r12,hcall_tracepoint_refcount@toc(r2); \
|
||||||
|
std r12,32(r1); \
|
||||||
cmpdi r12,0; \
|
cmpdi r12,0; \
|
||||||
beq+ 1f; \
|
beq+ 1f; \
|
||||||
mflr r0; \
|
mflr r0; \
|
||||||
|
@ -74,7 +75,7 @@ END_FTR_SECTION(0, 1); \
|
||||||
BEGIN_FTR_SECTION; \
|
BEGIN_FTR_SECTION; \
|
||||||
b 1f; \
|
b 1f; \
|
||||||
END_FTR_SECTION(0, 1); \
|
END_FTR_SECTION(0, 1); \
|
||||||
ld r12,hcall_tracepoint_refcount@toc(r2); \
|
ld r12,32(r1); \
|
||||||
cmpdi r12,0; \
|
cmpdi r12,0; \
|
||||||
beq+ 1f; \
|
beq+ 1f; \
|
||||||
mflr r0; \
|
mflr r0; \
|
||||||
|
|
Loading…
Reference in a new issue