Skip to contentSkip to conversation

IRQ not raised switching from 4.4.x to 4.19.x

DISCUSSION François Legal 2 participants 4 messages Nov 30, 2021

lore
Share & tools
lore
#0 lore raw

Hello,

I'm experiencing a weird issue while transitioning Xenomai 3.1 from linux 4.4 to 4.19.
Platform is Zynq 7000 ARM Cortex A9.
Using the exact same hardware, porting a network device driver, the interrupts that should trigger whenever a packet is sent or received do not grif any more. I can see the network packets being sent & received by devmem'ing to the device memory and buffers, but no interrupt ever happens.

I checked the various GIC registers, and everything seems to be OK.

Any idea ?

Thanks in advance

François

#1 lore raw

So I guess I have the beginning of the explanation.
By checking the GIC registers more thoroughly, I found out the trigger type was not set properly (my device uses edge interrupts, and GIC was setup with level interrupts) What's not clear is that the interrupt trigger type is set, if I understand correctly, when one calls platform_get_irq (if IRQ flags are set in the DT, they are setup at that moment). That seems to work OK for linux interrupts, but somehow, these flags get reset for xenomai interrupts (and that did not seem to be the case earlier). Still digging there to find out what's going on.

I found out that rtdm_irq_request can have RTDM_IRQTYPE_EDGE as flag argument, but I'm still not sure how this flag gets handed to ipipe and then to the GIC.

Still searching

François

Quoted 15 lines · François Legal via Xenomai

Hello,

I'm experiencing a weird issue while transitioning Xenomai 3.1 from linux 4.4 to 4.19.
Platform is Zynq 7000 ARM Cortex A9.
Using the exact same hardware, porting a network device driver, the interrupts that should trigger whenever a packet is sent or received do not grif any more. I can see the network packets being sent & received by devmem'ing to the device memory and buffers, but no interrupt ever happens.

I checked the various GIC registers, and everything seems to be OK.

Any idea ?

Thanks in advance

François

#2 lore raw
Quoted 24 lines · François Legal via Xenomai

So I guess I have the beginning of the explanation.
By checking the GIC registers more thoroughly, I found out the trigger type was not set properly (my device uses edge interrupts, and GIC was setup with level interrupts)
What's not clear is that the interrupt trigger type is set, if I understand correctly, when one calls platform_get_irq (if IRQ flags are set in the DT, they are setup at that moment).
That seems to work OK for linux interrupts, but somehow, these flags get reset for xenomai interrupts (and that did not seem to be the case earlier). Still digging there to find out what's going on.

I found out that rtdm_irq_request can have RTDM_IRQTYPE_EDGE as flag argument, but I'm still not sure how this flag gets handed to ipipe and then to the GIC.

Still searching

François

Quoted 2 lines · François Legal via Xenomai

Hello,

Quoted 17 lines
Quoted 1 line

I'm experiencing a weird issue while transitioning Xenomai 3.1 from

linux 4.4 to 4.19.

Quoted 2 lines

Platform is Zynq 7000 ARM Cortex A9.
Using the exact same hardware, porting a network device driver, the

interrupts that should trigger whenever a packet is sent or received do not grif any more. I can see the network packets being sent & received by devmem'ing to the device memory and buffers, but no interrupt ever happens.

Quoted 9 lines

I checked the various GIC registers, and everything seems to be OK.

Any idea ?

Thanks in advance

François

Hi Francois,
I can help and take a look later tonight if you still are having issues.

Thanks

Greg

Quoted 4 lines
#3 lore raw
Quoted 45 lines · Greg Gallagher
Quoted 24 lines · François Legal via Xenomai

So I guess I have the beginning of the explanation.
By checking the GIC registers more thoroughly, I found out the trigger type was not set properly (my device uses edge interrupts, and GIC was setup with level interrupts)
What's not clear is that the interrupt trigger type is set, if I understand correctly, when one calls platform_get_irq (if IRQ flags are set in the DT, they are setup at that moment).
That seems to work OK for linux interrupts, but somehow, these flags get reset for xenomai interrupts (and that did not seem to be the case earlier). Still digging there to find out what's going on.

I found out that rtdm_irq_request can have RTDM_IRQTYPE_EDGE as flag argument, but I'm still not sure how this flag gets handed to ipipe and then to the GIC.

Still searching

François

Quoted 2 lines · François Legal via Xenomai

Hello,

Quoted 17 lines
Quoted 1 line

I'm experiencing a weird issue while transitioning Xenomai 3.1 from

linux 4.4 to 4.19.

Quoted 2 lines

Platform is Zynq 7000 ARM Cortex A9.
Using the exact same hardware, porting a network device driver, the

interrupts that should trigger whenever a packet is sent or received do not grif any more. I can see the network packets being sent & received by devmem'ing to the device memory and buffers, but no interrupt ever happens.

Quoted 9 lines

I checked the various GIC registers, and everything seems to be OK.

Any idea ?

Thanks in advance

François

Quoted 7 lines

Hi Francois,
I can help and take a look later tonight if you still are having issues.

Thanks

Greg

Well, I've been digging this for some hours now, and I still can't find the bottom of it. What I can tell, is that regular linux IRQ request calls request_threaded_irq which in turns will call something ... that calls __irq_set_trigger, which in turns calls the corresponding chip (the GIC here) routine to setup level/edge interrupts.

I can't find where that could be in ipipe.

François

Quoted 4 lines
Quoted 4 lines