diff options
author | Ingo Molnar <mingo@kernel.org> | 2013-09-28 02:50:09 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2013-09-28 02:50:09 -0400 |
commit | 62d08aec6a9f4b45cc9cba1e3b2855995df133e6 (patch) | |
tree | 51bddd857fb0eb03cd16c9ae17369e81b8f970f4 | |
parent | 82dfaa58a79c121be3611ce549dec806f2e6004f (diff) | |
parent | 0c06a5d4b13cd66c833805a0d1db76b977944aac (diff) |
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: Ingo Molnar <mingo@kernel.org>
-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 @@ | |||
329 | #ifdef CONFIG_CONTEXT_TRACKING | 329 | #ifdef CONFIG_CONTEXT_TRACKING |
330 | .if \save | 330 | .if \save |
331 | stmdb sp!, {r0-r3, ip, lr} | 331 | stmdb sp!, {r0-r3, ip, lr} |
332 | bl user_exit | 332 | bl context_tracking_user_exit |
333 | ldmia sp!, {r0-r3, ip, lr} | 333 | ldmia sp!, {r0-r3, ip, lr} |
334 | .else | 334 | .else |
335 | bl user_exit | 335 | bl context_tracking_user_exit |
336 | .endif | 336 | .endif |
337 | #endif | 337 | #endif |
338 | .endm | 338 | .endm |
@@ -341,10 +341,10 @@ | |||
341 | #ifdef CONFIG_CONTEXT_TRACKING | 341 | #ifdef CONFIG_CONTEXT_TRACKING |
342 | .if \save | 342 | .if \save |
343 | stmdb sp!, {r0-r3, ip, lr} | 343 | stmdb sp!, {r0-r3, ip, lr} |
344 | bl user_enter | 344 | bl context_tracking_user_enter |
345 | ldmia sp!, {r0-r3, ip, lr} | 345 | ldmia sp!, {r0-r3, ip, lr} |
346 | .else | 346 | .else |
347 | bl user_enter | 347 | bl context_tracking_user_enter |
348 | .endif | 348 | .endif |
349 | #endif | 349 | #endif |
350 | .endm | 350 | .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) | |||
51 | unsigned long flags; | 51 | unsigned long flags; |
52 | 52 | ||
53 | /* | 53 | /* |
54 | * Repeat the user_enter() check here because some archs may be calling | ||
55 | * this from asm and if no CPU needs context tracking, they shouldn't | ||
56 | * go further. Repeat the check here until they support the static key | ||
57 | * check. | ||
58 | */ | ||
59 | if (!static_key_false(&context_tracking_enabled)) | ||
60 | return; | ||
61 | |||
62 | /* | ||
54 | * Some contexts may involve an exception occuring in an irq, | 63 | * Some contexts may involve an exception occuring in an irq, |
55 | * leading to that nesting: | 64 | * leading to that nesting: |
56 | * rcu_irq_enter() rcu_user_exit() rcu_user_exit() rcu_irq_exit() | 65 | * rcu_irq_enter() rcu_user_exit() rcu_user_exit() rcu_irq_exit() |
@@ -151,6 +160,9 @@ void context_tracking_user_exit(void) | |||
151 | { | 160 | { |
152 | unsigned long flags; | 161 | unsigned long flags; |
153 | 162 | ||
163 | if (!static_key_false(&context_tracking_enabled)) | ||
164 | return; | ||
165 | |||
154 | if (in_interrupt()) | 166 | if (in_interrupt()) |
155 | return; | 167 | return; |
156 | 168 | ||