arch: common: multilevel_irq: simplification with new multilevel IRQ APIs

Use the multi-level interrupt APIs that accepts `level` as an
argument for the code where the level of the interrupt is not
known at build time.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
This commit is contained in:
Yong Cong Sin 2024-01-26 12:47:54 +08:00 committed by Johan Hedberg
commit e2bcedc3ad

View file

@ -73,7 +73,7 @@ unsigned int z_get_sw_isr_table_idx(unsigned int irq)
const unsigned int level = irq_get_level(irq);
if (intc != NULL) {
local_irq = level == 2 ? irq_from_level_2(irq) : irq_from_level_3(irq);
local_irq = irq_from_level(irq, level);
__ASSERT_NO_MSG(local_irq < CONFIG_MAX_IRQ_PER_AGGREGATOR);
table_idx = intc->offset + local_irq;