Skip to content

Commit

Permalink
fix(gicd): fix calculation of gic's number of irqs
Browse files Browse the repository at this point in the history
Signed-off-by: Xiongfei Liu <[email protected]>
  • Loading branch information
xioliu authored and ubx1szh committed Apr 24, 2024
1 parent 1ac931a commit 4d80eea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/arch/armv8/inc/arch/gic.h
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ size_t gich_num_lrs();
static inline size_t gic_num_irqs()
{
size_t itlinenumber = bit32_extract(gicd->TYPER, GICD_TYPER_ITLN_OFF, GICD_TYPER_ITLN_LEN);
return 32 * itlinenumber + 1;
return 32 * (itlinenumber + 1);
}

static inline bool gic_is_sgi(irqid_t int_id)
Expand Down

0 comments on commit 4d80eea

Please sign in to comment.