大家好,最近我在用树莓派3做实时系统控制。
遇到一个问题,就是irq中断必须不能受到其他进程的干扰,所以我想将irq中断绑定到固定的一个核上面。
但是出现以下问题
# echo 3 > /proc/irq/52/smp_affinity
bash: echo: write error: Input/output error
下面是网上搜来的,貌似是硬件问题无法set_affinity.请问大神还有其他解决办法吗
Hardware IRQ affinity isn't possible due to the way that the interrupt controller has been implemented.
Because the entirety of the hardware apart from the A7s is untouched, the BCM2835 interrupt routing is still in place. This exposes two lines (nIRQ and nFIQ) that go into the A7 interrupt routing. There is no vectored interrupt controller implemented for the A7s - a simple register-based interface is used to route the global top-level interrupt to a specific core, therefore a single core will get all interrupts and have to service them.
You could reconfigure this on-the-fly (for example, on entry to the top-level IRQ handler) to have some sort of distributed handling, servicing each successive interrupt on a different core, but the benefits of this are debatable. |