netdev-cpu 364 B

123456789101112131415161718192021
  1. #!/bin/sh /etc/rc.common
  2. START=99
  3. get_irq() {
  4. local name="$1"
  5. grep -m 1 "$name" /proc/interrupts | cut -d: -f1 | sed 's, *,,'
  6. }
  7. set_irq_affinity() {
  8. local name="$1"
  9. local val="$2"
  10. local irq="$(get_irq "$name")"
  11. [ -n "$irq" ] || return
  12. echo "$val" > "/proc/irq/$irq/smp_affinity"
  13. }
  14. start() {
  15. set_irq_affinity gig_switch 2
  16. set_irq_affinity gig_stat 2
  17. }