riscv: Remove IPI functions when SMP is off

Remove ipi_get_irq() and ipi_clear_irq() when SMP is not enabled.
This commit is contained in:
Yanyan Shen 2019-08-19 14:20:06 +10:00 committed by Yanyan Shen
parent e7957006e5
commit 0a6df5fc87
2 changed files with 2 additions and 11 deletions

View file

@ -25,17 +25,6 @@ typedef enum {
void ipi_send_target(irq_t irq, word_t cpuTargetList);
irq_t ipi_get_irq(void);
void ipi_clear_irq(irq_t irq);
#else
static inline irq_t ipi_get_irq(void)
{
return irqInvalid;
}
static inline void ipi_clear_irq(irq_t irq)
{
return;
}
#endif
#endif /* __ARCH_SMP_IPI_H */

View file

@ -128,9 +128,11 @@ static irq_t getNewActiveIRQ(void)
/* Interrupt priority (high to low ): external -> software -> timer */
if (sip & BIT(SEXTERNAL_IP)) {
return plic_get_claim();
#ifdef ENABLE_SMP_SUPPORT
} else if (sip & BIT(SIPI_IP)) {
sbi_clear_ipi();
return ipi_get_irq();
#endif
} else if (sip & BIT(STIMER_IP)) {
return INTERRUPT_CORE_TIMER;
}