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.

[FAQ] TMDX654IDKEVM: Turning off unused cores

Part Number: TMDX654IDKEVM
Other Parts Discussed in Thread: AM6526, AM6548

Hi,

We would like to evaluate AM6526.

PROCESSOR-SDK-LINUX-AM65X v7.1

But EVM have AM6548, I want to disable two A53 cores that are not used. Please tell me how to disable the A53 cores.

Regards, Rei

  • Hi Rei,

    We options to hotplug CPUs from Linux.

    root@am65xx-evm:~# echo 0 > /sys/devices/system/cpu/cpu2/online
    [ 36.430636] IRQ42: set affinity failed(-22).
    [ 36.434914] IRQ43: set affinity failed(-22).
    [ 36.439176] IRQ45: set affinity failed(-22).
    [ 36.443577] IRQ202: set affinity failed(-22).
    [ 36.447926] IRQ203: set affinity failed(-22).
    [ 36.453330] process 183 (rngd) no longer affine to cpu2
    [ 36.454283] CPU2: shutdown
    [ 36.462287] psci: CPU2 killed (polled 0 ms)


    root@am65xx-evm:~# echo 0 > /sys/devices/system/cpu/cpu3/online
    [ 41.606562] IRQ 8: no longer affine to CPU3
    [ 41.610756] IRQ 10: no longer affine to CPU3
    [ 41.615021] IRQ 12: no longer affine to CPU3
    [ 41.619288] IRQ 18: no longer affine to CPU3
    [ 41.623553] IRQ 22: no longer affine to CPU3
    [ 41.627817] IRQ 24: no longer affine to CPU3
    [ 41.632080] IRQ 26: no longer affine to CPU3
    [ 41.636343] IRQ 28: no longer affine to CPU3
    [ 41.640606] IRQ 30: no longer affine to CPU3
    [ 41.644869] IRQ 32: no longer affine to CPU3
    [ 41.649155] IRQ42: set affinity failed(-22).
    [ 41.653415] IRQ43: set affinity failed(-22).
    [ 41.657676] IRQ45: set affinity failed(-22).
    [ 41.662080] IRQ202: set affinity failed(-22).
    [ 41.666428] IRQ203: set affinity failed(-22).
    [ 41.671836] process 184 (rngd) no longer affine to cpu3
    [ 41.671963] CPU3: shutdown
    [ 41.681553] psci: CPU3 killed (polled 0 ms)

    Now we see that interrupts are only for CPU0/1 which are active.

    root@am65xx-evm:~# cat /proc/interrupts
    CPU0 CPU1
    3: 28415 49412 GICv3 30 Level arch_timer
    6: 0 0 GICv3 23 Level arm-pmu
    7: 17 0 GICv3 728 Level 42120000.i2c
    8: 0 0 GICv3 596 Level 40b00000.i2c
    9: 0 0 GICv3 592 Level 40300000.spi
    10: 0 0 GICv3 593 Level 40310000.spi
    11: 0 0 GICv3 594 Level 40320000.spi
    12: 0 0 GICv3 612 Level TI-am335x-adc.0.auto
    13: 0 0 GICv3 613 Level TI-am335x-adc.1.auto
    18: 0 0 GICv3 585 Level 47050000.spi
    19: 792 0 GICv3 224 Level 2800000.serial
    22: 42 0 GICv3 232 Level 2000000.i2c
    23: 1 0 GICv3 233 Level 2010000.i2c
    24: 0 0 GICv3 234 Level 2020000.i2c
    25: 0 0 GICv3 235 Level 2030000.i2c
    26: 0 0 GICv3 216 Level 2100000.spi
    27: 0 0 GICv3 217 Level 2110000.spi
    28: 0 0 GICv3 218 Level 2120000.spi
    29: 0 0 GICv3 219 Level 2130000.spi
    30: 0 0 GICv3 220 Level 2140000.spi
    31: 270 0 GICv3 168 Level mmc0
    32: 7635 0 GICv3 169 Level mmc1
    35: 704 0 GICv3 69 Level 32c00000.mailbox thr_011
    36: 0 0 GICv3 372 Edge ks-pcie-error-irq
    37: 0 0 GICv3 184 Level cal
    38: 2 0 GICv3 194 Level SGX ISR
    41: 0 0 ITS-MSI 0 Edge PCIe PME, aerdrv
    42: 0 0 MSI-INTA 12779616 Level 285c0000.dma-controller chan0
    43: 0 0 MSI-INTA 12779617 Level 46000000.ethernet-tx0
    45: 0 0 MSI-INTA 12779619 Level 46000000.ethernet
    202: 0 0 MSI-INTA 12255536 Level 31150000.dma-controller chan0
    203: 0 0 MSI-INTA 12255537 Level 31150000.dma-controller chan1
    666: 0 0 INTR 391 Level 310d0000.cpts
    695: 0 0 GPIO 24 Edge -davinci_gpio GPIO Key USER1
    696: 0 0 GPIO 25 Edge -davinci_gpio 0-0039
    698: 0 0 GPIO 27 Edge -davinci_gpio GPIO Key USER2
    925: 3 0 INTR 436 Level mbox-mcu-r5fss0-core0
    1291: 0 0 GICv3 602 Level 46000000.ethernet
    1292: 0 0 GICv3 132 Level xhci-hcd:usb1
    1295: 0 0 GICv3 148 Level dwc3-otg
    IPI0: 1713 2488 Rescheduling interrupts
    IPI1: 559 276 Function call interrupts
    IPI2: 0 0 CPU stop interrupts
    IPI3: 0 0 CPU stop (for crash dump) interrupts
    IPI4: 0 0 Timer broadcast interrupts
    IPI5: 0 0 IRQ work interrupts
    IPI6: 0 0 CPU wake-up interrupts
    Err: 0

    If you want compile time disabling can you try below diff:

    diff --git a/arch/arm64/boot/dts/ti/k3-am654.dtsi b/arch/arm64/boot/dts/ti/k3-am654.dtsi
    index b221abf43..1c4325caa 100644
    --- a/arch/arm64/boot/dts/ti/k3-am654.dtsi
    +++ b/arch/arm64/boot/dts/ti/k3-am654.dtsi
    @@ -60,34 +60,6 @@
                            d-cache-sets = <128>;
                            next-level-cache = <&L2_0>;
                    };
    -
    -               cpu2: cpu@100 {
    -                       compatible = "arm,cortex-a53";
    -                       reg = <0x100>;
    -                       device_type = "cpu";
    -                       enable-method = "psci";
    -                       i-cache-size = <0x8000>;
    -                       i-cache-line-size = <64>;
    -                       i-cache-sets = <256>;
    -                       d-cache-size = <0x8000>;
    -                       d-cache-line-size = <64>;
    -                       d-cache-sets = <128>;
    -                       next-level-cache = <&L2_1>;
    -               };
    -
    -               cpu3: cpu@101 {
    -                       compatible = "arm,cortex-a53";
    -                       reg = <0x101>;
    -                       device_type = "cpu";
    -                       enable-method = "psci";
    -                       i-cache-size = <0x8000>;
    -                       i-cache-line-size = <64>;
    -                       i-cache-sets = <256>;
    -                       d-cache-size = <0x8000>;
    -                       d-cache-line-size = <64>;
    -                       d-cache-sets = <128>;
    -                       next-level-cache = <&L2_1>;
    -               };
            };
     

    Best Regards,
    Keerthy

  • Hi Keerthy,

    Thank you very much!