Skip to contentSkip to conversation

arm64: dts: broadcom: bcm2712: Remove non-functional EL2 virtual timer

PATCH Superseded Daniel Drake 4 participants 10 messages Jun 19 – Jul 13

Subsystems (4)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm64: dts: broadcom: bcm2712: Remove non-functional EL2 virtual timer

Commit d87773de9efe1 ("clocksource/drivers/arm_arch_timer: Default to EL2 virtual timer when running VHE") causes boot to hang on Raspberry Pi 5. The newly-selected EL2 virtual timer does not generate any interrupts, even though the GIC_DIST_ENABLE_SET flag has been confirmed set via readback.

The reasons for this failure are unknown, however it is likely that this timer was never tested. Raspberry Pi's original devicetree did not include this timer interrupt; it was only introduced via a suggestion[1] made in code review as part of the upstreaming process. (Current RPi firmware versions do include this timer, but only because they rebased on top of the upstreamed devicetree starting with Linux 6.12)

Until more is known about this non-firing timer interrupt, remove the devicetree entry to enable RPi5 devices to boot.

[1] https://lore.kernel.org/all/[email protected]/

---
 arch/arm64/boot/dts/broadcom/bcm2712.dtsi | 2 --
 1 file changed, 2 deletions(-)
arch/arm64/boot/dts/broadcom/bcm2712.dtsi +0 -2
index 761c59d90ffc..09ff5e9959d3 100644
@@ -678,8 +678,6 @@ IRQ_TYPE_LEVEL_LOW)>,
 			     <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(4) |
 					  IRQ_TYPE_LEVEL_LOW)>,
 			     <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(4) |
-					  IRQ_TYPE_LEVEL_LOW)>,
-			     <GIC_PPI 12 (GIC_CPU_MASK_SIMPLE(4) |
 					  IRQ_TYPE_LEVEL_LOW)>;
 	};
 
Signature · 1 line
2.54.0
Tested-by on v1 1/1
#1 lore raw
Quoted 14 lines · Daniel Drake

Commit d87773de9efe1 ("clocksource/drivers/arm_arch_timer: Default to EL2 virtual timer when running VHE") causes boot to hang on Raspberry Pi 5. The newly-selected EL2 virtual timer does not generate any interrupts, even though the GIC_DIST_ENABLE_SET flag has been confirmed set via readback.

The reasons for this failure are unknown, however it is likely that this timer was never tested. Raspberry Pi's original devicetree did not include this timer interrupt; it was only introduced via a suggestion[1] made in code review as part of the upstreaming process. (Current RPi firmware versions do include this timer, but only because they rebased on top of the upstreamed devicetree starting with Linux 6.12)

Quoted 8 lines

Until more is known about this non-firing timer interrupt, remove the devicetree entry to enable RPi5 devices to boot.

[1] https://lore.kernel.org/all/[email protected]/

Quoted 9 lines
---
 arch/arm64/boot/dts/broadcom/bcm2712.dtsi | 2 --
 1 file changed, 2 deletions(-)
arch/arm64/boot/dts/broadcom/bcm2712.dtsi +0 -0
index 761c59d90ffc..09ff5e9959d3 100644

arch/arm64/boot/dts/broadcom/bcm2712.dtsi IRQ_TYPE_LEVEL_LOW)>, · line 683

Quoted 8 lines
arch/arm64/boot/dts/broadcom/bcm2712.dtsi +0 -2
@@ -678,8 +678,6 @@ IRQ_TYPE_LEVEL_LOW)>,
 			     <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(4) |
 					  IRQ_TYPE_LEVEL_LOW)>,
 			     <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(4) |
-					  IRQ_TYPE_LEVEL_LOW)>,
-			     <GIC_PPI 12 (GIC_CPU_MASK_SIMPLE(4) |
 					  IRQ_TYPE_LEVEL_LOW)>;
 	};
 

Best regards

Signature · 2 lines
Marek Szyprowski, PhD
Samsung R&D Institute Poland
maintainer
#2 lore raw
In reply to Daniel Drake

Hi Daniel,

Thanks for posting this.

Quoted 9 lines · Daniel Drake

Commit d87773de9efe1 ("clocksource/drivers/arm_arch_timer: Default to EL2 virtual timer when running VHE") causes boot to hang on Raspberry Pi 5. The newly-selected EL2 virtual timer does not generate any interrupts, even though the GIC_DIST_ENABLE_SET flag has been confirmed set via readback.

The reasons for this failure are unknown, however it is likely that this timer was never tested. Raspberry Pi's original devicetree did

