blob: d5edafebc2555d55a37ca0a09306898ced9575de [file] [log] [blame]
Austin Schuhc0ec2a82022-02-24 17:26:29 -08001#!/bin/bash
2
3set -e
4
5function chrtirq() {
6 PIDS="$(ps -ef | grep "\\[$1\\]" | awk '{print $2}')"
7
8 for PID in $PIDS; do
9 chrt $2 -p $3 "${PID}"
10
11 ps -q "${PID}" -o comm= | tr -d '[:space:]'
12 echo -n " "
13 chrt -p "${PID}"
14 done
15
16 if [ -z "${PID}" ]; then
17 echo "No such IRQ ${1}"
18 fi
19}
20
21chrtirq "irq/[0-9]*-fe00b880" -f 50
22chrtirq "irq/[0-9]*-fe204000" -f 60
23chrtirq "irq/[0-9]*-adis1650" -f 61
24chrtirq "irq/[0-9]*-xhci_hcd" -f 1
25chrtirq "irq/[0-9]*-VCHIQ do" -o 0
26chrtirq "irq/[0-9]*-DMA IRQ" -f 50
27chrtirq "irq/[0-9]*-mmc1" -o 0
28chrtirq "irq/[0-9]*-mmc0" -o 0
29chrtirq "irq/[0-9]*-s-mmc0" -o 0
30chrtirq "irq/[0-9]*-v3d" -o 0
31chrtirq "irq/24-vc4 hvs" -o 0
32chrtirq "irq/[0-9]*-vc4 hdmi" -o 0
33chrtirq "irq/[0-9]*-s-vc4 hd" -o 0
34chrtirq "irq/19-fe004000" -f 50
35chrtirq "irq/[0-9]*-vc4 crtc" -o 0
36chrtirq "irq/23-uart-pl0" -o 0
37chrtirq "irq/[0-9]*-eth0" -f 10
James Kuszmaul5601d3f2022-03-25 21:07:13 -070038
39# Route data-ready interrupts to the second core
40SPI_IRQ="$(cat /proc/interrupts | grep fe204000.spi | awk '{print $1}' | grep '[0-9]*' -o)"
41echo 2 > /proc/irq/"${SPI_IRQ}"/smp_affinity