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

Commit cdd15826 authored by Neeraj Upadhyay's avatar Neeraj Upadhyay Committed by Kyle Yan
Browse files

clocksource: arch_timer: Disable user access to the physical counter



Disable user access to physical counter. This reverts
commit <aa7e324a>("clocksource: arch_timer: Enable
user access to the physical counter").

This could potentially break the userspace applications
using physical counters; but all those usages should
move to using virtual counter, to get the timing
information.

Change-Id: I653816a93515507a400ff23dbaa4442bf614a79b
Signed-off-by: default avatarNeeraj Upadhyay <neeraju@codeaurora.org>
Signed-off-by: default avatarKyle Yan <kyan@codeaurora.org>
parent 40c1b6f6
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -443,13 +443,12 @@ static void arch_counter_set_user_access(void)
{
	u32 cntkctl = arch_timer_get_cntkctl();

	/* Disable user access to the timers */
	/* Disable user access to the timers and the physical counter */
	/* Also disable virtual event stream */
	cntkctl &= ~(ARCH_TIMER_USR_PT_ACCESS_EN
			| ARCH_TIMER_USR_VT_ACCESS_EN
			| ARCH_TIMER_VIRT_EVT_EN);

	cntkctl |= ARCH_TIMER_USR_PCT_ACCESS_EN;
			| ARCH_TIMER_VIRT_EVT_EN
			| ARCH_TIMER_USR_PCT_ACCESS_EN);

	/* Enable user access to the virtual counter */
	if (IS_ENABLED(CONFIG_ARM_ARCH_TIMER_VCT_ACCESS))