I’m using the Jetson AGX as a root port and a Xilinx dev board as PCIe endpoint.
PCIe connection is well established and data correctly exchanged.
I configured a user IRQ sent by the endpoint over PCIe and I’m using MSI-X interrupts.
By default, IRQ affinity is setup to the CPU0 core of the Jetson AGX. Here is a view of the IRQ associated with my PCIe driver :
cat /proc/interrupts | grep xdma
820: 0 0 0 0 0 0 0 0 PCI-MSI 0 Edge xdma
821: 0 0 0 0 0 0 0 0 PCI-MSI 1 Edge xdma
822: 144097 0 0 0 0 0 0 0 PCI-MSI 2 Edge xdma
823: 0 0 0 0 0 0 0 0 PCI-MSI 3 Edge xdma
824: 0 0 0 0 0 0 0 0 PCI-MSI 4 Edge xdma
825: 0 0 0 0 0 0 0 0 PCI-MSI 5 Edge xdma
826: 0 0 0 0 0 0 0 0 PCI-MSI 6 Edge xdma
827: 0 0 0 0 0 0 0 0 PCI-MSI 7 Edge xdma
828: 0 0 0 0 0 0 0 0 PCI-MSI 8 Edge xdma
829: 0 0 0 0 0 0 0 0 PCI-MSI 9 Edge xdma
830: 0 0 0 0 0 0 0 0 PCI-MSI 10 Edge xdma
831: 0 0 0 0 0 0 0 0 PCI-MSI 11 Edge xdma
832: 0 0 0 0 0 0 0 0 PCI-MSI 12 Edge xdma
833: 0 0 0 0 0 0 0 0 PCI-MSI 13 Edge xdma
834: 0 0 0 0 0 0 0 0 PCI-MSI 14 Edge xdma
835: 0 0 0 0 0 0 0 0 PCI-MSI 15 Edge xdma
836: 0 0 0 0 0 0 0 0 PCI-MSI 16 Edge xdma
837: 0 0 0 0 0 0 0 0 PCI-MSI 17 Edge xdma
The user IRQ is the #822 and I’d like to change its affinity to another CPU core. But the following command return an error :
root@nvidia:/home/nvidia# echo 4 > /proc/irq/822/smp_affinity
bash: echo: write error: Input/output error
I also try to change affinity in Kernel space through the driver adding the following command :
irq_set_affinity_hint(vector, cpumask_of(4));
But it doesn’t work either…
I’ve checked that the Kenerl is built with CONFIG_REGMAP_IRQ=Y and it is the case.
How can I change these IRQ affinity ?