openwrt/target/linux/realtek
INAGAKI Hiroshi 614bba0958 realtek: use irq_force_affinity on otto timer instead
After commit e0d2c59ee995 ("genirq: Always limit the affinity to online
CPUs", 5.10) on Linux, the cpumask passed to irq_set_affinity of irqchip
driver is limited to online CPUs. When irq_do_set_affinity called from
otto timer driver with only one secondary CPU, that CPU is not marked as
online yet, filtered out by cpu_online_mask and fall to error path.
Then, fail to set affinity for that CPU and it leads to instability of
timer on secondary CPU(s).

At least, RTL839x system will be affected.

log:

[   37.560020] rcu: INFO: rcu_sched detected stalls on CPUs/tasks:
[   37.638025] rcu:     1-...!: (0 ticks this GP) idle=6ac/0/0x0 softirq=0/0 fqs=1  (false positive?)
[   37.752683]  (detected by 0, t=6002 jiffies, g=-1179, q=26293)
[   37.829510] Sending NMI from CPU 0 to CPUs 1:
[   37.886857] NMI backtrace for cpu 1 skipped: idling at r4k_wait_irqoff+0x1c/0x24
[   37.984801] rcu: rcu_sched kthread timer wakeup didn't happen for 5999 jiffies! g-1179 f0x0 RCU_GP_WAIT_FQS(5) ->state=0x402
[   38.132743] rcu:     Possible timer handling issue on cpu=1 timer-softirq=0
[   38.221033] rcu: rcu_sched kthread starved for 6000 jiffies! g-1179 f0x0 RCU_GP_WAIT_FQS(5) ->state=0x402 ->cpu=1
[   38.356336] rcu:     Unless rcu_sched kthread gets sufficient CPU time, OOM is now expected behavior.
[   38.474440] rcu: RCU grace-period kthread stack dump:
...

Replace to irq_force_affinity from irq_set_affinity and ignore
cpu_online_mask to fix the issue.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Tested-by: Olliver Schinagl <oliver@schinagl.nl>
2023-01-21 19:58:24 +01:00
..
base-files realtek: add support for TP-Link SG2210P 2022-09-13 09:22:26 +02:00
dts-5.10 realtek: add support for Netgear GS750E 2023-01-13 22:28:36 +01:00
dts-5.15 realtek: add support for Netgear GS750E 2023-01-13 22:28:36 +01:00
files/firmware/rtl838x_phy realtek: update the tree to the latest refactored version 2020-11-26 13:29:27 +01:00
files-5.10 realtek: use irq_force_affinity on otto timer instead 2023-01-21 19:58:24 +01:00
files-5.15 realtek: use irq_force_affinity on otto timer instead 2023-01-21 19:58:24 +01:00
image realtek: add support for Netgear GS750E 2023-01-13 22:28:36 +01:00
patches-5.10 kernel: Refresh kernel patches 2023-01-07 14:53:10 +01:00
patches-5.15 kernel: Refresh kernel patches 2023-01-08 14:55:44 +01:00
profiles target: use SPDX license identifiers on Makefiles 2021-02-10 15:47:18 +01:00
rtl838x realtek: Disable boston clock 2023-01-01 22:31:20 +01:00
rtl839x realtek: rtl839x: enable driver for virtual mtd_concat devices in config 2023-01-13 22:22:38 +01:00
rtl930x realtek: Disable boston clock 2023-01-01 22:31:20 +01:00
rtl931x realtek: Disable boston clock 2023-01-01 22:31:20 +01:00
Makefile realtek: Cleanup Makefiles 2022-12-27 16:33:15 +01:00