Commit 62d08aec authored by Ingo Molnar's avatar Ingo Molnar

Merge branch 'context_tracking/fixes' of...

Merge branch 'context_tracking/fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic/linux-dynticks into sched/urgent

Pull context tracking ARM fix from Frederic Weisbecker.
Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
parents 82dfaa58 0c06a5d4
...@@ -329,10 +329,10 @@ ...@@ -329,10 +329,10 @@
#ifdef CONFIG_CONTEXT_TRACKING #ifdef CONFIG_CONTEXT_TRACKING
.if \save .if \save
stmdb sp!, {r0-r3, ip, lr} stmdb sp!, {r0-r3, ip, lr}
bl user_exit bl context_tracking_user_exit
ldmia sp!, {r0-r3, ip, lr} ldmia sp!, {r0-r3, ip, lr}
.else .else
bl user_exit bl context_tracking_user_exit
.endif .endif
#endif #endif
.endm .endm
...@@ -341,10 +341,10 @@ ...@@ -341,10 +341,10 @@
#ifdef CONFIG_CONTEXT_TRACKING #ifdef CONFIG_CONTEXT_TRACKING
.if \save .if \save
stmdb sp!, {r0-r3, ip, lr} stmdb sp!, {r0-r3, ip, lr}
bl user_enter bl context_tracking_user_enter
ldmia sp!, {r0-r3, ip, lr} ldmia sp!, {r0-r3, ip, lr}
.else .else
bl user_enter bl context_tracking_user_enter
.endif .endif
#endif #endif
.endm .endm
......
...@@ -50,6 +50,15 @@ void context_tracking_user_enter(void) ...@@ -50,6 +50,15 @@ void context_tracking_user_enter(void)
{ {
unsigned long flags; unsigned long flags;
/*
* Repeat the user_enter() check here because some archs may be calling
* this from asm and if no CPU needs context tracking, they shouldn't
* go further. Repeat the check here until they support the static key
* check.
*/
if (!static_key_false(&context_tracking_enabled))
return;
/* /*
* Some contexts may involve an exception occuring in an irq, * Some contexts may involve an exception occuring in an irq,
* leading to that nesting: * leading to that nesting:
...@@ -151,6 +160,9 @@ void context_tracking_user_exit(void) ...@@ -151,6 +160,9 @@ void context_tracking_user_exit(void)
{ {
unsigned long flags; unsigned long flags;
if (!static_key_false(&context_tracking_enabled))
return;
if (in_interrupt()) if (in_interrupt())
return; return;
......
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