Skip to content

Commit

Permalink
ARC: SMP: fix IDU mask setup
Browse files Browse the repository at this point in the history
Fix IDU mask setup:
 * fix GENMASK usage to avoid generating mask to one extra cpu (which
   doesn't exist in configuration)
 * use arch_num_cpus() instead of CONFIG_MP_NUM_CPUS to allow having
   some cpu's disabled (with detection in runtime)

Signed-off-by: Eugeniy Paltsev <[email protected]>
Signed-off-by: Evgeniy Paltsev <[email protected]>
  • Loading branch information
evgeniy-paltsev authored and aescolar committed Mar 21, 2023
1 parent 9889e8e commit 16e9362
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/interrupt_controller/intc_arcv2_irq_unit.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ static int arc_shared_intc_update_post_smp(const struct device *unused)

for (uint32_t i = 0; i < (CONFIG_NUM_IRQS - ARC_CONNECT_IDU_IRQ_START); i++) {
/* TODO: take arc_connect_spinlock one time to avoid locking/unlocking every time */
z_arc_connect_idu_set_dest(i, GENMASK(CONFIG_MP_NUM_CPUS, 0));
z_arc_connect_idu_set_dest(i, GENMASK((arch_num_cpus() - 1), 0));
}

z_arc_connect_idu_enable();
Expand Down

0 comments on commit 16e9362

Please sign in to comment.