Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] clocksource/drivers/arm_arch_timer: Mark EL2 virtual timer broken for Tegra194/234
@ 2026-07-22 12:56 Jon Hunter
  2026-07-22 13:42 ` Sudeep Holla
  0 siblings, 1 reply; 2+ messages in thread
From: Jon Hunter @ 2026-07-22 12:56 UTC (permalink / raw)
  To: Mark Rutland, Marc Zyngier, Daniel Lezcano, Thomas Gleixner
  Cc: linux-arm-kernel, linux-kernel, linux-tegra, Jon Hunter

The following warning is being observed on Tegra194 and Tegra234
platforms ...

 arch_timer: [Firmware Bug]: VHE-capable CPU without EL2 virtual timer
  interrupt

Adding the missing EL2 virtual timer in device-tree for Tegra194 and
Tegra234 is causing boot issues for both devices.

The Tegra194 device includes a GIC-400 which defines PPIs for sec-phys,
phys, virt and hyp-phys timer interrupts (per the dt-binding
arm,arch_timer.yaml) but there is no PPI hyp-virt (EL2 virtual) timer
and hence this is not supported for this device.

The Tegra234 device does have a PPI for the EL2 virtual timer, but
during CPU idle transitions into low-power states this timer is not
preserved currently by firmware and hence causes boot issues when CPU
idle is enabled.

Avoid the warning for Tegra194 and Tegra234 devices by marking the EL2
virtual timer as broken.

Suggested-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
---
 drivers/clocksource/arm_arch_timer.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/drivers/clocksource/arm_arch_timer.c b/drivers/clocksource/arm_arch_timer.c
index 4adf756423de..b9ccb560ff8f 100644
--- a/drivers/clocksource/arm_arch_timer.c
+++ b/drivers/clocksource/arm_arch_timer.c
@@ -1090,6 +1090,17 @@ static int __init arch_timer_common_init(void)
 	return arch_timer_arch_init();
 }
 
+static bool __init has_broken_el2_vtimer(void)
+{
+	static const char * const broken_el2_vtimer[] __initconst = {
+		"nvidia,tegra194",
+		"nvidia,tegra234",
+		NULL
+	};
+
+	return of_machine_compatible_match(broken_el2_vtimer);
+}
+
 /**
  * arch_timer_select_ppi() - Select suitable PPI for the current system.
  *
@@ -1115,6 +1126,9 @@ static int __init arch_timer_common_init(void)
 static enum arch_timer_ppi_nr __init arch_timer_select_ppi(void)
 {
 	if (is_kernel_in_hyp_mode()) {
+		if (has_broken_el2_vtimer())
+			return ARCH_TIMER_HYP_PPI;
+
 		if (arch_timer_ppi[ARCH_TIMER_HYP_VIRT_PPI])
 			return ARCH_TIMER_HYP_VIRT_PPI;
 
-- 
2.43.0



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-07-22 13:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-22 12:56 [PATCH] clocksource/drivers/arm_arch_timer: Mark EL2 virtual timer broken for Tegra194/234 Jon Hunter
2026-07-22 13:42 ` Sudeep Holla

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox