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.

AM625: Can't set affinity for some interrupts

Genius 13655 points
Part Number: AM625

Hello Champs, 

SDK: 08.03.00.19
Real Time (RT) Linux Kernel
RT Kernel Version: 5.10.109-rt65
Kernel defconfig: ti_sdk_arm64_rt_release_defconfig
uboot enviroment variables:

setenv args_all setenv optargs earlycon=ns16550a,mmio32,0x02800000 isolcpus=1-3


root@ok6254:echo 2>/proc/irq/378/smp_affinity_list
-sh:echo:write error:input/output error

Some interrupts e.g i2c no.16 can set the affinity, but other interrupts affinity can't work.

Thanks
Regards,
Shine

  • Hi,

    I see an issue being tracked in the release notes concerning IRQ balance. I will need to discuss with the development team. I will have an answer in the next day or two.

    Best Regards,

    Schuyler

  • Hi,

    This issue was fixed in the 8.6 SDK which is available now.

    Best Regards,

    Schuyler

  • I tested it, but it still doesn't work.

    Here are my test conditions:

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    root@ok6254:~# uname -a
    Linux ok6254 5.10.168-g2c23e6c538 #1 SMP PREEMPT Fri Mar 31 13:24:31 UTC 2023 aarch64 aarch64 aarch64 GNU/Linux
    root@ok6254:~# echo 4 > /proc/irq/317/smp_affinity
    -sh: echo: write error: Input/output error
    root@ok6254:~# cat /proc/interrupts
    CPU0 CPU1 CPU2 CPU3
    11: 59261 63 63 62 GICv3 30 Level arch_timer
    14: 0 0 0 0 GICv3 23 Level arm-pmu
    16: 0 0 0 0 GICv3 139 Level 4900000.i2c
    17: 0 0 0 0 GICv3 208 Level 4b00000.spi
    18: 0 0 0 0 GICv3 209 Level 4b10000.spi
    20: 0 0 0 0 GICv3 197 Level 2b200000.i2c
    21: 559 0 0 0 GICv3 66 Level 4d000000.mailbox thr_012
    22: 3640 0 0 30 GICv3 210 Level 2800000.serial
    25: 0 0 0 0 GICv3 194 Level 20010000.i2c
    26: 0 0 0 0 GICv3 195 Level 20020000.i2c
    27: 0 0 0 0 GICv3 196 Level 20030000.i2c
    28: 0 0 0 0 GICv3 204 Level 20100000.spi
    29: 0 0 0 0 GICv3 205 Level 20110000.spi
    30: 0 0 0 0 GICv3 206 Level 20120000.spi
    31: 3599 0 0 0 GICv3 165 Level mmc0
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    and my interrupt request code and device tree:

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    //probe
    static int temp_probe (struct platform_device *pdev)
    {
    int ret = -1;
    cpumask_t mask;
    nd = of_find_node_by_path("/inc_1");
    if (NULL == nd) {
    printk("find /out_control fail\n");
    }
    out1 = of_irq_get(nd, 0);
    ret = request_irq( out1, do_key, IRQF_TRIGGER_RISING, "key1", pdev);
    if (ret) {
    printk("request irq1 error\n");
    return -EBUSY;
    }
    return 0;
    }
    //device tree
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    The interrupt function is working properly

  • I tested it, but it still doesn't work.The test results can be found in the latest comments on this issue

  • 8.6 had the interrupt affinity improvement for Ethernet, so Ethernet related interrupts are no longer tied to CPU0. There are still some interrupts that are not movable.

    Can you clarify, you have " isolcpus=1-3" as a kernel command line option. So this means you are trying to have everything one CPU0 ? So is the concern:

     22:       3640          0          0         30     GICv3 210 Level     2800000.serial

    ?

      Pekka