openwrt/target/linux
Sean Khan 849ebc905b qualcommax: enhance smp_affinity (log, uci, syntax)
1.) Changed logic of `set_affinity` to now use physical cores rather than
    knowing the bitmask. Rather than having to know a bitmask, users can
    provide a numerical instance of one or more CPU cores
    (numbered 0-63).

    This is done via function `cpus_to_bitmask`.

    Functions Added:

    a.) bitmask_to_cpus - Takes a bitmask of CPUs and returns a
         list of CPU numbers. (i.e. `bitmask_to_cpus "f"` -> 0,1,2,3)

    b.) cpus_to_bitmask - Takes a comma/space or range list of CPUs and returns
         a bitmask.

         Example:
         `cpus_to_bitmask "2,3"`     -> c
         `cpus_to_bitmask "0,1,2,3"` -> f
         `cpus_to_bitmask "1,3"`     -> a

         With or without quotes
         `cpus_to_bitmask "1 3"`     -> a
         `cpus_to_bitmask  1 3`      -> a

2.) Added UCI options:

    enable     - to enable/disable the script from running.   [default 1 (on)]
    enable_log - to enable/disable logging output to `logger`.[default 1 (on)]

    Log output:
```
    Mon Apr  8 23:00:01 2024 user.notice smp_affinity: Pinning IRQ(87) reo2host-destination-ring1    to CPU 0
    Mon Apr  8 23:00:01 2024 user.notice smp_affinity: Pinning IRQ(88) reo2host-destination-ring2    to CPU 1
    Mon Apr  8 23:00:01 2024 user.notice smp_affinity: Pinning IRQ(89) reo2host-destination-ring3    to CPU 2
    Mon Apr  8 23:00:01 2024 user.notice smp_affinity: Pinning IRQ(90) reo2host-destination-ring4    to CPU 3
    Mon Apr  8 23:00:01 2024 user.notice smp_affinity: Pinning IRQ(79) wbm2host-tx-completions-ring1 to CPU 1
    Mon Apr  8 23:00:01 2024 user.notice smp_affinity: Pinning IRQ(83) wbm2host-tx-completions-ring2 to CPU 2
    Mon Apr  8 23:00:01 2024 user.notice smp_affinity: Pinning IRQ(85) wbm2host-tx-completions-ring3 to CPU 3
    Mon Apr  8 23:00:01 2024 user.notice smp_affinity: Pinning IRQ(73) ppdu-end-interrupts-mac1      to CPU 1
    Mon Apr  8 23:00:01 2024 user.notice smp_affinity: Pinning IRQ(77) ppdu-end-interrupts-mac2      to CPU 2
    Mon Apr  8 23:00:01 2024 user.notice smp_affinity: Pinning IRQ(75) ppdu-end-interrupts-mac3      to CPU 3
    Mon Apr  8 23:00:01 2024 user.notice smp_affinity: Pinning IRQ(32) edma_txcmpl                   to CPU 3
    Mon Apr  8 23:00:01 2024 user.notice smp_affinity: Pinning IRQ(33) edma_rxfill                   to CPU 3
    Mon Apr  8 23:00:01 2024 user.notice smp_affinity: Pinning IRQ(35) edma_rxdesc                   to CPU 3
    Mon Apr  8 23:00:01 2024 user.notice smp_affinity: Pinning IRQ(36) edma_misc                     to CPU 3
```

    Output of `/proc/interrupts`:
```
 69:          0          0          0          0 GIC-0 209 Edge      rxdma2host-destination-ring-mac1
 70:          0          0          0          0 GIC-0 211 Edge      rxdma2host-destination-ring-mac3
 71:          0          0          0          0 GIC-0 210 Edge      rxdma2host-destination-ring-mac2
 72:       2435          0          0          0 GIC-0 321 Edge      reo2host-status
 73:     268427       8011          0          0 GIC-0 261 Edge      ppdu-end-interrupts-mac1
 74:          2          0          0          0 GIC-0 255 Edge      rxdma2host-monitor-status-ring-mac1
 75:     176169          0          4      10035 GIC-0 263 Edge      ppdu-end-interrupts-mac3
 76:          2          0          0          0 GIC-0 260 Edge      rxdma2host-monitor-status-ring-mac3
 77:          0          0          0          0 GIC-0 262 Edge      ppdu-end-interrupts-mac2
 78:          0          0          0          0 GIC-0 256 Edge      rxdma2host-monitor-status-ring-mac2
 79:       3428       3123          0          0 GIC-0 189 Edge      wbm2host-tx-completions-ring1
 80:          0          0          0          0 GIC-0 323 Edge      reo2ost-exception
 81:        178          0          0          0 GIC-0 322 Edge      wbm2host-rx-release
 82:          0          0          0          0 GIC-0 212 Edge      host2rxdma-host-buf-ring-mac1
 83:       6524          0      13712          0 GIC-0 190 Edge      wbm2host-tx-completions-ring2
 84:          4          0          0          0 GIC-0 235 Edge      host2rxdma-host-buf-ring-mac3
 85:        560          0          0       1979 GIC-0 191 Edge      wbm2host-tx-completions-ring3
 86:          0          0          0          0 GIC-0 215 Edge      host2rxdma-host-buf-ring-mac2
 87:       4520          0          0          0 GIC-0 267 Edge      reo2host-destination-ring1
 88:       2231       2811          0          0 GIC-0 268 Edge      reo2host-destination-ring2
 89:       2180          0       2512          0 GIC-0 271 Edge      reo2host-destination-ring3
 90:       1990          0          0       2321 GIC-0 320 Edge      reo2host-destination-ring4
```

