AnsweredAssumed Answered

i.mx6 Linux CPU IRQ affinity

Question asked by Ben Anderson on Oct 17, 2012
Latest reply on Nov 12, 2015 by fang xu

I am trying to test out the IRQ handling on the imx6. I was trying to change the affinity of the IRQ I am using in my driver. It seems like I am not able to it for some reason.

 

Does anyone know if IRQ affinity is supported under Linux for the ARM and the i.mx6?

 

Here is what I have tried.

 

Here is the output of /proc/interrupts showing that all the interrupts on system end up on cpu0.

 

root@freescale /proc/irq$ cat /proc/interrupts

            CPU0       CPU1       CPU2       CPU3

  34:          1          0          0          0       GIC sdma

  35:          0          0          0          0       GIC VPU_JPG_IRQ

  37:          0          0          0          0       GIC imx-ipuv3

  38:          0          0          0          0       GIC imx-ipuv3

  39:          0          0          0          0       GIC imx-ipuv3

  40:          0          0          0          0       GIC imx-ipuv3

  44:          0          0          0          0       GIC VPU_CODEC_IRQ

  51:          0          0          0          0       GIC snvs_rtc

  56:         48          0          0          0       GIC mmc1

  57:          0          0          0          0       GIC mmc0

  59:       1832          0          0          0       GIC IMX-uart

  63:          4          0          0          0       GIC spi_imx

  68:        468          0          0          0       GIC imx-i2c

  69:          0          0          0          0       GIC imx-i2c

  70:          1          0          0          0       GIC imx-i2c

  72:         25          0          0          0       GIC usb_wakeup

  75:          0          0          0          0       GIC usb_wakeup

  82:          0          0          0          0       GIC asrc

  87:     248984          0          0          0       GIC i.MX Timer Tick

121:          0          0          0          0       GIC dvfs

150:      12449          0          0          0       GIC fec

292:          0          0          0          0      GPIO itest

294:          0          0          0          0      GPIO mmc0

448:          0          0          0          0      GPIO mmc1

 

 

 

I tried to change the affinity using the /proc/irq/IRQ#/ files.  My interrupts is number 292 (itest).

 

root@freescale /proc/irq/292$ ls

affinity_hint node smp_affinity_list

itest smp_affinity spurious

 

Here is the current affinity which shows that the IRQ can be on any CPU. Output is suppose to be bit mask of each CPU. So 0xF sets the affinity

for each of the four CPUs.

 

root@freescale /proc/irq/292$ cat smp_affinity

f

 

If I try and set it nothing changes.

 

root@freescale /proc/irq/292$ echo 0x2 > smp_affinity

root@freescale /proc/irq/292$ cat smp_affinity

f

 

Here is link to kernel doc describing the /proc/irq (irq smp affinity) interface.

 

http://lxr.linux.no/linux+v3.0.15/Documentation/IRQ-affinity.txt

 

I tried figuring out if I was missing a kernel configuration option and can't find anything. There is an AUTO_IRQ_AFFINITY config option when I search in the menuconfig but doesn't seem to be any way to change the setting and it doesn't seem dependent on anything. I am not even sure that is what I need. I see what appears to be IRQ affinity code in the /arch/arm but it isn't clear to me.

 

 

Thanks,

 

Ben

Outcomes