diff options
author | Frederic Weisbecker <[email protected]> | 2013-09-10 00:54:17 +0200 |
---|---|---|
committer | Frederic Weisbecker <[email protected]> | 2013-09-27 17:59:47 +0200 |
commit | 0c06a5d4b13cd66c833805a0d1db76b977944aac (patch) | |
tree | e4c4e8ede9124f414dcaf72b4ba3a90453025849 | |
parent | 4a10c2ac2f368583138b774ca41fac4207911983 (diff) |
arm: Fix build error with context tracking calls
ad65782fba50 (context_tracking: Optimize main APIs off case
with static key) converted context tracking main APIs to inline
function and left ARM asm callers behind.
This can be easily fixed by making ARM calling the post static
keys context tracking function. We just need to replicate the
static key checks there. We'll remove these later when ARM will
support the context tracking static keys.
Reported-by: Guenter Roeck <[email protected]>
Reported-by: Russell King <[email protected]>
Signed-off-by: Frederic Weisbecker <[email protected]>
Tested-by: Kevin Hilman <[email protected]>
Cc: Nicolas Pitre <[email protected]>
Cc: Anil Kumar <[email protected]>
Cc: Tony Lindgren <[email protected]>
Cc: Benoit Cousson <[email protected]>
Cc: Guenter Roeck <[email protected]>
Cc: Russell King <[email protected]>
Cc: Kevin Hilman <[email protected]>
-rw-r--r-- | arch/arm/kernel/entry-header.S | 8 | ||||
-rw-r--r-- | kernel/context_tracking.c | 12 |
2 files changed, 16 insertions, 4 deletions
diff --git a/arch/arm/kernel/entry-header.S b/arch/arm/kernel/entry-header.S index de23a9beed13..39f89fbd5111 100644 --- a/arch/arm/kernel/entry-header.S +++ b/arch/arm/kernel/entry-header.S @@ -329,10 +329,10 @@ #ifdef CONFIG_CONTEXT_TRACKING .if \save stmdb sp!, {r0-r3, ip, lr} - bl user_exit + bl context_tracking_user_exit ldmia sp!, {r0-r3, ip, lr} .else - bl user_exit + bl context_tracking_user_exit .endif #endif .endm @@ -341,10 +341,10 @@ #ifdef CONFIG_CONTEXT_TRACKING .if \save stmdb sp!, {r0-r3, ip, lr} - bl user_enter + bl context_tracking_user_enter ldmia sp!, {r0-r3, ip, lr} .else - bl user_enter + bl context_tracking_user_enter .endif #endif .endm diff --git a/kernel/context_tracking.c b/kernel/context_tracking.c index 247091bf0587..859c8dfd78a1 100644 --- a/kernel/context_tracking.c +++ b/kernel/context_tracking.c @@ -51,6 +51,15 @@ void context_tracking_user_enter(void) 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, * leading to that nesting: * rcu_irq_enter() rcu_user_exit() rcu_user_exit() rcu_irq_exit() @@ -151,6 +160,9 @@ void context_tracking_user_exit(void) { unsigned long flags; + if (!static_key_false(&context_tracking_enabled)) + return; + if (in_interrupt()) return; |