• W
    ARM: 7445/1: mm: update CONTEXTIDR register to contain PID of current process · 575320d6
    Will Deacon 提交于
    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-writing code so that we can support newer processors using
    LPAE, where the ASID is stored 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 CPUs using the classic 2-level page tables.
    Signed-off-by: NWill Deacon <will.deacon@arm.com>
    Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
    575320d6
proc-v7-2level.S 4.4 KB