diff options
| author | Se Wang (Patrick) Oh <sewango@codeaurora.org> | 2015-07-15 20:10:19 -0700 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2016-10-09 21:39:27 -0700 |
| commit | 448971ccea4486e2f54caf9b6cd784c9d470087a (patch) | |
| tree | 424ca3bc3287919df6c53bd4e791f59757426ead | |
| parent | 34b975e502ed8fa96b81ecf06734d1d51a258cd2 (diff) | |
arm64: mm: Log the process id in the rtb
Store the process id in the register trace buffer.
This gives a general idea about what process was last
running when the RTB stopped.
Change-Id: Idcbd8db9eb451f2d732c935f00b6c50f9af3c592
Signed-off-by: Se Wang (Patrick) Oh <sewango@codeaurora.org>
| -rw-r--r-- | arch/arm64/include/asm/mmu_context.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/arm64/include/asm/mmu_context.h b/arch/arm64/include/asm/mmu_context.h index 24165784b803..32441df2270e 100644 --- a/arch/arm64/include/asm/mmu_context.h +++ b/arch/arm64/include/asm/mmu_context.h @@ -27,19 +27,24 @@ #include <asm-generic/mm_hooks.h> #include <asm/cputype.h> #include <asm/pgtable.h> +#include <linux/msm_rtb.h> #ifdef CONFIG_PID_IN_CONTEXTIDR static inline void contextidr_thread_switch(struct task_struct *next) { + pid_t pid = task_pid_nr(next); asm( " msr contextidr_el1, %0\n" " isb" : - : "r" (task_pid_nr(next))); + : "r" (pid)); + uncached_logk(LOGK_CTXID, (void *)(u64)pid); + } #else static inline void contextidr_thread_switch(struct task_struct *next) { + uncached_logk(LOGK_CTXID, (void *)(u64)task_pid_nr(next)); } #endif |
