[PATCH] ARM: mm: update CONTEXTIDR register to contain PID of current process
Catalin Marinas
catalin.marinas at arm.com
Tue Nov 8 17:36:18 EST 2011
On 8 November 2011 15:00, Will Deacon <will.deacon at arm.com> wrote:
> 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.
>
> Cc: Wolfgang Betz <wolfgang.betz at st.com>
> Signed-off-by: Will Deacon <will.deacon at arm.com>
Looks fine to me.
Reviewed-by: Catalin Marinas <catalin.marinas at arm.com>
More information about the linux-arm-kernel
mailing list