Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b7b6e670 authored by Se Wang (Patrick) Oh's avatar Se Wang (Patrick) Oh Committed by Venkata Narendra Kumar Gutta
Browse files

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: default avatarSe Wang (Patrick) Oh <sewango@codeaurora.org>
Signed-off-by: default avatarVenkata Narendra Kumar Gutta <vnkgutta@codeaurora.org>
parent cbfb9620
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -34,14 +34,20 @@
#include <asm/pgtable.h>
#include <asm/sysreg.h>
#include <asm/tlbflush.h>
#include <linux/msm_rtb.h>

static inline void contextidr_thread_switch(struct task_struct *next)
{
	pid_t pid = task_pid_nr(next);

	if (!IS_ENABLED(CONFIG_PID_IN_CONTEXTIDR))
		return;

	write_sysreg(task_pid_nr(next), contextidr_el1);
	write_sysreg(pid, contextidr_el1);
	isb();

	uncached_logk(LOGK_CTXID, (void *)(u64)pid);

}

/*