device_google_gs201/set_usb_irq.sh
Ray Chi 4f30e468e4 modify the path of shell binary
Currently, we should use the vendor shell to run irq script.
This patch will modify the shell path.

Bug: 202103325
Test: switch functions and check the value of smp_affinity_list
Change-Id: Iae572bb1ee218eb205c5e65d20ba6dfa583b9ad6
Merged-In: Iae572bb1ee218eb205c5e65d20ba6dfa583b9ad6
(cherry picked from commit e4796c373c)
2022-02-21 18:22:53 +00:00

16 lines
444 B
Bash

#!/vendor/bin/sh
# Switch into /proc/irq/$IRQ for the dwc3 usb controller
cd /proc/irq/*/dwc3/.. || exit 7
# Move the USB Controller (DWC3) interrupt as requested
# Modem and DIT are on 0/2/5 depending on throughput, so avoid those.
# 0-3 small, 4-5 medium, 6-7 big
case "$1" in
medium) core=4;;
big) core=6;;
*) core=0;;
esac
# This can sometimes fail due to smp_affinity_list no longer existing...
echo "${core}" > smp_affinity_list