3 [ "$ACTION" = add
] ||
exit
10 # wait up to 10 seconds for the irq/device to appear
11 while [ "${seconds}" -le 10 ]; do
12 line
=$
(grep -E -m 1 "${device}\$" /proc
/interrupts
) && break
13 seconds
="$(( seconds + 2 ))"
16 echo ${line} |
sed 's/:.*//'
19 set_interface_core
() {
24 [ -z "${device}" ] && device
="$interface"
26 local irq
=$
(get_device_irq
"$device")
28 echo "${core_mask}" > /proc
/irq
/${irq}/smp_affinity
31 case "$(board_name)" in
32 friendlyarm
,nanopi-r2c|\
33 friendlyarm
,nanopi-r2c-plus|\
34 friendlyarm
,nanopi-r2s|\
35 xunlong
,orangepi-r1-plus|\
36 xunlong
,orangepi-r1-plus-lts
)
37 set_interface_core
2 "eth0"
38 set_interface_core
4 "eth1" "xhci-hcd:usb[0-9]+"
40 friendlyarm
,nanopi-r4s
)
41 set_interface_core
10 "eth0"
42 set_interface_core
20 "eth1"
44 friendlyarm
,nanopi-r5c
)
45 set_interface_core
2 "eth0"
46 set_interface_core
4 "eth1"
48 friendlyarm
,nanopi-r5s
)
49 set_interface_core
2 "eth0"
50 set_interface_core
4 "eth1"
51 set_interface_core
8 "eth2"