Change-Id: I9ace6222750954e43b4b57d049bb74645fb06424
Signed-off-by: David Ng <dave@codeaurora.org>
(cherry picked from commit 76c5892fc1fa36e4e5ebabd2c4e0f10593233b62)
Conflicts:
arch/arm/mm/proc-v7.S
This patch introduces a new Kconfig option which, when enabled, causes
the kernel to write the PID of the current task into the PROCID field
of the CONTEXTIDR on context switch. This is useful when analysing
hardware trace, since writes to this register can be configured to emit
an event into the trace stream.
The thread notifier for writing the PID is deliberately kept separate
from the ASID code, so that we can easily support newer processors (A15
onwards) which store the ASID in TTBR0. As such, the switch_mm code is
updated to perform a read-modify-write sequence to ensure that we don't
clobber the PID on older CPUs.
Change-Id: I7236834cf4b5e984c9d9f24ba6b872078c2b936f
Cc: Wolfgang Betz <wolfgang.betz@st.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Jeff Ohlstein <johlstei@codeaurora.org>
(cherry picked from commit a7a6f92544c19adcdad5c1a4ad47754be1cbb698)
Conflicts:
arch/arm/mm/context.c
arch/arm/mm/proc-v7.S
This patch modifies the proc-v7.S file so that it only contains code
shared between classic MMU and LPAE. The non-common code is factored out
into a separate file.
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>