clocksource/drivers/arm_arch_timer: Workaround bcm2712 broken EL2 virtual timer
Subsystems (3)
Marc Zyngier
maintainerPATCH 1/1 clocksource/drivers/arm_arch_timer: Workaround bcm2712 broken EL2 virtual timer
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.
--- drivers/clocksource/arm_arch_timer.c | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-)
drivers/clocksource/arm_arch_timer.c +23 -1
@@ -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" );
Signature · 1 line
2.47.3
Quoted 13 lines · Marc Zyngier
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.
Quoted 8 lines
Reported-by John <[email protected]>Reported-by Daniel Drake <[email protected]>Reported-by Marek Szyprowski <[email protected]>Signed-off-by Marc Zyngier <[email protected]>Cc Florian Fainelli <[email protected]>Cc Daniel Lezcano <[email protected]>Cc Thomas Gleixner <[email protected]>Cc Mark Rutland <[email protected]>
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!
Signature · 1 line
Florian
Marc Zyngier
maintainerQuoted 24 lines · Florian Fainelli
Quoted 13 lines · Marc Zyngier
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.
Quoted 8 lines
Reported-by John <[email protected]>Reported-by Daniel Drake <[email protected]>Reported-by Marek Szyprowski <[email protected]>Signed-off-by Marc Zyngier <[email protected]>Cc Florian Fainelli <[email protected]>Cc Daniel Lezcano <[email protected]>Cc Thomas Gleixner <[email protected]>Cc Mark Rutland <[email protected]>
Quoted 5 lines
Acked-by Florian Fainelli <[email protected]>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.
Signature · 1 line
Jazz isn't dead. It just smells funny.
Quoted 32 lines · Marc Zyngier
Quoted 24 lines · Florian Fainelli
Quoted 13 lines · Marc Zyngier
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.
Quoted 8 lines
Reported-by John <[email protected]>Reported-by Daniel Drake <[email protected]>Reported-by Marek Szyprowski <[email protected]>Signed-off-by Marc Zyngier <[email protected]>Cc Florian Fainelli <[email protected]>Cc Daniel Lezcano <[email protected]>Cc Thomas Gleixner <[email protected]>Cc Mark Rutland <[email protected]>Quoted 5 lines
Acked-by Florian Fainelli <[email protected]>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.
Quoted 6 lines
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.
Signature · 1 line
Florian
Quoted 13 lines · Marc Zyngier
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.
Quoted 8 lines
Reported-by John <[email protected]>Reported-by Daniel Drake <[email protected]>Reported-by Marek Szyprowski <[email protected]>Signed-off-by Marc Zyngier <[email protected]>Cc Florian Fainelli <[email protected]>Cc Daniel Lezcano <[email protected]>Cc Thomas Gleixner <[email protected]>Cc Mark Rutland <[email protected]>
Tested on my RPi 5 and this does make it boot again
Best,
Gary
Quoted 46 lines
--- drivers/clocksource/arm_arch_timer.c | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-)drivers/clocksource/arm_arch_timer.c +23
-1@@ -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" );
Jon Hunter
maintainerQuoted 38 lines · Marc Zyngier
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 <[email protected]>Reported-by Daniel Drake <[email protected]>Reported-by Marek Szyprowski <[email protected]>Signed-off-by Marc Zyngier <[email protected]>Cc Florian Fainelli <[email protected]>Cc Daniel Lezcano <[email protected]>Cc Thomas Gleixner <[email protected]>Cc Mark Rutland <[email protected]>--- drivers/clocksource/arm_arch_timer.c | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-)drivers/clocksource/arm_arch_timer.c +5
-0@@ -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
drivers/clocksource/arm_arch_timer.c static int __init arch_timer_common_init(void) · line 1107
Quoted 10 lines
drivers/clocksource/arm_arch_timer.c +10
-0+* 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" );
After this change you will now get two warnings; the above and the below. Is this what you want?
Quoted 10 lines
drivers/clocksource/arm_arch_timer.c +6
-0+return true; + } + +return false; +} +/** * arch_timer_select_ppi() - Select suitable PPI for the current system. *
drivers/clocksource/arm_arch_timer.c static int __init arch_timer_common_init(void) · line 1143
Quoted 9 lines
drivers/clocksource/arm_arch_timer.c +2
-1@@ -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" );
I have posted something similar for Tegra [0], but because this is not expected to work, I wanted to avoid the warnings here. We test for kernel warnings and ideally we would not warn if is known not to work. We could always display an info level print if it is needed.
Jon
Signature · 1 line
nvpublic
Marc Zyngier
maintainerQuoted 45 lines · Jon Hunter
Quoted 42 lines · Marc Zyngier
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 <[email protected]>Reported-by Daniel Drake <[email protected]>Reported-by Marek Szyprowski <[email protected]>Signed-off-by Marc Zyngier <[email protected]>Cc Florian Fainelli <[email protected]>Cc Daniel Lezcano <[email protected]>Cc Thomas Gleixner <[email protected]>Cc Mark Rutland <[email protected]>--- drivers/clocksource/arm_arch_timer.c | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-)drivers/clocksource/arm_arch_timer.c +9
-0@@ -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
Quoted 8 lines
drivers/clocksource/arm_arch_timer.c static int __init arch_timer_common_init(void) · line 1107
Quoted 5 lines
drivers/clocksource/arm_arch_timer.c +5
-0+ }; + +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" );After this change you will now get two warnings; the above and the below. Is this what you want?
Absolutely.
Quoted 16 lines
Quoted 16 lines
drivers/clocksource/arm_arch_timer.c +7
-1+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] &&
Quoted 8 lines
drivers/clocksource/arm_arch_timer.c static int __init arch_timer_common_init(void)
Quoted 4 lines
drivers/clocksource/arm_arch_timer.c +1
-0+ !has_broken_el2_vtimer())return ARCH_TIMER_HYP_VIRT_PPI ; pr_warn_once(FW_BUG "VHE-capable CPU without EL2 virtual timer interrupt\n");I have posted something similar for Tegra [0], but because this is not expected to work, I wanted to avoid the warnings here. We test for
"not expected to work"? In which parallel universe is that a thing?
Quoted 2 lines
kernel warnings and ideally we would not warn if is known not to work. We could always display an info level print if it is needed.
No. These warnings are required because the HW is broken, and violates the basics of the architecture, which the kernel relies on. That's important information that needs to be captured, and that's why the kernel also gets tainted.
This applies to any implementation that hasn't been bothered to follow the spec. Don't worry, you're in good company.
M.
Signature · 1 line
Jazz isn't dead. It just smells funny.
Jon Hunter
maintainerQuoted 83 lines · Marc Zyngier
Quoted 45 lines · Jon Hunter
Quoted 42 lines · Marc Zyngier
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 <[email protected]>Reported-by Daniel Drake <[email protected]>Reported-by Marek Szyprowski <[email protected]>Signed-off-by Marc Zyngier <[email protected]>Cc Florian Fainelli <[email protected]>Cc Daniel Lezcano <[email protected]>Cc Thomas Gleixner <[email protected]>Cc Mark Rutland <[email protected]>--- drivers/clocksource/arm_arch_timer.c | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-)drivers/clocksource/arm_arch_timer.c +9
-0@@ -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 Quoted 8 lines
drivers/clocksource/arm_arch_timer.c static int __init arch_timer_common_init(void) · line 1107
Quoted 5 lines
drivers/clocksource/arm_arch_timer.c +5
-0+ }; + +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" );After this change you will now get two warnings; the above and the below. Is this what you want?
Absolutely.
Quoted 16 lines
Quoted 16 lines
drivers/clocksource/arm_arch_timer.c +7
-1+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] &&Quoted 8 lines
drivers/clocksource/arm_arch_timer.c static int __init arch_timer_common_init(void)
Quoted 4 lines
drivers/clocksource/arm_arch_timer.c +1
-0+ !has_broken_el2_vtimer())return ARCH_TIMER_HYP_VIRT_PPI ; pr_warn_once(FW_BUG "VHE-capable CPU without EL2 virtual timer interrupt\n");I have posted something similar for Tegra [0], but because this is not expected to work, I wanted to avoid the warnings here. We test for
Quoted 1 line
"not expected to work"? In which parallel universe is that a thing?
FWIU, at least for Tegra194, we have a CPU and GIC pairing where the CPU supports this but the GIC does not.
Quoted 10 lines
Quoted 2 lines
kernel warnings and ideally we would not warn if is known not to work. We could always display an info level print if it is needed.
No. These warnings are required because the HW is broken, and violates the basics of the architecture, which the kernel relies on. That's important information that needs to be captured, and that's why the kernel also gets tainted.
This applies to any implementation that hasn't been bothered to follow the spec. Don't worry, you're in good company.
Well Tegra194 does not appear to have, but Tegra234 does (but we have a firmware issue which should be easy to fix but the current released firmware as this issue). I have also checked Tegra264 and that should be following the spec too.
Jon
Signature · 1 line
nvpublic
Marc Zyngier
maintainerQuoted 9 lines · Jon Hunter
Quoted 6 lines
Quoted 4 lines
I have posted something similar for Tegra [0], but because this is not expected to work, I wanted to avoid the warnings here. We test for
"not expected to work"? In which parallel universe is that a thing?
FWIU, at least for Tegra194, we have a CPU and GIC pairing where the CPU supports this but the GIC does not.
Oh please, you know better than this.
It isn't the GIC that defines the number of supported PPIs, it is the *integrator*. I.e. you. The GIC (GIC400 in this example) has full support for 16 PPIs per CPU.
I have a collection of VHE-capable machines with GIC400 that correctly implement the EL2 virtual timer PPI (if even Amlogic and AllWinner can get this right, really *anybody* can). My conclusion is that someone couldn't be bothered to drag a wire from one end to the other.
In any case, the result is the same: a non-working timer, and a machine that is out of specification.
Quoted 9 lines
Quoted 9 lines
Quoted 3 lines
kernel warnings and ideally we would not warn if is known not to work. We could always display an info level print if it is needed.
No. These warnings are required because the HW is broken, and violates the basics of the architecture, which the kernel relies on. That's important information that needs to be captured, and that's why the kernel also gets tainted.
Quoted 7 lines
Quoted 2 lines
This applies to any implementation that hasn't been bothered to follow the spec. Don't worry, you're in good company.
Well Tegra194 does not appear to have, but Tegra234 does (but we have a firmware issue which should be easy to fix but the current released firmware as this issue). I have also checked Tegra264 and that should be following the spec too.
Then provide a way to unambiguously identify the updated firmware, and the warning will magically disappear once people update their firmware to a non-broken version.
Thanks,
M.
Signature · 1 line
Without deviation from the norm, progress is not possible.
Jon Hunter
maintainerOn 23/07/2026 10:58, Marc Zyngier wrote:
...
Quoted 5 lines
Quoted 5 lines
Quoted 4 lines
Quoted 2 lines
I have posted something similar for Tegra [0], but because this is not expected to work, I wanted to avoid the warnings here. We test for
"not expected to work"? In which parallel universe is that a thing?
Quoted 8 lines
Quoted 2 lines
FWIU, at least for Tegra194, we have a CPU and GIC pairing where the CPU supports this but the GIC does not.
Oh please, you know better than this.
It isn't the GIC that defines the number of supported PPIs, it is the *integrator*. I.e. you. The GIC (GIC400 in this example) has full support for 16 PPIs per CPU.
Hmmm, I am looking at this spec [0] and it says ...
"The GIC-400 implements the interrupt types:
16 Software Generated Interrupts (SGIs).
6 external Private Peripheral Interrupts (PPIs) for each processor. 1 internal PPI for each processor."
The table in [1] shows interrupts for non-sec, sec, virt and hypervisor timers, but I don't see a hyp-virt.
Quoted 4 lines
I have a collection of VHE-capable machines with GIC400 that correctly implement the EL2 virtual timer PPI (if even Amlogic and AllWinner can get this right, really *anybody* can). My conclusion is that someone couldn't be bothered to drag a wire from one end to the other.
OK, so most likely I am still missing something here.
[0] https://developer.arm.com/documentation/ddi0471/b/introduction/about-the-gic-400?lang=en
[1] https://developer.arm.com/documentation/ddi0471/b/functional-description/interrupt-inputs-to-the-gic-400/ppis?lang=en
Signature · 1 line
nvpublic
Marc Zyngier
maintainerQuoted 22 lines · Jon Hunter
On 23/07/2026 10:58, Marc Zyngier wrote:
...
Quoted 5 lines
Quoted 5 lines
Quoted 4 lines
Quoted 2 lines
I have posted something similar for Tegra [0], but because this is not expected to work, I wanted to avoid the warnings here. We test for
"not expected to work"? In which parallel universe is that a thing?
Quoted 8 lines
Quoted 2 lines
FWIU, at least for Tegra194, we have a CPU and GIC pairing where the CPU supports this but the GIC does not.
Oh please, you know better than this.
It isn't the GIC that defines the number of supported PPIs, it is the *integrator*. I.e. you. The GIC (GIC400 in this example) has full support for 16 PPIs per CPU.
Hmmm, I am looking at this spec [0] and it says ...
Quoted 7 lines
"The GIC-400 implements the interrupt types:
16 Software Generated Interrupts (SGIs).
6 external Private Peripheral Interrupts (PPIs) for each processor. 1 internal PPI for each processor."The table in [1] shows interrupts for non-sec, sec, virt and hypervisor timers, but I don't see a hyp-virt.
This documentation was never updated past 2012, which predates ARMv8.1 (go complain to ARM). But the IP does support it:
[ 0.000000] Machine model: Khadas VIM3L [...] [ 0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0 [ 0.000000] Root IRQ handler: gic_handle_irq [ 0.000000] GIC: Using split EOI/Deactivate mode [ 0.000000] rcu: srcu_init: Setting srcu_struct sizes based on contention. [ 0.000000] arch_timer: cp15 timer running at 24.00MHz (hyp-virt). [ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns [ 0.000000] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
GIC400, A55 cores. Produced by one of the worse SoC vendor on this side of the galaxy.
And the signal you are looking for is the one labelled as "Legacy FIQ signal" (PPI12, aka INTID 28). The labels are purely indicative of what you *could* connect to it, not a requirement.
Anyway, this is beside the point. Even if the IP didn't support it, you shouldn't end-up with a design that explicitly contradict the architecture, because that's the contract SW relies on.
M.
Signature · 1 line
Without deviation from the norm, progress is not possible.
Jon Hunter
maintainerOn 23/07/2026 11:46, Marc Zyngier wrote:
...
Quoted 26 lines
Quoted 9 lines
Hmmm, I am looking at this spec [0] and it says ...
"The GIC-400 implements the interrupt types:
16 Software Generated Interrupts (SGIs).
6 external Private Peripheral Interrupts (PPIs) for each processor. 1 internal PPI for each processor."The table in [1] shows interrupts for non-sec, sec, virt and hypervisor timers, but I don't see a hyp-virt.
This documentation was never updated past 2012, which predates ARMv8.1 (go complain to ARM). But the IP does support it:
[ 0.000000] Machine model: Khadas VIM3L [...] [ 0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0 [ 0.000000] Root IRQ handler: gic_handle_irq [ 0.000000] GIC: Using split EOI/Deactivate mode [ 0.000000] rcu: srcu_init: Setting srcu_struct sizes based on contention. [ 0.000000] arch_timer: cp15 timer running at 24.00MHz (hyp-virt). [ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns [ 0.000000] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097nsGIC400, A55 cores. Produced by one of the worse SoC vendor on this side of the galaxy.
Quoted 7 lines
And the signal you are looking for is the one labelled as "Legacy FIQ signal" (PPI12, aka INTID 28). The labels are purely indicative of what you *could* connect to it, not a requirement.
Anyway, this is beside the point. Even if the IP didn't support it, you shouldn't end-up with a design that explicitly contradict the architecture, because that's the contract SW relies on.
Got it. Armed with this information I went back to the h/w folks and was able to track down the right person. I have now learnt that this timer interrupt is hooked up to PPI15 for Tegra194 and using that I now see ...
[ 0.000000] Machine model: NVIDIA Jetson AGX Xavier Developer Kit ... [ 0.000000] arch_timer: cp15 timer running at 31.25MHz (hyp-virt).
I will post a patch to fix this for Tegra194.
Jon
Signature · 1 line
nvpublic
The following commit has been merged into the timers/urgent branch of tip:
The following commit has been merged into the timers/urgent branch of tip:
Commit-ID: 94f39e4c017e66130e476268bdaa0bf61e914fa2 Gitweb: https://git.kernel.org/tip/94f39e4c017e66130e476268bdaa0bf61e914fa2 Author: Marc Zyngier <[email protected]> AuthorDate: Fri, 10 Jul 2026 09:09:58 +01:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Wed, 12 Aug 2026 17:09:29 +02:00
clocksource/drivers/arm_arch_timer: Workaround bcm2712 broken EL2 virtual timer
It appears that the bcm2712 SoC found in the relatively popular RPi5 has a broken EL2 virtual timer.
Tthe reason why the timer isn't working is unknown (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 it's unknown what else is wrong with it.
--- drivers/clocksource/arm_arch_timer.c | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-)
drivers/clocksource/arm_arch_timer.c +23 -1
@@ -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" );