pussuw commented on a change in pull request #5758:
URL: https://github.com/apache/incubator-nuttx/pull/5758#discussion_r828830605
##########
File path: arch/risc-v/src/mpfs/mpfs_irq.c
##########
@@ -238,22 +192,11 @@ void up_enable_irq(int irq)
/* Set enable bit for the irq */
- uint64_t hart_id = READ_CSR(mhartid);
- uintptr_t miebase;
-
- if (hart_id == 0)
- {
- miebase = MPFS_PLIC_H0_MIE0;
- }
- else
- {
- miebase = MPFS_PLIC_H1_MIE0 +
- ((hart_id - 1) * MPFS_HART_MIE_OFFSET);
- }
+ uintptr_t iebase = mpfs_plic_get_iebase();
if (0 <= extirq && extirq <= NR_IRQS - MPFS_IRQ_EXT_START)
{
- modifyreg32(miebase + (4 * (extirq / 32)), 0, 1 << (extirq % 32));
+ modifyreg32(iebase + (4 * (extirq / 32)), 0, 1 << (extirq % 32));
Review comment:
I'll modify the init function
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]