Hi all,
Currently we are porting our kernel for I.MX6Dual platform from 3.0.101 to 4.9.11.
After struggling for quite some time, we finally manage to port the kernel and boot up our system.
However, we found out one issue on the interrupt handling for the 4.9.11. We realise that in kernel 4.9.11, one of our timing critical GPIO interrupt, is always "interrupted" by other process, and it makes our system unstable.
We had tried to set the affinity of GPIO interrupts to CPU1, but the problem still happens. cat /proc/interrupts shows below:
May we know what is the thing that keeps interrupting our GPIO interrupt in this case? This problem does not happens at kernel 3.0.101. What is changed from interrupt handling wise, from kernel 3.0.101 to 4.9.11?
We compared the /proc/interrupt of 3.0.101, one thing we found out is that in kernel 4.9.11, it uses twd as system timer watchdog, and this interrupt is high up at number 16.
In kernel 3.0.101, there is no twd timer, but there is a LOC column, at the bottom of the /proc/interrupt.
Below is the screenshot for /proc/interrupt for kernel 3.0.101
Could this be the cause of the "interruption" to our GPIO interrupt?
Thank you.
Regards,
Tee
Hi James,
The GPIO interrupt is the interrupt names "stepper" in the previous screenshot of the /proc/interrupt.
Below are the source that we initialize and set the irq for this GPIO
gpio_request(PIN_PRINT_DATA_REQ);
gpio_direction_input(PIN_PRINT_DATA_REQ); //in
set_irq_type(PIN_PRINT_DATA_REQ, IRQ_TYPE_EDGE_FALLING);
// interrupt is disabled at the initialization and is enabled only when needed
ret = request_irq(_gpio_to_irq(PIN_PRINT_DATA_REQ), (void *)stepper_isr, IRQF_TRIGGER_NONE, MODULE_NAME, MODULE_NAME);
//enabling GPIO interrupt
enable_irq(_gpio_to_irq(PIN_PRINT_DATA_REQ));
Are we doing it correctly?
Thank you.
Regards,
Tee