* [PATCH] clocksource/drivers/arm_arch_timer: Workaround bcm2712 broken EL2 virtual timer
@ 2026-07-10 8:09 Marc Zyngier
2026-07-13 16:15 ` Florian Fainelli
0 siblings, 1 reply; 4+ messages in thread
From: Marc Zyngier @ 2026-07-10 8:09 UTC (permalink / raw)
To: linux-kernel, linux-arm-kernel
Cc: John, Daniel Drake, Marek Szyprowski, Florian Fainelli,
Daniel Lezcano, Thomas Gleixner, Mark Rutland
It appears that the bcm2712 SoC found in the relatively popular
RPi5 has a broken EL2 virtual timer.
We do not know the reason why the timer isn't working (the timer
is ticking, but the interrupt never fires), and the SoC vendor
doesn't communicate on the reason why this isn't working, leaving
users and maintainers in the dark.
Paper over the issue by detecting the broken HW, falling back to
the physical timer instead, and let the user know about it.
Also taint the kernel as the machine is definitely not compliant
with the spec, and we don't know what else is wrong with it.
Reported-by: John <therealgraysky@proton.me>
Reported-by: Daniel Drake <dan@reactivated.net>
Reported-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Cc: Florian Fainelli <florian.fainelli@broadcom.com>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Mark Rutland <mark.rutland@arm.com>
---
drivers/clocksource/arm_arch_timer.c | 24 +++++++++++++++++++++++-
1 file changed, 23 insertions(+), 1 deletion(-)
diff --git a/drivers/clocksource/arm_arch_timer.c b/drivers/clocksource/arm_arch_timer.c
index 4adf756423de9..7b4a98df6962b 100644
--- a/drivers/clocksource/arm_arch_timer.c
+++ b/drivers/clocksource/arm_arch_timer.c
@@ -1090,6 +1090,27 @@ static int __init arch_timer_common_init(void)
return arch_timer_arch_init();
}
+static bool __init has_broken_el2_vtimer(void)
+{
+ /*
+ * SoCs described here have been found to be broken, though no
+ * explanation has been volunteered by the vendor. Let the user know
+ * we're papering over the vendor's lack of communication.
+ */
+ static const char * const broken_el2_vtimer[] __initconst = {
+ "brcm,bcm2712",
+ NULL
+ };
+
+ if (of_machine_compatible_match(broken_el2_vtimer)) {
+ add_taint(TAINT_CPU_OUT_OF_SPEC, LOCKDEP_STILL_OK);
+ pr_warn_once(HW_ERR "Known broken EL2 virtual timer, ignoring it\n");
+ return true;
+ }
+
+ return false;
+}
+
/**
* arch_timer_select_ppi() - Select suitable PPI for the current system.
*
@@ -1115,7 +1136,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");
--
2.47.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] clocksource/drivers/arm_arch_timer: Workaround bcm2712 broken EL2 virtual timer
2026-07-10 8:09 [PATCH] clocksource/drivers/arm_arch_timer: Workaround bcm2712 broken EL2 virtual timer Marc Zyngier
@ 2026-07-13 16:15 ` Florian Fainelli
2026-07-13 20:23 ` Marc Zyngier
0 siblings, 1 reply; 4+ messages in thread
From: Florian Fainelli @ 2026-07-13 16:15 UTC (permalink / raw)
To: Marc Zyngier, linux-kernel, linux-arm-kernel
Cc: John, Daniel Drake, Marek Szyprowski, Daniel Lezcano,
Thomas Gleixner, Mark Rutland
On 7/10/26 01:09, Marc Zyngier wrote:
> It appears that the bcm2712 SoC found in the relatively popular
> RPi5 has a broken EL2 virtual timer.
>
> We do not know the reason why the timer isn't working (the timer
> is ticking, but the interrupt never fires), and the SoC vendor
> doesn't communicate on the reason why this isn't working, leaving
> users and maintainers in the dark.
>
> Paper over the issue by detecting the broken HW, falling back to
> the physical timer instead, and let the user know about it.
> Also taint the kernel as the machine is definitely not compliant
> with the spec, and we don't know what else is wrong with it.
>
> Reported-by: John <therealgraysky@proton.me>
> Reported-by: Daniel Drake <dan@reactivated.net>
> Reported-by: Marek Szyprowski <m.szyprowski@samsung.com>
> Signed-off-by: Marc Zyngier <maz@kernel.org>
> Cc: Florian Fainelli <florian.fainelli@broadcom.com>
> Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Mark Rutland <mark.rutland@arm.com>
Acked-by: Florian Fainelli <florian.fainelli@broadcom.com>
We know why now: the virtual interrupt timer line was never connected in
the first place because it was not clarified that it was a requirement.
I will also take the DTS patch through the Broadcom ARM SoC tree.
Thanks!
--
Florian
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] clocksource/drivers/arm_arch_timer: Workaround bcm2712 broken EL2 virtual timer
2026-07-13 16:15 ` Florian Fainelli
@ 2026-07-13 20:23 ` Marc Zyngier
2026-07-13 22:38 ` Florian Fainelli
0 siblings, 1 reply; 4+ messages in thread
From: Marc Zyngier @ 2026-07-13 20:23 UTC (permalink / raw)
To: Florian Fainelli
Cc: linux-kernel, linux-arm-kernel, John, Daniel Drake,
Marek Szyprowski, Daniel Lezcano, Thomas Gleixner, Mark Rutland
On Mon, 13 Jul 2026 17:15:35 +0100,
Florian Fainelli <florian.fainelli@broadcom.com> wrote:
>
> On 7/10/26 01:09, Marc Zyngier wrote:
> > It appears that the bcm2712 SoC found in the relatively popular
> > RPi5 has a broken EL2 virtual timer.
> >
> > We do not know the reason why the timer isn't working (the timer
> > is ticking, but the interrupt never fires), and the SoC vendor
> > doesn't communicate on the reason why this isn't working, leaving
> > users and maintainers in the dark.
> >
> > Paper over the issue by detecting the broken HW, falling back to
> > the physical timer instead, and let the user know about it.
> > Also taint the kernel as the machine is definitely not compliant
> > with the spec, and we don't know what else is wrong with it.
> >
> > Reported-by: John <therealgraysky@proton.me>
> > Reported-by: Daniel Drake <dan@reactivated.net>
> > Reported-by: Marek Szyprowski <m.szyprowski@samsung.com>
> > Signed-off-by: Marc Zyngier <maz@kernel.org>
> > Cc: Florian Fainelli <florian.fainelli@broadcom.com>
> > Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
> > Cc: Thomas Gleixner <tglx@linutronix.de>
> > Cc: Mark Rutland <mark.rutland@arm.com>
>
> Acked-by: Florian Fainelli <florian.fainelli@broadcom.com>
>
> We know why now: the virtual interrupt timer line was never connected
> in the first place because it was not clarified that it was a
> requirement.
Dangling wires coming out of the CPUs don't ring any alarm bell at
integration time? Amazing. Makes you wonder what else they forgot to
connect...
Is there an erratum number that we can refer to for documentation
purposes?
M.
--
Jazz isn't dead. It just smells funny.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] clocksource/drivers/arm_arch_timer: Workaround bcm2712 broken EL2 virtual timer
2026-07-13 20:23 ` Marc Zyngier
@ 2026-07-13 22:38 ` Florian Fainelli
0 siblings, 0 replies; 4+ messages in thread
From: Florian Fainelli @ 2026-07-13 22:38 UTC (permalink / raw)
To: Marc Zyngier
Cc: linux-kernel, linux-arm-kernel, John, Daniel Drake,
Marek Szyprowski, Daniel Lezcano, Thomas Gleixner, Mark Rutland
On 7/13/26 13:23, Marc Zyngier wrote:
> On Mon, 13 Jul 2026 17:15:35 +0100,
> Florian Fainelli <florian.fainelli@broadcom.com> wrote:
>>
>> On 7/10/26 01:09, Marc Zyngier wrote:
>>> It appears that the bcm2712 SoC found in the relatively popular
>>> RPi5 has a broken EL2 virtual timer.
>>>
>>> We do not know the reason why the timer isn't working (the timer
>>> is ticking, but the interrupt never fires), and the SoC vendor
>>> doesn't communicate on the reason why this isn't working, leaving
>>> users and maintainers in the dark.
>>>
>>> Paper over the issue by detecting the broken HW, falling back to
>>> the physical timer instead, and let the user know about it.
>>> Also taint the kernel as the machine is definitely not compliant
>>> with the spec, and we don't know what else is wrong with it.
>>>
>>> Reported-by: John <therealgraysky@proton.me>
>>> Reported-by: Daniel Drake <dan@reactivated.net>
>>> Reported-by: Marek Szyprowski <m.szyprowski@samsung.com>
>>> Signed-off-by: Marc Zyngier <maz@kernel.org>
>>> Cc: Florian Fainelli <florian.fainelli@broadcom.com>
>>> Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
>>> Cc: Thomas Gleixner <tglx@linutronix.de>
>>> Cc: Mark Rutland <mark.rutland@arm.com>
>>
>> Acked-by: Florian Fainelli <florian.fainelli@broadcom.com>
>>
>> We know why now: the virtual interrupt timer line was never connected
>> in the first place because it was not clarified that it was a
>> requirement.
>
> Dangling wires coming out of the CPUs don't ring any alarm bell at
> integration time? Amazing. Makes you wonder what else they forgot to
> connect...
>
> Is there an erratum number that we can refer to for documentation
> purposes?
There is not one, we only have an internal bug tracker entry for this issue.
--
Florian
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-07-13 22:39 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-10 8:09 [PATCH] clocksource/drivers/arm_arch_timer: Workaround bcm2712 broken EL2 virtual timer Marc Zyngier
2026-07-13 16:15 ` Florian Fainelli
2026-07-13 20:23 ` Marc Zyngier
2026-07-13 22:38 ` Florian Fainelli
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.