Skip to content

RFC Add Thread Support for the Context ID Register of ARM v6 & v7 Architectures

Wolfgang BETZ linux-arm-kernel 4 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 RFC Latest1 patch 0 repliesNew
  2. v3 RFC1 patch 0 repliesSuperseded
  3. v21 patch 0 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v11 patch0 repliesSuperseded

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/1Add Thread Support for the Context ID Register of ARM v6 & v7 Architecturesarch/arm/Kconfig.debug arch/arm/include/asm/mmu_context.h arch/arm/include/asm/proc-fns.h +4 more+117 -201 reply

Reviews trailers per patch

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

Read the v4 thread

Cover letter [RFC][PATCH 0/1 v4] Add Thread Support for the Context ID Register of ARM v6 & v7 Architectures

From: Wolfgang Betz <[email protected]>

The Context ID Register, CONTEXTIDR, identifies the current:
- Process Identifier (PROCID) &
- Address Space Identifier (ASID).

The value of the whole of this register is called the Context ID and is used by:
- the ARM debug logic, for Linked and Unlinked Context ID matching (e.g. for breakpoint debug and watchpoint debug events).
- the trace logic, to identify the current process.

The CONTEXTIDR is a 32-bit read/write register whose format is:
- PROCID, bits [31:8]
Process Identifier. This field should be programmed with a unique value that identifies the current process and is used by the trace logic and the debug logic to identify the process that is running currently.
- ASID, bits [7:0]
Address Space Identifier. This field must be programmed with the value of the current ASID and is used by many memory management functions.

This change-set aims at:
- implementing thread tracing support based on the armv6 & v7 CONTEXTIDR register while leaving the Linux kernel ASID functionality (semantically) unchanged.
- focusing on compatibility with tracing tools such as Lauterbach's TRACE32 tool.
- the avoidance of platform specific calls in generic code.
- simplicity, readability, and good performances.
- being general: i.e. the change-set applies to all armv7/v6 platforms & is in general compilable for all (other) platforms.

The patch has been jointly developed by Lauterbach GmbH (http://www.lauterbach.com) and STMicroelectronics Srl (http://www.st.com/).
Main contributors are:
- Khaled Jmal <[email protected]>
- Rudi Dienstbeck <[email protected]>
- Wolfgang Betz <[email protected]>

Wolfgang Betz (1):
Add Thread Support for the Context ID Register of ARM v6 & v7
Architectures

 arch/arm/Kconfig.debug             |   13 +++++++
 arch/arm/include/asm/mmu_context.h |   63 +++++++++++++++++++++++++++++++----
 arch/arm/include/asm/proc-fns.h    |    9 ++---
 arch/arm/kernel/smp.c              |    2 +-
 arch/arm/mm/context.c              |   42 +++++++++++++++++++++++-
 arch/arm/mm/proc-v6.S              |    4 +-
 arch/arm/mm/proc-v7.S              |    4 +-
 7 files changed, 117 insertions(+), 20 deletions(-)
Signature · 1 line
1.7.6