The timer is part of the CPU, and there are enough A76 implementations around to prove that it actually works. The same can be said for the GIC400 this is (supposedly) attached to.

Quoted 8 lines

not include this timer interrupt; it was only introduced via a suggestion[1] made in code review as part of the upstreaming process. (Current RPi firmware versions do include this timer, but only because they rebased on top of the upstreamed devicetree starting with Linux 6.12)

Until more is known about this non-firing timer interrupt, remove the devicetree entry to enable RPi5 devices to boot.

I'd like to understand the reason why the timer interrupt isn't being delivered *before* we paper over it, and not the other way around. Each of the CPUs definitely have an EL2 virtual timer, the GIC has a per-CPU interrupt, but somehow the two don't seem to be linked.

Since DT is supposed to describe the HW, I'd expect someone from Broadcom or RPi to shine a light on this issue. Integration mistakes happen, and we work around them (see the handful of Samsung SoCs where the timer interrupt was simply not wired). But we absolutely need to know what we are dealing with beforehand.

Finally, just hacking the DT is not enough. Assuming that the timer is indeed unusable, we need to cope with the fact that there are DTs describing it in the wild, as nobody should be forced to upgrade their DT in lockstep with the kernel. For that, you'd also need something like the patch below (untested, and in need of a proper commit message, which I expect the SoC vendor to provide).

Thanks,

	M.

From 9de354b472e28112d73fdb63be986f68fb3c91a9 Mon Sep 17 00:00:00 2001
From: Marc Zyngier <[email protected]>
Date: Sat, 20 Jun 2026 09:32:09 +0100
Subject: [PATCH] clocksource/drivers/arm_arch_timer: Workaround RPi5 broken
EL2 virtual timer

Insert $REASON here.

---
 drivers/clocksource/arm_arch_timer.c | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)
