armv8-r/gicv3: correct cpu index of irouter

interrupt routing cpu should be index not cpuset

Signed-off-by: chao an <anchao@lixiang.com>
This commit is contained in:
chao an 2024-08-30 08:35:49 +08:00 committed by Xiang Xiao
parent a722b74de7
commit cf4a92c81e

View File

@ -630,7 +630,11 @@ void up_affinity_irq(int irq, cpu_set_t cpuset)
{
if (GIC_IS_SPI(irq))
{
arm_gic_write_irouter(cpuset, irq);
/* Only support interrupt routing mode 0,
* so routing to the first cpu in cpuset.
*/
arm_gic_write_irouter(ffs(cpuset) - 1, irq);
}
}