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

Commit 1ad7cba0 authored by Greg Hackmann's avatar Greg Hackmann Committed by Gerrit - the friendly Code Review server
Browse files

arm64: issue isb when trapping CNTVCT_EL0 access



Change-Id: I6005a6e944494257bfc2243fde2f7a09c3fd76c6
Signed-off-by: default avatarNeeraj Upadhyay <neeraju@codeaurora.org>
parent 3158d448
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -32,6 +32,7 @@
#include <linux/syscalls.h>

#include <asm/atomic.h>
#include <asm/barrier.h>
#include <asm/debug-monitors.h>
#include <asm/esr.h>
#include <asm/traps.h>
@@ -403,6 +404,7 @@ static void cntvct_read_handler(unsigned int esr, struct pt_regs *regs)
{
	int rt = (esr & ESR_ELx_SYS64_ISS_RT_MASK) >> ESR_ELx_SYS64_ISS_RT_SHIFT;

	isb();
	if (rt != 31)
		regs->regs[rt] = arch_counter_get_cntvct();
	regs->pc += 4;