Merge "arm64: mm: Log the process id in the rtb"

This commit is contained in:
Linux Build Service Account 2016-10-18 03:24:42 -07:00 committed by Gerrit - the friendly Code Review server
commit 02821f198d

View file

@ -27,19 +27,24 @@
#include <asm-generic/mm_hooks.h> #include <asm-generic/mm_hooks.h>
#include <asm/cputype.h> #include <asm/cputype.h>
#include <asm/pgtable.h> #include <asm/pgtable.h>
#include <linux/msm_rtb.h>
#ifdef CONFIG_PID_IN_CONTEXTIDR #ifdef CONFIG_PID_IN_CONTEXTIDR
static inline void contextidr_thread_switch(struct task_struct *next) static inline void contextidr_thread_switch(struct task_struct *next)
{ {
pid_t pid = task_pid_nr(next);
asm( asm(
" msr contextidr_el1, %0\n" " msr contextidr_el1, %0\n"
" isb" " isb"
: :
: "r" (task_pid_nr(next))); : "r" (pid));
uncached_logk(LOGK_CTXID, (void *)(u64)pid);
} }
#else #else
static inline void contextidr_thread_switch(struct task_struct *next) static inline void contextidr_thread_switch(struct task_struct *next)
{ {
uncached_logk(LOGK_CTXID, (void *)(u64)task_pid_nr(next));
} }
#endif #endif