Skip to content

Commit

Permalink
fix(reg-size): Change the size of the shift to comply with word size
Browse files Browse the repository at this point in the history
Signed-off-by: Miguel Silva <[email protected]>
  • Loading branch information
miguelafsilva5 authored and josecm committed Oct 18, 2024
1 parent 869b24c commit 3c244e5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/arch/riscv/irqc/aia/imsic.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ void imsic_init(void)
void imsic_set_enbl(irqid_t intp_id)
{
csrs_siselect_write(IMSIC_EIE + imsic_eie_index(intp_id));
csrs_sireg_set(1ULL << imsic_eie_bit(intp_id));
csrs_sireg_set(1UL << imsic_eie_bit(intp_id));
}

bool imsic_get_pend(irqid_t intp_id)
Expand All @@ -65,7 +65,7 @@ bool imsic_get_pend(irqid_t intp_id)
void imsic_clr_pend(irqid_t intp_id)
{
csrs_siselect_write(IMSIC_EIP + imsic_eie_index(intp_id));
csrs_sireg_clear(1ULL << imsic_eie_bit(intp_id));
csrs_sireg_clear(1UL << imsic_eie_bit(intp_id));
}

/**
Expand All @@ -77,7 +77,7 @@ void imsic_inject_pend(size_t guest_file, irqid_t intp_id)
UNUSED_ARG(guest_file);

csrs_vsiselect_write(IMSIC_EIP + imsic_eie_index(intp_id));
csrs_vsireg_clear(1ULL << imsic_eie_bit(intp_id));
csrs_vsireg_clear(1UL << imsic_eie_bit(intp_id));
}

void imsic_send_msi(cpuid_t target_cpu, irqid_t ipi_id)
Expand Down

0 comments on commit 3c244e5

Please sign in to comment.