diff options
author | Jon Medhurst <tixy@linaro.org> | 2012-11-27 15:29:55 +0000 |
---|---|---|
committer | Andrey Konovalov <andrey.konovalov@linaro.org> | 2013-01-11 21:50:38 +0400 |
commit | 4a3540ede442907c8024ecd9e23df42c505ae3bc (patch) | |
tree | 513a43efd433d3494ba78a8538776505b286a9ee /drivers/usb/host/ehci.h | |
parent | 3ecbd243ccdf2fd949dbcf4a4ef6541c6c0dcb80 (diff) |
ARM: ftrace: Ensure code modifications are synchronised across all cpus
When the generic ftrace implementation modifies code for trace-points it
uses stop_machine() to call ftrace_modify_all_code() on one CPU. This
ultimately calls the ARM specific function ftrace_modify_code() which
updates the instruction and then does flush_icache_range(). As this
cache flushing only operates on the local CPU then other cores may end
up execute the old instruction if it's still in their icaches.
This may or may not cause problems for the use of ftrace on kernels
compiled for ARM instructions. However, Thumb2 instructions can straddle
two cache lines so its possible for half the old instruction to be in
the cache and half the new one, leading the the CPU executing garbage.
This patch fixes this situation by providing and arch specific
implementation of arch_ftrace_update_code() which ensures that after one
core has modified all the code, the other cores invalidate their icaches
before continuing.
Signed-off-by: Jon Medhurst <tixy@linaro.org>
Diffstat (limited to 'drivers/usb/host/ehci.h')
0 files changed, 0 insertions, 0 deletions