Skip to contentSkip to conversation

BUG at system boot

DISCUSSION François Legal 2 participants 4 messages Nov 5 – Nov 6

lore
Share & tools
lore
#0 lore raw
Quoted 136 lines · François Legal
Quoted 134 lines · Florian Bezdeka
Quoted 121 lines · François Legal
Quoted 119 lines · Florian Bezdeka
Quoted 110 lines · François Legal

Le Mercredi, Octobre 28, 2026 11:15 CET, Florian Bezdeka <[email protected]> a écrit:

Quoted 84 lines · Florian Bezdeka
Quoted 72 lines

Quoted 19 lines · François Legal
Quoted 11 lines

Switching my setup from linux 5.4 Ipipe + Xenomai 3.2 to Linux 6.12 + dovetail + Xenomai 3.3, I experience the follwing BUG() at system boot. Machine is zynq7000 SoC :

[    0.000000] L2C: platform modifies aux control register: 0x02060000 -> 0x02460000 [    0.000000] L2C: DT/platform modifies aux control register: 0x02060000 -> 0x02460000 [    0.000000] L2C-310 enabling early BRESP for Cortex-A9
[    0.000000] L2C-310 full line of zeros enabled for Cortex-A9
[    0.000000] L2C-310 dynamic clock gating enabled, standby mode enabled [    0.000000] L2C-310 cache controller enabled, 8 ways, 512 kB
[    0.000000] L2C-310: CACHE_ID 0x410000c8, AUX_CTRL 0x46460001
[    0.000000] ------------[ cut here ]------------

Quoted 2 lines

[    0.000000] WARNING: CPU: 0 PID: 0 at kernel/irq/pipeline.c:1873 irq_pipeline_init+0x40/0x158 [    0.000000] CPU: 0 UID: 0 PID: 0 Comm: swapper/0 Not tainted 6.12.90-cip24-yocto-standard-arksv #1

That version is a bit outdated already. Could you please repeat the test with the current version in the v6.12.y-cip-dovetail-rebase branch, just to make sure the problem has not already been fixed.

Quoted 33 lines

On first glance that looks like an IRQ pipeline state corruption. I fixed some of them recently, so please give it a try.

The non-rebase branch - the version you are using - has not been updated yet. Let's wait for your test results. If successful we can ask Jan to do a stable release.

Quoted 26 lines

[    0.000000] Hardware name: Xilinx Zynq Platform
[    0.000000] IRQ stage: Linux
[    0.000000] Call trace:
[    0.000000]  dump_backtrace from show_stack+0x18/0x1c
[    0.000000]  r7:c0c08f40 r6:c0a94cc8 r5:00000000 r4:00000080
[    0.000000]  show_stack from dump_stack_lvl+0x94/0xc8
[    0.000000]  dump_stack_lvl from dump_stack+0x18/0x1c
[    0.000000]  r7:00000751 r6:00000009 r5:c0b0e65c r4:c0a65b0c
[    0.000000]  dump_stack from __warn+0x80/0xe0
[    0.000000]  __warn from warn_slowpath_fmt+0x1b0/0x1bc
[    0.000000]  r7:00000000 r6:c0a65b0c r5:c0c08f40 r4:c0b4268c
[    0.000000]  warn_slowpath_fmt from irq_pipeline_init+0x40/0x158 [    0.000000]  r8:1eb76000 r7:00000000 r6:00000000 r5:c0c97038 r4:c0c97000 [    0.000000]  irq_pipeline_init from start_kernel+0x3f8/0x568
[    0.000000]  r5:c0c97038 r4:c0c97000
[    0.000000]  start_kernel from 0x0
[    0.000000]  r7:00000000
[    0.000000] ---[ end trace 0000000000000000 ]---
[    0.000000] IRQ pipeline enabled
[    0.000000] rcu: srcu_init: Setting srcu_struct sizes based on contention. [    0.000000] zynq_clock_init: clkc starts at (ptrval)
[    0.000000] Zynq clock init

I don't really know how to chase this.

François


 I switched to the tip of that branch. I get the same result :

[    0.000000] L2C-310 dynamic clock gating enabled, standby mode enabled
[    0.000000] L2C-310 cache controller enabled, 8 ways, 512 kB
[    0.000000] L2C-310: CACHE_ID 0x410000c8, AUX_CTRL 0x46460001
[    0.000000] ------------[ cut here ]------------
[    0.000000] WARNING: CPU: 0 PID: 0 at kernel/irq/pipeline.c:1866 irq_pipeline_init+0x40/0x158 [    0.000000] CPU: 0 UID: 0 PID: 0 Comm: swapper/0 Not tainted 6.12.96-cip28-yocto-standard-arksv #1 [    0.000000] Hardware name: Xilinx Zynq Platform
[    0.000000] IRQ stage: Linux
[    0.000000] Call trace:
[    0.000000]  dump_backtrace from show_stack+0x18/0x1c
[    0.000000]  r7:c0c08f40 r6:c0a951a4 r5:00000000 r4:00000080
[    0.000000]  show_stack from dump_stack_lvl+0x94/0xc8
[    0.000000]  dump_stack_lvl from dump_stack+0x18/0x1c
[    0.000000]  r7:0000074a r6:00000009 r5:c0b0e65c r4:c0a65fe8
[    0.000000]  dump_stack from __warn+0x80/0xe0
[    0.000000]  __warn from warn_slowpath_fmt+0x1b0/0x1bc