drivers/clocksource/arm_arch_timer.c +12 -1
index 4adf756423de9..de9007a30a923 100644
@@ -1090,6 +1090,16 @@ 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 = {
+		"brcm,bcm2712",
+		NULL
+	};
+
+	return of_machine_compatible_match(broken_el2_vtimer);
+}
+
 /**
  * arch_timer_select_ppi() - Select suitable PPI for the current system.
  *
@@ -1115,7 +1125,8 @@ 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 (arch_timer_ppi[ARCH_TIMER_HYP_VIRT_PPI])
+		if (arch_timer_ppi[ARCH_TIMER_HYP_VIRT_PPI] &&
+		    !has_broken_el2_vtimer())
 			return ARCH_TIMER_HYP_VIRT_PPI;
 
 		pr_warn_once(FW_BUG "VHE-capable CPU without EL2 virtual timer interrupt\n");
Signature · 5 lines
2.47.3


-- 
Jazz isn't dead. It just smells funny.
maintainer
#3 lore raw
Quoted 39 lines · Marc Zyngier

Hi Daniel,

Thanks for posting this.

Quoted 9 lines · Daniel Drake

Commit d87773de9efe1 ("clocksource/drivers/arm_arch_timer: Default to EL2 virtual timer when running VHE") causes boot to hang on Raspberry Pi 5. The newly-selected EL2 virtual timer does not generate any interrupts, even though the GIC_DIST_ENABLE_SET flag has been confirmed set via readback.

The reasons for this failure are unknown, however it is likely that this timer was never tested. Raspberry Pi's original devicetree did

The timer is part of the CPU, and there are enough A76 implementations around to prove that it actually works. The same can be said for the GIC400 this is (supposedly) attached to.

Quoted 8 lines
Quoted 1 line

not include this timer interrupt; it was only introduced via a

suggestion[1] made in code review as part of the upstreaming process. (Current RPi firmware versions do include this timer, but only because they rebased on top of the upstreamed devicetree starting with Linux 6.12)

Until more is known about this non-firing timer interrupt, remove the devicetree entry to enable RPi5 devices to boot.

I'd like to understand the reason why the timer interrupt isn't being delivered *before* we paper over it, and not the other way around. Each of the CPUs definitely have an EL2 virtual timer, the GIC has a per-CPU interrupt, but somehow the two don't seem to be linked.

Since DT is supposed to describe the HW, I'd expect someone from Broadcom or RPi to shine a light on this issue. Integration mistakes happen, and we work around them (see the handful of Samsung SoCs where the timer interrupt was simply not wired). But we absolutely need to know what we are dealing with beforehand.

Quoted 6 lines

Finally, just hacking the DT is not enough. Assuming that the timer is indeed unusable, we need to cope with the fact that there are DTs describing it in the wild, as nobody should be forced to upgrade their DT in lockstep with the kernel. For that, you'd also need something like the patch below (untested, and in need of a proper commit message, which I expect the SoC vendor to provide).

Daniel, do you happen to know which 2712 SoC revision you have, whether this is a C0 or D0 stepping?

We have an internal bug tracker item pertaining exactly to the virtual timer interrupt connection however it affected a sister chip (77122) and not 2712 AFAICT, now checking with the design team whether the same happened on 2712.

Thanks!

Signature · 1 line
Florian
#4 lore raw
Quoted 3 lines · Florian Fainelli

Daniel, do you happen to know which 2712 SoC revision you have, whether this is a C0 or D0 stepping?

We have an internal bug tracker item pertaining exactly to the virtual timer interrupt connection however it affected a sister chip (77122) and not 2712 AFAICT, now checking with the design team whether the same happened on 2712.

Thanks for looking into this! I am using Raspberry Pi 500 with D0 stepping.

Daniel

#5 lore raw
Quoted 6 lines · Daniel Drake
Quoted 3 lines · Florian Fainelli

Daniel, do you happen to know which 2712 SoC revision you have, whether this is a C0 or D0 stepping?

We have an internal bug tracker item pertaining exactly to the virtual timer interrupt connection however it affected a sister chip (77122) and not 2712 AFAICT, now checking with the design team whether the same happened on 2712.

Thanks for looking into this! I am using Raspberry Pi 500 with D0 stepping.

Here it happens on one of the first shipped Raspberry Pi5, so probably C0 stepping.

Best regards

Signature · 2 lines
Marek Szyprowski, PhD
Samsung R&D Institute Poland
#6 lore raw
In reply to Florian Fainelli

Hi Florian,

Quoted 1 line · Florian Fainelli

We have an internal bug tracker item pertaining exactly to the virtual timer interrupt connection however it affected a sister chip (77122) and not 2712 AFAICT, now checking with the design team whether the same happened on 2712.

Did you receive any update on this for 2712?

Thanks!
Daniel

maintainer
#7 lore raw
Quoted 5 lines · Daniel Drake

Hi Florian,

Quoted 1 line · Florian Fainelli

We have an internal bug tracker item pertaining exactly to the virtual timer interrupt connection however it affected a sister chip (77122) and not 2712 AFAICT, now checking with the design team whether the same happened on 2712.

Did you receive any update on this for 2712?

Not yet, no.

Signature · 1 line
Florian
maintainer
#8 lore raw
Quoted 6 lines · Florian Fainelli
Quoted 2 lines · Daniel Drake

Hi Florian,

Quoted 8 lines
Quoted 6 lines · Florian Fainelli
Quoted 4 lines

We have an internal bug tracker item pertaining exactly to the virtual timer interrupt connection however it affected a sister chip (77122) and not 2712 AFAICT, now checking with the design team whether the same happened on 2712.

Did you receive any update on this for 2712?

Not yet, no.

I've posted this:

https://lore.kernel.org/all/[email protected]/

as we can't leave users with non-functional HW much longer.

	M.
Signature · 1 line
Jazz isn't dead. It just smells funny.
maintainer
#9 lore raw
In reply to Daniel Drake
Quoted 14 lines · Daniel Drake

Commit d87773de9efe1 ("clocksource/drivers/arm_arch_timer: Default to EL2 virtual timer when running VHE") causes boot to hang on Raspberry Pi 5. The newly-selected EL2 virtual timer does not generate any interrupts, even though the GIC_DIST_ENABLE_SET flag has been confirmed set via readback.

The reasons for this failure are unknown, however it is likely that this timer was never tested. Raspberry Pi's original devicetree did not include this timer interrupt; it was only introduced via a suggestion[1] made in code review as part of the upstreaming process. (Current RPi firmware versions do include this timer, but only because they rebased on top of the upstreamed devicetree starting with Linux 6.12)

Quoted 8 lines

Until more is known about this non-firing timer interrupt, remove the devicetree entry to enable RPi5 devices to boot.

[1] https://lore.kernel.org/all/[email protected]/

We know why now: the interrupt line was never connected in the first place as this was not identified as being a requirement *sigh*.

Can you amend your patch with that detail, re-submit and add a:

Fixes faa3381267d0 ("arm64: dts: broadcom: Add minimal support for Raspberry Pi 5")

Thank you Daniel!

Signature · 1 line
Florian