Hi All, just discovered this great project. Awesome to see it's so well frequented.
I'm trying to do some realtime data acquisition on a OPi one with Armbian Debian Stretch. Following on from the link at the bottom, I'm trying to set an interrupt handler in my loadable kernel module onto a seperate core that I've isolated from the normal scheduler (using isolcpus=2,3 in boot.cmd/.scr).
I've built the kernel using the Vagrant instructions with the 4.19.50 RT22 realtime patches. But I've also tested with no luck on the standard build from the download page.
I'm using the irq_set_affinity_hint in the following manner, but it has no effect on core affinity as seen by cat /proc/interrupts. The handler still runs on core 0 and cat /proc/irq/61/smp_affinity still reports 0xF (i.e. any core).
result = request_irq(irq_number,
(irq_handler_t) test_irq_handler,
IRQF_TRIGGER_RISING,
"test_irq_handler",
NULL);
irq_set_affinity_hint(irq_number, cpumask_of(3));
Also trying to change the IRQ affinity via the filesystem (i.e. sudo echo 3 >/proc/irq/61/smp_affinity) always just results in a permission error.
EDIT: actually not a permission error as such, but "write error: Input/output error"
In the link below ChrisK has a patch to enable irq_set_affinity_hint to work properly. However those changes have been incorporated as can be seen in manage.c.
Looking through the kernel source I can't see a reason for it not working, so I'm wondering if there's some other service that's blocking it? I believe from reading around Ubuntu normally has an IRQ leveling service, but I can't see anything like that on Armbian Stretch (although I could easily be missing something.)
Thanks!