Quoted 10 lines

[    0.000000]  r7:00000000 r6:c0a65fe8 r5:c0c08f40 r4:c0b4268c
[    0.000000]  warn_slowpath_fmt from irq_pipeline_init+0x40/0x158
[    0.000000]  r8:1eb76000 r7:00000000 r6:00000000 r5:c0c97038 r4:c0c97000
[    0.000000]  irq_pipeline_init from start_kernel+0x3f8/0x568
[    0.000000]  r5:c0c97038 r4:c0c97000> > > > > > [    0.000000]  start_kernel from 0x0> > > > > > [    0.000000]  r7:00000000 [    0.000000] ---[ end trace 0000000000000000 ]---
[    0.000000] IRQ pipeline enabled
[    0.000000] rcu: srcu_init: Setting srcu_struct sizes based on contention.

Quoted 9 lines

Might be related:
https://lore.kernel.org/xenomai/CAKndYJGo5Yu7Ak694tX=cqRjtJneXs22DPjz=UDVkUcNJMWyOA@mail.gmail.com/

Quote:

Quoted 3 lines

It actually booted as soon as I disabled the "scutimer" clock source via the DTB.  This made the kernel fall back to "arm_global_timer" and now it boots properly.

Well, I had this problem a while back at my first dovetail attempt (was on linux 5.15 IIRC). Switching to 6.12, the system started correctly at first try (except for that BUG signaled). I even experience pretty good RT performance (about the same I had with IPIPE)

Quoted 11 lines

There are a couple of "hacks" mentioned in the mail thread that you could try and report back.

Couple of questions:

- Does the board boot up with CONFIG_IRQ_PIPELINE disabled?
- Have you tried enabling
    - CONFIG_DEBUG_IRQ_PIPELINE
    - CONFIG_IRQ_PIPELINE_TORTURE_TEST> > > > > Best regards,
Florian

Quoted 4 lines


