diff options
author | Catalin Marinas <catalin.marinas@arm.com> | 2013-04-24 09:47:02 -0400 |
---|---|---|
committer | Catalin Marinas <catalin.marinas@arm.com> | 2013-04-25 12:45:48 -0400 |
commit | 5108c67c376b3ee59cc7fbe46eaba481eb3419aa (patch) | |
tree | 0f2515769d1ceecc8f55380aff228c54929275e1 /arch | |
parent | 4b3ea2e04d2b8b37c5bc472f710d706b42e4fa06 (diff) |
arm64: Execute DSB during thread switching for TLB/cache maintenance
The DSB following TLB or cache maintenance ops must be run on the same
CPU. With kernel preemption enabled or for user-space cache maintenance
this may not be the case. This patch adds an explicit DSB in the
__switch_to() function.
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm64/kernel/process.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/arm64/kernel/process.c b/arch/arm64/kernel/process.c index c2cc2493481b..116a60abe86f 100644 --- a/arch/arm64/kernel/process.c +++ b/arch/arm64/kernel/process.c | |||
@@ -313,6 +313,12 @@ struct task_struct *__switch_to(struct task_struct *prev, | |||
313 | hw_breakpoint_thread_switch(next); | 313 | hw_breakpoint_thread_switch(next); |
314 | contextidr_thread_switch(next); | 314 | contextidr_thread_switch(next); |
315 | 315 | ||
316 | /* | ||
317 | * Complete any pending TLB or cache maintenance on this CPU in case | ||
318 | * the thread migrates to a different CPU. | ||
319 | */ | ||
320 | dsb(); | ||
321 | |||
316 | /* the actual thread switch */ | 322 | /* the actual thread switch */ |
317 | last = cpu_switch_to(prev, next); | 323 | last = cpu_switch_to(prev, next); |
318 | 324 | ||