Skip to content

Detect and handle I-cache aliases when D-cache is non-aliasing

Will Deacon linux-arm-kernel 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2ARM: setup: detect aliasing I-cache when D-cache is non-aliasingarch/arm/include/asm/cachetype.h arch/arm/kernel/setup.c+41 -50 replies
2/2ARM: flush_ptrace_access: invalidate correct I-cache aliasarch/arm/mm/flush.c+20 -30 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] Detect and handle I-cache aliases when D-cache is non-aliasing

Last month, I posted some patches to fix ptrace software breakpoints:

http://lists.infradead.org/pipermail/linux-arm-kernel/2010-July/020649.html

One of these patches added a workaround for a hardware erratum, so I have submitted that to the patch system. The other patch simply called __flush_icache_all() in flush_ptrace_access to avoid having to worry about I-cache aliases when cache_is_vipt_nonaliasing() is true. This isn't ideal if the debugger decides to insert lots of software breakpoints sequentially (for example, when single-stepping a number of times).

These two patches add proper identification of aliasing I-caches when the D-cache is nonaliasing. flush_ptrace_access can then flush only the relevant I-cache lines instead of the entire cache.

Cc Russell King - ARM Linux <[email protected]>
Cc Catalin Marinas <[email protected]>

Will Deacon (2):
ARM: setup: detect aliasing I-cache when D-cache is non-aliasing
ARM: flush_ptrace_access: invalidate correct I-cache alias

 arch/arm/include/asm/cachetype.h |    8 ++++++--
 arch/arm/kernel/setup.c          |   38 +++++++++++++++++++++++++++++++++++---
 arch/arm/mm/flush.c              |   23 ++++++++++++++++++++---
 3 files changed, 61 insertions(+), 8 deletions(-)