I can see no differences with these options activated (apart from custom kernel driver that need to be fixed, but that will be another thread if I can't fix it myself). You can find the complete bootlog attached.

The hardware IRQ state is unexpected in your case. Hard IRQs are enabled where they are expected to be disabled. Quite early in the boot process.

Quoted 8 lines
Quoted 3 lines

It might help to enable CONFIG_PROVE_LOCKING (enable lockdep). That might tell us where hard IRQs were enabled before we reached the check.

I just tried the CONFIG_PROVE_LOCKING option. Unfortunately, it seems the detector gets activated way after the inital BUG occurs.

I also reviewed the Zynq clock init part, however, I'm not really sur to know what I'm looking for. I can tell that this is registering the clock tree elements within the kernel, and that some couples of spin_lock_irqsave/spin_lock_irqrestore are in the way.

I just send out a patch [1] for another trap handling issue that Jan found while trying to do some stable updates. I have no other idea ATM.

Quoted 9 lines
Quoted 3 lines

[1] https://lore.kernel.org/xenomai/[email protected]/T/#u

Any further ideas from Philippe or Jan?

The patch did not help. Same result. So I checked what happens inmain before calling irq_pipeline_init
IRQs are disabled until the call to init_IRQ(), after which there enabled. I don't checked where (and possibly why it is so) nor if it's expected.

I'll post updates.

Here it is, coming from init_IRQ(), I get the follwing call trace

stop_machine_cpuslocked
patch_text
__arch_jump_label_transform
arch_jump_label_transform
jump_label_cmp
static_key_disable_cpuslocked
gic_of_init
of_irq_init
irq_chip_init
zynq_irq_init
init_IRQ

And there, in stop_machine_cpuslocked, I see a cpsie i (which enables the interrupts to the core) and a then a call to __inband_irq_enable.

Quoted 3 lines

François

#1 lore raw
Quoted 162 lines · François Legal

Le Jeudi, Novembre 05, 2026 11:54 CET, François Legal <[email protected]> a écrit:

Quoted 136 lines · Florian Bezdeka

Quoted 134 lines · François Legal
Quoted 121 lines · Florian Bezdeka

Quoted 119 lines · François Legal
Quoted 110 lines · Florian Bezdeka

Quoted 84 lines · Florian Bezdeka
Quoted 72 lines

Quoted 19 lines · François Legal
Quoted 11 lines

Switching my setup from linux 5.4 Ipipe + Xenomai 3.2 to Linux 6.12 + dovetail + Xenomai 3.3, I experience the follwing BUG() at system boot. Machine is zynq7000 SoC :

[    0.000000] L2C: platform modifies aux control register: 0x02060000 -> 0x02460000 [    0.000000] L2C: DT/platform modifies aux control register: 0x02060000 -> 0x02460000 [    0.000000] L2C-310 enabling early BRESP for Cortex-A9
[    0.000000] L2C-310 full line of zeros enabled for Cortex-A9
[    0.000000] L2C-310 dynamic clock gating enabled, standby mode enabled [    0.000000] L2C-310 cache controller enabled, 8 ways, 512 kB
[    0.000000] L2C-310: CACHE_ID 0x410000c8, AUX_CTRL 0x46460001
[    0.000000] ------------[ cut here ]------------

Quoted 2 lines

[    0.000000] WARNING: CPU: 0 PID: 0 at kernel/irq/pipeline.c:1873 irq_pipeline_init+0x40/0x158 [    0.000000] CPU: 0 UID: 0 PID: 0 Comm: swapper/0 Not tainted 6.12.90-cip24-yocto-standard-arksv #1

That version is a bit outdated already. Could you please repeat the test with the current version in the v6.12.y-cip-dovetail-rebase branch, just to make sure the problem has not already been fixed.

Quoted 33 lines

On first glance that looks like an IRQ pipeline state corruption. I fixed some of them recently, so please give it a try.

The non-rebase branch - the version you are using - has not been updated yet. Let's wait for your test results. If successful we can ask Jan to do a stable release.

Quoted 26 lines

[    0.000000] Hardware name: Xilinx Zynq Platform
[    0.000000] IRQ stage: Linux
[    0.000000] Call trace:
[    0.000000]  dump_backtrace from show_stack+0x18/0x1c
[    0.000000]  r7:c0c08f40 r6:c0a94cc8 r5:00000000 r4:00000080
[    0.000000]  show_stack from dump_stack_lvl+0x94/0xc8
[    0.000000]  dump_stack_lvl from dump_stack+0x18/0x1c
[    0.000000]  r7:00000751 r6:00000009 r5:c0b0e65c r4:c0a65b0c
[    0.000000]  dump_stack from __warn+0x80/0xe0
[    0.000000]  __warn from warn_slowpath_fmt+0x1b0/0x1bc
[    0.000000]  r7:00000000 r6:c0a65b0c r5:c0c08f40 r4:c0b4268c
[    0.000000]  warn_slowpath_fmt from irq_pipeline_init+0x40/0x158 [    0.000000]  r8:1eb76000 r7:00000000 r6:00000000 r5:c0c97038 r4:c0c97000 [    0.000000]  irq_pipeline_init from start_kernel+0x3f8/0x568
[    0.000000]  r5:c0c97038 r4:c0c97000
[    0.000000]  start_kernel from 0x0
[    0.000000]  r7:00000000
[    0.000000] ---[ end trace 0000000000000000 ]---
[    0.000000] IRQ pipeline enabled
[    0.000000] rcu: srcu_init: Setting srcu_struct sizes based on contention. [    0.000000] zynq_clock_init: clkc starts at (ptrval)
[    0.000000] Zynq clock init

I don't really know how to chase this.

François


 I switched to the tip of that branch. I get the same result :

[    0.000000] L2C-310 dynamic clock gating enabled, standby mode enabled
[    0.000000] L2C-310 cache controller enabled, 8 ways, 512 kB
[    0.000000] L2C-310: CACHE_ID 0x410000c8, AUX_CTRL 0x46460001
[    0.000000] ------------[ cut here ]------------
[    0.000000] WARNING: CPU: 0 PID: 0 at kernel/irq/pipeline.c:1866 irq_pipeline_init+0x40/0x158 [    0.000000] CPU: 0 UID: 0 PID: 0 Comm: swapper/0 Not tainted 6.12.96-cip28-yocto-standard-arksv #1 [    0.000000] Hardware name: Xilinx Zynq Platform
[    0.000000] IRQ stage: Linux
[    0.000000] Call trace:
[    0.000000]  dump_backtrace from show_stack+0x18/0x1c
[    0.000000]  r7:c0c08f40 r6:c0a951a4 r5:00000000 r4:00000080
[    0.000000]  show_stack from dump_stack_lvl+0x94/0xc8
[    0.000000]  dump_stack_lvl from dump_stack+0x18/0x1c
[    0.000000]  r7:0000074a r6:00000009 r5:c0b0e65c r4:c0a65fe8
[    0.000000]  dump_stack from __warn+0x80/0xe0
[    0.000000]  __warn from warn_slowpath_fmt+0x1b0/0x1bc

Quoted 10 lines

[    0.000000]  r7:00000000 r6:c0a65fe8 r5:c0c08f40 r4:c0b4268c
[    0.000000]  warn_slowpath_fmt from irq_pipeline_init+0x40/0x158
[    0.000000]  r8:1eb76000 r7:00000000 r6:00000000 r5:c0c97038 r4:c0c97000
[    0.000000]  irq_pipeline_init from start_kernel+0x3f8/0x568
[    0.000000]  r5:c0c97038 r4:c0c97000> > > > > > [    0.000000]  start_kernel from 0x0> > > > > > [    0.000000]  r7:00000000 [    0.000000] ---[ end trace 0000000000000000 ]---
[    0.000000] IRQ pipeline enabled
[    0.000000] rcu: srcu_init: Setting srcu_struct sizes based on contention.

Quoted 9 lines

Might be related:
https://lore.kernel.org/xenomai/CAKndYJGo5Yu7Ak694tX=cqRjtJneXs22DPjz=UDVkUcNJMWyOA@mail.gmail.com/

Quote:

Quoted 3 lines

It actually booted as soon as I disabled the "scutimer" clock source via the DTB.  This made the kernel fall back to "arm_global_timer" and now it boots properly.

Well, I had this problem a while back at my first dovetail attempt (was on linux 5.15 IIRC). Switching to 6.12, the system started correctly at first try (except for that BUG signaled). I even experience pretty good RT performance (about the same I had with IPIPE)

Quoted 11 lines

There are a couple of "hacks" mentioned in the mail thread that you could try and report back.

Couple of questions:

- Does the board boot up with CONFIG_IRQ_PIPELINE disabled?
- Have you tried enabling
    - CONFIG_DEBUG_IRQ_PIPELINE
    - CONFIG_IRQ_PIPELINE_TORTURE_TEST> > > > > Best regards,
Florian

Quoted 4 lines


I can see no differences with these options activated (apart from custom kernel driver that need to be fixed, but that will be another thread if I can't fix it myself). You can find the complete bootlog attached.

The hardware IRQ state is unexpected in your case. Hard IRQs are enabled where they are expected to be disabled. Quite early in the boot process.

Quoted 8 lines
Quoted 3 lines

It might help to enable CONFIG_PROVE_LOCKING (enable lockdep). That might tell us where hard IRQs were enabled before we reached the check.

I just tried the CONFIG_PROVE_LOCKING option. Unfortunately, it seems the detector gets activated way after the inital BUG occurs.

I also reviewed the Zynq clock init part, however, I'm not really sur to know what I'm looking for. I can tell that this is registering the clock tree elements within the kernel, and that some couples of spin_lock_irqsave/spin_lock_irqrestore are in the way.

I just send out a patch [1] for another trap handling issue that Jan found while trying to do some stable updates. I have no other idea ATM.

Quoted 9 lines
Quoted 3 lines

[1] https://lore.kernel.org/xenomai/[email protected]/T/#u

Any further ideas from Philippe or Jan?


The patch did not help. Same result. So I checked what happens inmain before calling  irq_pipeline_init
IRQs are disabled until the call to init_IRQ(), after which there enabled. I don't checked where (and possibly why it is so) nor if it's expected.

I'll post updates.

Here it is, coming from init_IRQ(), I get the follwing call trace

stop_machine_cpuslocked
patch_text
__arch_jump_label_transform
arch_jump_label_transform
jump_label_cmp
static_key_disable_cpuslocked
gic_of_init
of_irq_init
irq_chip_init
zynq_irq_init
init_IRQ

Quoted 2 lines

And there, in stop_machine_cpuslocked, I see a cpsie i (which enables the interrupts to the core) and a then a call to __inband_irq_enable.

Quoted 1 line

This stop_machine_cpuslocked() is unconditionally enabling hard IRQs. It seems this call is unexpected at this stage, even before initializing the pipelining core, which is expecting hard IRQs off at initialization.

Maybe worth a try:

kernel/stop_machine.c +3 -2
index cc7a2c6431ea6..912adf6016acc 100644
@@ -601,15 +601,16 @@ int stop_machine_cpuslocked(cpu_stop_fn_t fn, void *data,
 		 * early in boot before stop_machine() has been
 		 * initialized.
 		 */
+		unsigned long irqflags;
 		unsigned long flags;
 		int ret;
 
 		WARN_ON_ONCE(msdata.num_threads != 1);
 
 		local_irq_save(flags);
-		hard_irq_disable();
+		irqflags = hard_cond_local_irq_save();
 		ret = (*fn)(data);
-		hard_irq_enable();
+		hard_cond_local_irq_restore(irqflags);
 		local_irq_restore(flags);
 
 		return ret;
#2 lore raw
Quoted 185 lines · Florian Bezdeka
Quoted 162 lines · François Legal

Le Jeudi, Novembre 05, 2026 11:54 CET, François Legal <[email protected]> a écrit:

Quoted 136 lines · Florian Bezdeka

Quoted 134 lines · François Legal
Quoted 121 lines · Florian Bezdeka

Quoted 119 lines · François Legal
Quoted 110 lines · Florian Bezdeka

Quoted 84 lines · Florian Bezdeka
Quoted 72 lines

Quoted 19 lines · François Legal
Quoted 11 lines

Switching my setup from linux 5.4 Ipipe + Xenomai 3.2 to Linux 6.12 + dovetail + Xenomai 3.3, I experience the follwing BUG() at system boot. Machine is zynq7000 SoC :

[    0.000000] L2C: platform modifies aux control register: 0x02060000 -> 0x02460000 [    0.000000] L2C: DT/platform modifies aux control register: 0x02060000 -> 0x02460000 [    0.000000] L2C-310 enabling early BRESP for Cortex-A9
[    0.000000] L2C-310 full line of zeros enabled for Cortex-A9
[    0.000000] L2C-310 dynamic clock gating enabled, standby mode enabled [    0.000000] L2C-310 cache controller enabled, 8 ways, 512 kB
[    0.000000] L2C-310: CACHE_ID 0x410000c8, AUX_CTRL 0x46460001
[    0.000000] ------------[ cut here ]------------

Quoted 2 lines

[    0.000000] WARNING: CPU: 0 PID: 0 at kernel/irq/pipeline.c:1873 irq_pipeline_init+0x40/0x158 [    0.000000] CPU: 0 UID: 0 PID: 0 Comm: swapper/0 Not tainted 6.12.90-cip24-yocto-standard-arksv #1

That version is a bit outdated already. Could you please repeat the test with the current version in the v6.12.y-cip-dovetail-rebase branch, just to make sure the problem has not already been fixed.

Quoted 33 lines

On first glance that looks like an IRQ pipeline state corruption. I fixed some of them recently, so please give it a try.

The non-rebase branch - the version you are using - has not been updated yet. Let's wait for your test results. If successful we can ask Jan to do a stable release.

Quoted 26 lines

[    0.000000] Hardware name: Xilinx Zynq Platform
[    0.000000] IRQ stage: Linux
[    0.000000] Call trace:
[    0.000000]  dump_backtrace from show_stack+0x18/0x1c
[    0.000000]  r7:c0c08f40 r6:c0a94cc8 r5:00000000 r4:00000080
[    0.000000]  show_stack from dump_stack_lvl+0x94/0xc8
[    0.000000]  dump_stack_lvl from dump_stack+0x18/0x1c
[    0.000000]  r7:00000751 r6:00000009 r5:c0b0e65c r4:c0a65b0c
[    0.000000]  dump_stack from __warn+0x80/0xe0
[    0.000000]  __warn from warn_slowpath_fmt+0x1b0/0x1bc
[    0.000000]  r7:00000000 r6:c0a65b0c r5:c0c08f40 r4:c0b4268c
[    0.000000]  warn_slowpath_fmt from irq_pipeline_init+0x40/0x158 [    0.000000]  r8:1eb76000 r7:00000000 r6:00000000 r5:c0c97038 r4:c0c97000 [    0.000000]  irq_pipeline_init from start_kernel+0x3f8/0x568
[    0.000000]  r5:c0c97038 r4:c0c97000
[    0.000000]  start_kernel from 0x0
[    0.000000]  r7:00000000
[    0.000000] ---[ end trace 0000000000000000 ]---
[    0.000000] IRQ pipeline enabled
[    0.000000] rcu: srcu_init: Setting srcu_struct sizes based on contention. [    0.000000] zynq_clock_init: clkc starts at (ptrval)
[    0.000000] Zynq clock init

I don't really know how to chase this.

François


 I switched to the tip of that branch. I get the same result :

[    0.000000] L2C-310 dynamic clock gating enabled, standby mode enabled
[    0.000000] L2C-310 cache controller enabled, 8 ways, 512 kB
[    0.000000] L2C-310: CACHE_ID 0x410000c8, AUX_CTRL 0x46460001
[    0.000000] ------------[ cut here ]------------
[    0.000000] WARNING: CPU: 0 PID: 0 at kernel/irq/pipeline.c:1866 irq_pipeline_init+0x40/0x158 [    0.000000] CPU: 0 UID: 0 PID: 0 Comm: swapper/0 Not tainted 6.12.96-cip28-yocto-standard-arksv #1 [    0.000000] Hardware name: Xilinx Zynq Platform
[    0.000000] IRQ stage: Linux
[    0.000000] Call trace:
[    0.000000]  dump_backtrace from show_stack+0x18/0x1c
[    0.000000]  r7:c0c08f40 r6:c0a951a4 r5:00000000 r4:00000080
[    0.000000]  show_stack from dump_stack_lvl+0x94/0xc8
[    0.000000]  dump_stack_lvl from dump_stack+0x18/0x1c
[    0.000000]  r7:0000074a r6:00000009 r5:c0b0e65c r4:c0a65fe8
[    0.000000]  dump_stack from __warn+0x80/0xe0
[    0.000000]  __warn from warn_slowpath_fmt+0x1b0/0x1bc

Quoted 10 lines

[    0.000000]  r7:00000000 r6:c0a65fe8 r5:c0c08f40 r4:c0b4268c
[    0.000000]  warn_slowpath_fmt from irq_pipeline_init+0x40/0x158
[    0.000000]  r8:1eb76000 r7:00000000 r6:00000000 r5:c0c97038 r4:c0c97000
[    0.000000]  irq_pipeline_init from start_kernel+0x3f8/0x568
[    0.000000]  r5:c0c97038 r4:c0c97000> > > > > > [    0.000000]  start_kernel from 0x0> > > > > > [    0.000000]  r7:00000000 [    0.000000] ---[ end trace 0000000000000000 ]---
[    0.000000] IRQ pipeline enabled
[    0.000000] rcu: srcu_init: Setting srcu_struct sizes based on contention.

Quoted 9 lines

Might be related:
https://lore.kernel.org/xenomai/CAKndYJGo5Yu7Ak694tX=cqRjtJneXs22DPjz=UDVkUcNJMWyOA@mail.gmail.com/

Quote:

Quoted 3 lines

It actually booted as soon as I disabled the "scutimer" clock source via the DTB.  This made the kernel fall back to "arm_global_timer" and now it boots properly.

Well, I had this problem a while back at my first dovetail attempt (was on linux 5.15 IIRC). Switching to 6.12, the system started correctly at first try (except for that BUG signaled). I even experience pretty good RT performance (about the same I had with IPIPE)

Quoted 11 lines

There are a couple of "hacks" mentioned in the mail thread that you could try and report back.

Couple of questions:

- Does the board boot up with CONFIG_IRQ_PIPELINE disabled?
- Have you tried enabling
    - CONFIG_DEBUG_IRQ_PIPELINE
    - CONFIG_IRQ_PIPELINE_TORTURE_TEST> > > > > Best regards,
Florian

Quoted 4 lines


I can see no differences with these options activated (apart from custom kernel driver that need to be fixed, but that will be another thread if I can't fix it myself). You can find the complete bootlog attached.

The hardware IRQ state is unexpected in your case. Hard IRQs are enabled where they are expected to be disabled. Quite early in the boot process.

Quoted 8 lines
Quoted 3 lines

It might help to enable CONFIG_PROVE_LOCKING (enable lockdep). That might tell us where hard IRQs were enabled before we reached the check.

I just tried the CONFIG_PROVE_LOCKING option. Unfortunately, it seems the detector gets activated way after the inital BUG occurs.

I also reviewed the Zynq clock init part, however, I'm not really sur to know what I'm looking for. I can tell that this is registering the clock tree elements within the kernel, and that some couples of spin_lock_irqsave/spin_lock_irqrestore are in the way.

I just send out a patch [1] for another trap handling issue that Jan found while trying to do some stable updates. I have no other idea ATM.

Quoted 9 lines
Quoted 3 lines

[1] https://lore.kernel.org/xenomai/[email protected]/T/#u

Any further ideas from Philippe or Jan?


The patch did not help. Same result. So I checked what happens inmain before calling  irq_pipeline_init
IRQs are disabled until the call to init_IRQ(), after which there enabled. I don't checked where (and possibly why it is so) nor if it's expected.

I'll post updates.

Here it is, coming from init_IRQ(), I get the follwing call trace

stop_machine_cpuslocked
patch_text
__arch_jump_label_transform
arch_jump_label_transform
jump_label_cmp
static_key_disable_cpuslocked
gic_of_init
of_irq_init
irq_chip_init
zynq_irq_init
init_IRQ

Quoted 2 lines

And there, in stop_machine_cpuslocked, I see a cpsie i (which enables the interrupts to the core) and a then a call to __inband_irq_enable.

Quoted 1 line

This stop_machine_cpuslocked() is unconditionally enabling hard IRQs. It seems this call is unexpected at this stage, even before initializing the pipelining core, which is expecting hard IRQs off at initialization.

Maybe worth a try:

kernel/stop_machine.c +1 -0
index cc7a2c6431ea6..912adf6016acc 100644
@@ -601,15 +601,16 @@ int stop_machine_cpuslocked(cpu_stop_fn_t fn, void *data,
 		 * early in boot before stop_machine() has been
 		 * initialized.
 		 */
+		unsigned long irqflags;
 		unsigned long flags;
 		int ret;
 
 		WARN_ON_ONCE(msdata.num_threads != 1);

kernel/stop_machine.c int stop_machine_cpuslocked(cpu_stop_fn_t fn, void *data, · line 616

Quoted 10 lines
kernel/stop_machine.c +2 -2
 
 		local_irq_save(flags);
-		hard_irq_disable();
+		irqflags = hard_cond_local_irq_save();
 		ret = (*fn)(data);
-		hard_irq_enable();
+		hard_cond_local_irq_restore(irqflags);
 		local_irq_restore(flags);
 
 		return ret;

In addition, I forgot the !SMP case:

include/linux/stop_machine.h +3 -2
index 1ec7ad5314748..ba7ee4c9c0674 100644
@@ -165,13 +165,14 @@ int stop_machine_from_inactive_cpu(cpu_stop_fn_t fn, void *data,
 static __always_inline int stop_machine_cpuslocked(cpu_stop_fn_t fn, void *data,
 					  const struct cpumask *cpus)
 {
+	unsigned long irqflags;
 	unsigned long flags;
 	int ret;
 	local_irq_save(flags);
-	hard_irq_disable();
+	irqflags = hard_cond_local_irq_disable();
 	ret = fn(data);
 	hard_irq_enable();
-	local_irq_restore(flags);
+	hard_cond_local_irq_restore(irqflags);
 	return ret;
 }
#3 lore raw
Quoted 209 lines · Florian Bezdeka
Quoted 185 lines · Florian Bezdeka
Quoted 162 lines · François Legal

Le Jeudi, Novembre 05, 2026 11:54 CET, François Legal <[email protected]> a écrit:

Quoted 136 lines · Florian Bezdeka

Quoted 134 lines · François Legal
Quoted 121 lines · Florian Bezdeka

Quoted 119 lines · François Legal
Quoted 110 lines · Florian Bezdeka

Quoted 84 lines · Florian Bezdeka
Quoted 72 lines

Quoted 19 lines · François Legal
Quoted 11 lines

Switching my setup from linux 5.4 Ipipe + Xenomai 3.2 to Linux 6.12 + dovetail + Xenomai 3.3, I experience the follwing BUG() at system boot. Machine is zynq7000 SoC :

[    0.000000] L2C: platform modifies aux control register: 0x02060000 -> 0x02460000 [    0.000000] L2C: DT/platform modifies aux control register: 0x02060000 -> 0x02460000 [    0.000000] L2C-310 enabling early BRESP for Cortex-A9
[    0.000000] L2C-310 full line of zeros enabled for Cortex-A9
[    0.000000] L2C-310 dynamic clock gating enabled, standby mode enabled [    0.000000] L2C-310 cache controller enabled, 8 ways, 512 kB
[    0.000000] L2C-310: CACHE_ID 0x410000c8, AUX_CTRL 0x46460001
[    0.000000] ------------[ cut here ]------------

Quoted 2 lines

[    0.000000] WARNING: CPU: 0 PID: 0 at kernel/irq/pipeline.c:1873 irq_pipeline_init+0x40/0x158 [    0.000000] CPU: 0 UID: 0 PID: 0 Comm: swapper/0 Not tainted 6.12.90-cip24-yocto-standard-arksv #1

That version is a bit outdated already. Could you please repeat the test with the current version in the v6.12.y-cip-dovetail-rebase branch, just to make sure the problem has not already been fixed.

Quoted 33 lines

On first glance that looks like an IRQ pipeline state corruption. I fixed some of them recently, so please give it a try.

The non-rebase branch - the version you are using - has not been updated yet. Let's wait for your test results. If successful we can ask Jan to do a stable release.

Quoted 26 lines

[    0.000000] Hardware name: Xilinx Zynq Platform
[    0.000000] IRQ stage: Linux
[    0.000000] Call trace:
[    0.000000]  dump_backtrace from show_stack+0x18/0x1c
[    0.000000]  r7:c0c08f40 r6:c0a94cc8 r5:00000000 r4:00000080
[    0.000000]  show_stack from dump_stack_lvl+0x94/0xc8
[    0.000000]  dump_stack_lvl from dump_stack+0x18/0x1c
[    0.000000]  r7:00000751 r6:00000009 r5:c0b0e65c r4:c0a65b0c
[    0.000000]  dump_stack from __warn+0x80/0xe0
[    0.000000]  __warn from warn_slowpath_fmt+0x1b0/0x1bc
[    0.000000]  r7:00000000 r6:c0a65b0c r5:c0c08f40 r4:c0b4268c
[    0.000000]  warn_slowpath_fmt from irq_pipeline_init+0x40/0x158 [    0.000000]  r8:1eb76000 r7:00000000 r6:00000000 r5:c0c97038 r4:c0c97000 [    0.000000]  irq_pipeline_init from start_kernel+0x3f8/0x568
[    0.000000]  r5:c0c97038 r4:c0c97000
[    0.000000]  start_kernel from 0x0
[    0.000000]  r7:00000000
[    0.000000] ---[ end trace 0000000000000000 ]---
[    0.000000] IRQ pipeline enabled
[    0.000000] rcu: srcu_init: Setting srcu_struct sizes based on contention. [    0.000000] zynq_clock_init: clkc starts at (ptrval)
[    0.000000] Zynq clock init

I don't really know how to chase this.

François


 I switched to the tip of that branch. I get the same result :

[    0.000000] L2C-310 dynamic clock gating enabled, standby mode enabled
[    0.000000] L2C-310 cache controller enabled, 8 ways, 512 kB
[    0.000000] L2C-310: CACHE_ID 0x410000c8, AUX_CTRL 0x46460001
[    0.000000] ------------[ cut here ]------------
[    0.000000] WARNING: CPU: 0 PID: 0 at kernel/irq/pipeline.c:1866 irq_pipeline_init+0x40/0x158 [    0.000000] CPU: 0 UID: 0 PID: 0 Comm: swapper/0 Not tainted 6.12.96-cip28-yocto-standard-arksv #1 [    0.000000] Hardware name: Xilinx Zynq Platform
[    0.000000] IRQ stage: Linux
[    0.000000] Call trace:
[    0.000000]  dump_backtrace from show_stack+0x18/0x1c
[    0.000000]  r7:c0c08f40 r6:c0a951a4 r5:00000000 r4:00000080
[    0.000000]  show_stack from dump_stack_lvl+0x94/0xc8
[    0.000000]  dump_stack_lvl from dump_stack+0x18/0x1c
[    0.000000]  r7:0000074a r6:00000009 r5:c0b0e65c r4:c0a65fe8
[    0.000000]  dump_stack from __warn+0x80/0xe0
[    0.000000]  __warn from warn_slowpath_fmt+0x1b0/0x1bc

Quoted 10 lines

[    0.000000]  r7:00000000 r6:c0a65fe8 r5:c0c08f40 r4:c0b4268c
[    0.000000]  warn_slowpath_fmt from irq_pipeline_init+0x40/0x158
[    0.000000]  r8:1eb76000 r7:00000000 r6:00000000 r5:c0c97038 r4:c0c97000
[    0.000000]  irq_pipeline_init from start_kernel+0x3f8/0x568
[    0.000000]  r5:c0c97038 r4:c0c97000> > > > > > [    0.000000]  start_kernel from 0x0> > > > > > [    0.000000]  r7:00000000 [    0.000000] ---[ end trace 0000000000000000 ]---
[    0.000000] IRQ pipeline enabled
[    0.000000] rcu: srcu_init: Setting srcu_struct sizes based on contention.

Quoted 9 lines

Might be related:
https://lore.kernel.org/xenomai/CAKndYJGo5Yu7Ak694tX=cqRjtJneXs22DPjz=UDVkUcNJMWyOA@mail.gmail.com/

Quote:

Quoted 3 lines

It actually booted as soon as I disabled the "scutimer" clock source via the DTB.  This made the kernel fall back to "arm_global_timer" and now it boots properly.

Well, I had this problem a while back at my first dovetail attempt (was on linux 5.15 IIRC). Switching to 6.12, the system started correctly at first try (except for that BUG signaled). I even experience pretty good RT performance (about the same I had with IPIPE)

Quoted 11 lines

There are a couple of "hacks" mentioned in the mail thread that you could try and report back.

Couple of questions:

- Does the board boot up with CONFIG_IRQ_PIPELINE disabled?
- Have you tried enabling
    - CONFIG_DEBUG_IRQ_PIPELINE
    - CONFIG_IRQ_PIPELINE_TORTURE_TEST> > > > > Best regards,
Florian

Quoted 4 lines


I can see no differences with these options activated (apart from custom kernel driver that need to be fixed, but that will be another thread if I can't fix it myself). You can find the complete bootlog attached.

The hardware IRQ state is unexpected in your case. Hard IRQs are enabled where they are expected to be disabled. Quite early in the boot process.

Quoted 8 lines
Quoted 3 lines

It might help to enable CONFIG_PROVE_LOCKING (enable lockdep). That might tell us where hard IRQs were enabled before we reached the check.

I just tried the CONFIG_PROVE_LOCKING option. Unfortunately, it seems the detector gets activated way after the inital BUG occurs.

I also reviewed the Zynq clock init part, however, I'm not really sur to know what I'm looking for. I can tell that this is registering the clock tree elements within the kernel, and that some couples of spin_lock_irqsave/spin_lock_irqrestore are in the way.

I just send out a patch [1] for another trap handling issue that Jan found while trying to do some stable updates. I have no other idea ATM.

Quoted 9 lines
Quoted 3 lines

[1] https://lore.kernel.org/xenomai/[email protected]/T/#u

Any further ideas from Philippe or Jan?


The patch did not help. Same result. So I checked what happens inmain before calling  irq_pipeline_init
IRQs are disabled until the call to init_IRQ(), after which there enabled. I don't checked where (and possibly why it is so) nor if it's expected.

I'll post updates.

Here it is, coming from init_IRQ(), I get the follwing call trace

stop_machine_cpuslocked
patch_text
__arch_jump_label_transform
arch_jump_label_transform
jump_label_cmp
static_key_disable_cpuslocked
gic_of_init
of_irq_init
irq_chip_init
zynq_irq_init
init_IRQ

Quoted 2 lines

And there, in stop_machine_cpuslocked, I see a cpsie i (which enables the interrupts to the core) and a then a call to __inband_irq_enable.

Quoted 1 line

This stop_machine_cpuslocked() is unconditionally enabling hard IRQs. It seems this call is unexpected at this stage, even before initializing the pipelining core, which is expecting hard IRQs off at initialization.

Maybe worth a try:

kernel/stop_machine.c +1 -0
index cc7a2c6431ea6..912adf6016acc 100644
@@ -601,15 +601,16 @@ int stop_machine_cpuslocked(cpu_stop_fn_t fn, void *data,
 		 * early in boot before stop_machine() has been
 		 * initialized.
 		 */
+		unsigned long irqflags;
 		unsigned long flags;
 		int ret;
 
 		WARN_ON_ONCE(msdata.num_threads != 1);

kernel/stop_machine.c int stop_machine_cpuslocked(cpu_stop_fn_t fn, void *data, · line 616

Quoted 10 lines
kernel/stop_machine.c +2 -2
 
 		local_irq_save(flags);
-		hard_irq_disable();
+		irqflags = hard_cond_local_irq_save();
 		ret = (*fn)(data);
-		hard_irq_enable();
+		hard_cond_local_irq_restore(irqflags);
 		local_irq_restore(flags);
 
 		return ret;

In addition, I forgot the !SMP case:

include/linux/stop_machine.h +1 -0
index 1ec7ad5314748..ba7ee4c9c0674 100644
@@ -165,13 +165,14 @@ int stop_machine_from_inactive_cpu(cpu_stop_fn_t fn, void *data,
 static __always_inline int stop_machine_cpuslocked(cpu_stop_fn_t fn, void *data,
 					  const struct cpumask *cpus)
 {
+	unsigned long irqflags;
 	unsigned long flags;

include/linux/stop_machine.h int stop_machine_from_inactive_cpu(cpu_stop_fn_t fn, void *data, · line 177

Quoted 10 lines
include/linux/stop_machine.h +2 -2
 	int ret;
 	local_irq_save(flags);
-	hard_irq_disable();
+	irqflags = hard_cond_local_irq_disable();
 	ret = fn(data);
 	hard_irq_enable();
-	local_irq_restore(flags);
+	hard_cond_local_irq_restore(irqflags);
 	return ret;
 }

Thanks. That fixes the bug. With a minor correction in your patch :
@@ -165,11 +165,12 @@ int stop_machine_from_inactive_cpu(cpu_stop_fn_t fn, void *data,

François