[PATCH] clocksource/drivers/arm_arch_timer: Mark EL2 virtual timer broken for Tegra194/234
From: Jon Hunter
Date: Wed Jul 22 2026 - 09:04:13 EST
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@xxxxxxxxxx>
Signed-off-by: Jon Hunter <jonathanh@xxxxxxxxxx>
---
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