Skip to content

Instantly share code, notes, and snippets.

@ayufan
Last active September 8, 2017 14:34
Show Gist options
  • Save ayufan/27c8f9d02678db2942e4bd89f4a167fd to your computer and use it in GitHub Desktop.
Save ayufan/27c8f9d02678db2942e4bd89f4a167fd to your computer and use it in GitHub Desktop.
Rock64 IRQs for Android
map_irqs() {
aff="$1"
shift
for name in $@; do
for irq in $(busybox awk -F":" "/$name/ {print \$1}" </proc/interrupts | busybox sed 's/\ //g'); do
echo $aff > "/proc/irq/$irq/smp_affinity"
done
done
}
map_irqs 2 ehci ohci dwc_otg dw-mci
map_irqs 4 xhci
map_irqs 8 eth0
CPU0 CPU1 CPU2 CPU3
6: 0 0 0 0 ROCKCHIP_GPIO_CHIP rk805
7: 0 0 0 0 rk805 rk816_pwrkey_rise
14: 0 0 0 0 rk805 rk816_pwrkey_fall
29: 0 0 0 0 GIC arch_timer
30: 169151 77349 54051 54095 GIC arch_timer
32: 29934 0 0 0 GIC ff1f0000.pdma
36: 0 0 0 0 GIC dw-mci
39: 0 0 0 0 GIC ff360000.rkvdec
41: 0 0 0 0 GIC ff350000.vpu_service, ff351000.avsd
43: 0 0 0 0 GIC ff350800.vpu_mmu
44: 7709593 0 0 0 GIC dw-mci
46: 3 0 0 0 GIC dw-mci
48: 2 0 0 0 GIC ehci_hcd:usb3
49: 49 0 0 0 GIC ohci_hcd:usb4
55: 2085204 57013 0 0 GIC dwc_otg, dwc_otg_pcd, dwc_otg_hcd:usb5
56: 99099 0 0 59232 GIC eth0
63: 0 0 0 0 GIC ff3a0800.iep_mmu, ff3a0000.iep
64: 228015 0 0 0 GIC ff373f00.vopb_mmu, vop0
65: 0 0 0 0 GIC rga
67: 2 0 0 0 GIC ff3c0000.hdmi
69: 29289 0 0 0 GIC ff160000.i2c
75: 184679 0 0 0 GIC rk_timer
82: 0 1 0 0 GIC rk_pwm_irq
90: 0 0 0 0 GIC rockchip_thermal
91: 1 0 0 0 GIC otg_bvalid
99: 7128 0 0 0 GIC xhci-hcd:usb1
103: 0 0 0 0 GIC ff3c0000.hdmi
106: 0 0 0 0 GIC ff360480.vdec_mmu
109: 0 0 0 0 GIC rockchip_u3phy
115: 0 0 0 0 GIC ff3c0000.hdmi
119: 0 0 0 0 GIC Mali_GP_MMU
120: 0 0 0 0 GIC Mali_PP0
121: 0 0 0 0 GIC Mali_PP0_MMU
122: 42202 0 0 0 GIC Mali_GP
123: 0 0 0 0 GIC Mali_PP1
124: 0 0 0 0 GIC Mali_PP1_MMU
125: 26838 0 0 0 GIC Mali_PP_Broadcast
127: 0 0 0 0 GIC ff330000.h265e
128: 0 0 0 0 GIC ff330200.h265e_mmu
129: 0 0 0 0 GIC ff340000.vepu
130: 0 0 0 0 GIC ff340800.vepu_mmu
145: 0 0 0 0 GIC debug-signal
IPI0: 139058 3639474 1029503 423558 Rescheduling interrupts
IPI1: 71 69 77 72 Function call interrupts
IPI2: 30 15 7 13 Single function call interrupts
IPI3: 0 0 0 0 CPU stop interrupts
IPI4: 0 22160 38308 23067 Timer broadcast interrupts
Err: 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment