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

Commit f5613a0a authored by Greg Hackmann's avatar Greg Hackmann Committed by Greg Kroah-Hartman
Browse files

clocksource: arch_timer: make virtual counter access configurable



Change-Id: Ibdb1fd768b748002b90bfc165612c12c8311f8a2
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent e07b57a9
Loading
Loading
Loading
Loading
+8 −0
Original line number Original line Diff line number Diff line
@@ -110,6 +110,14 @@ config ARM_ARCH_TIMER_EVTSTREAM
	  This must be disabled for hardware validation purposes to detect any
	  This must be disabled for hardware validation purposes to detect any
	  hardware anomalies of missing events.
	  hardware anomalies of missing events.


config ARM_ARCH_TIMER_VCT_ACCESS
	bool "Support for ARM architected timer virtual counter access in userspace"
	default !ARM64
	depends on ARM_ARCH_TIMER
	help
	  This option enables support for reading the ARM architected timer's
	  virtual counter in userspace.

config ARM_GLOBAL_TIMER
config ARM_GLOBAL_TIMER
	bool
	bool
	select CLKSRC_OF if OF
	select CLKSRC_OF if OF
+4 −1
Original line number Original line Diff line number Diff line
@@ -339,7 +339,10 @@ static void arch_counter_set_user_access(void)
			| ARCH_TIMER_USR_PCT_ACCESS_EN);
			| ARCH_TIMER_USR_PCT_ACCESS_EN);


	/* Enable user access to the virtual counter */
	/* Enable user access to the virtual counter */
	if (IS_ENABLED(CONFIG_ARM_ARCH_TIMER_VCT_ACCESS))
		cntkctl |= ARCH_TIMER_USR_VCT_ACCESS_EN;
		cntkctl |= ARCH_TIMER_USR_VCT_ACCESS_EN;
	else
		cntkctl &= ~ARCH_TIMER_USR_VCT_ACCESS_EN;


	arch_timer_set_cntkctl(cntkctl);
	arch_timer_set_cntkctl(cntkctl);
}
}