Skip to content

Commit

Permalink
lib: utils/irqchip: Avoid redundant writes to APLIC CLRIE register
Browse files Browse the repository at this point in the history
Each APLIC CLRIE register allows disabling 32 interrupt sources at
a time by writing -1 so no need to write CLRIE register separately
for each interrupt source.

Fixes: 9979265 ("lib: utils/irqchip: Add APLIC initialization library")
Signed-off-by: Anup Patel <[email protected]>
Reviewed-by: Atish Patra <[email protected]>
  • Loading branch information
avpatel committed Nov 24, 2023
1 parent 574b9c8 commit 791704c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/utils/irqchip/aplic.c
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ int aplic_cold_irqchip_init(struct aplic_data *aplic)
writel(0, (void *)(aplic->addr + APLIC_DOMAINCFG));

/* Disable all interrupts */
for (i = 0; i <= aplic->num_source; i++)
for (i = 0; i <= aplic->num_source; i += 32)
writel(-1U, (void *)(aplic->addr + APLIC_CLRIE_BASE +
(i / 32) * sizeof(u32)));

Expand Down

0 comments on commit 791704c

Please sign in to comment.