3.) Added `uci-defaults` script `15_smp_affinity` to configure defaults
    options on first boot.

Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-04-12 13:22:12 +02:00
..
airoha airoha: remove 5.15 support 2024-03-28 13:06:43 +01:00
apm821xx apm821xx: restore 6.1 config+patches 2024-04-05 09:26:26 +02:00
archs38 archs38: remove 5.15 support 2024-03-29 09:58:45 +01:00
armsr kernel: bump 6.1 to 6.1.72 2024-01-19 21:24:44 +01:00
at91 kernel: bump 5.15 to 5.15.153 2024-03-31 18:34:04 +02:00
ath79 ath79: add support for Huawei AP5030DN 2024-03-31 18:09:43 +02:00
bcm27xx bcm27xx: bcm2712: backport RP1 interrupt affinity 2024-04-07 22:12:42 +02:00
bcm47xx bcm47xx: refresh kernel 6.1 config 2024-03-29 00:12:50 +01:00
bcm53xx kernel: bump 5.15 to 5.15.152 2024-03-29 13:44:41 +01:00
bcm4908 kernel: bump 5.15 to 5.15.153 2024-03-31 18:34:04 +02:00
bmips bmips: add support for SmartRG SR505n 2024-03-10 20:26:07 +01:00
d1 d1: define subtarget specifically 2024-04-08 21:52:51 +02:00
gemini kernel: bump 6.1 to 6.1.71 2024-01-06 12:52:49 +01:00
generic generic: 6.1, 6.6: import two pending patches for mt7530 DSA driver 2024-04-10 18:50:32 +01:00
imx imx: kernel: add imx8mp PCI support 2024-03-24 21:19:10 +01:00
ipq40xx kernel: bump 6.6 to 6.6.24 2024-04-05 14:43:44 -04:00
ipq806x ipq806x: 6.6: refresh patches 2024-04-05 17:32:21 +02:00
ixp4xx ixp4xx: add Generic subtarget definition 2023-12-09 14:45:50 +01:00
kirkwood kirkwood: 6.6: refresh patches 2024-04-05 09:27:45 +02:00
lantiq lantiq: Fix build after kernel 5.15.150 2024-03-08 14:49:09 +01:00
layerscape treewide: disable spectre mitigation on unaffected Arm32 targets 2024-03-23 20:00:49 +01:00
malta malta: Remove kernel 5.15 configuration 2024-02-03 04:35:25 +00:00
mediatek mediatek: filogic: add support for Edgecore EAP111 2024-04-11 13:25:11 +02:00
mpc85xx mpc85xx: add 6.6 testing kernel 2024-03-24 21:20:46 +01:00
mvebu mvebu: puzzle-m90x: wipe rootfs_data on sysupgrade 2024-04-09 14:59:03 +01:00
mxs mxs: switch default kernel to 6.1 2024-03-14 14:24:16 +01:00
octeon octeon: convert to new LED color/function format where possible 2024-02-07 14:48:41 +01:00
octeontx kernel: bump 5.15 to 5.15.153 2024-03-31 18:34:04 +02:00
omap omap: drop kernel 5.15 2024-02-13 19:05:48 +01:00
oxnas kernel: bump 5.15 to 5.15.153 2024-03-31 18:34:04 +02:00
pistachio pistachio: add 6.1 testing kernel 2024-04-05 15:37:38 +02:00
qoriq qoriq: pad rootfs with zeros 2023-12-02 14:06:56 +02:00
qualcommax qualcommax: enhance smp_affinity (log, uci, syntax) 2024-04-12 13:22:12 +02:00
ramips ramips: 6.6: set testing kernel 2024-04-05 07:58:15 +02:00
realtek realtek: add support for switch Zyxel GS1900-24EP 2024-04-08 21:31:55 +02:00
rockchip rockchip: remove redundant 'console' parameter from boot script 2024-03-29 19:34:42 +01:00
sifiveu kernel: remove CONFIG_DEVTMPFS_SAFE from target config 2023-11-19 16:46:24 +01:00
starfive generic: 6.1: backport AXP PMIC support 2024-03-26 21:56:57 +01:00
sunxi sunxi: backport h616 thermal sensor support 2024-03-26 21:56:57 +01:00
tegra treewide: remove files for building 5.10 kernel 2023-05-12 13:02:43 +02:00
uml uml: restore 6.1 config + patches 2024-03-23 21:38:00 +01:00
x86 x86: geode: 6.6: add missing kernel options 2024-04-07 11:29:30 +02:00
zynq generic: enable CONFIG_ARM_CRYPTO for 32bit arm targets 2023-05-10 19:01:45 +02:00
Makefile linux: add dtb makefile target to targets list 2024-02-08 23:04:55 +01:00