This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Tool/software:
HI, I'm currently using Linux SDK (version 10.0).
This is my device tree. Which uses main_gpio0 as interrupt parent.
uio1: uio1 { compatible = "uio-gpio"; status = "okay"; interrupt-parent = <&main_gpio0>; interrupts = <3 IRQ_TYPE_EDGE_RISING>; };
When I check /proc/interrupts, it shows up and works fine.
For the performance, I need to apply CPU affinity to interrupts.
These are the methods I tried but they all failed.
1. Set CPU affinity through sysfs.
2. Add irq_set_affinity() to the driver I'm using.
ret = irq_set_affinity(irq_data->irq, cpumask_of(5)); if (ret < 0 ) { dev_err(&pdev->dev, "IRQ affinity set failed, %d\n", ret); }
So, my question is : Is there any way to set CPU affinity of GPIO interrupts?
Hi Minsoo,
You should be able to set the smp_affinity of the GIC interrupt that the interrupt router is routed to.
You can view the GIC interrupt numbers that the GPIO interrupt router routes to in the appendix spreadsheet within the TRM: https://www.ti.com/lit/zip/spruj52
Best,
Jared
Hello Jared,
I found that interrupt number for GPIO0 on GIC is 145, 146, 147, 148, 149, 150, 151, 152 through the spreadsheet.
And I checked one of those IRQ sysfs on /sys/kernel/irq/145/.
But there was no smp_affinity file found.
Also, I found out that gpio driver(gpio-davinci.c) is using irq_set_chained_handler_and_data() to register IRQ & ISR.
If the driver uses irq_set_chained_handler_and_data() to register IRQ, its CPU affinity cannot be set.
So could you do a cross-check?
Hi Minsoo,
I see. Looking into it more, it appears that the driver doesn't enable setting the smp_affinity for GPIO interrupts.
I've filed a Jira ticket.
Best,
Jared