software/irq: cleanup and make explicit that irqs are not supported with Microwatt and SERV, fix compilation warning.

This commit is contained in:
Florent Kermarrec 2020-04-27 13:46:12 +02:00
parent fb9e369a19
commit 1d1a4ecd28
2 changed files with 19 additions and 19 deletions

View file

@ -65,7 +65,7 @@ void isr(void)
void isr(void); void isr(void);
void isr(void) void isr(void)
{ {
unsigned int irqs; __attribute__((unused)) unsigned int irqs;
irqs = irq_pending() & irq_getmask(); irqs = irq_pending() & irq_getmask();

View file

@ -72,11 +72,11 @@ static inline unsigned int irq_getie(void)
#elif defined (__rocket__) #elif defined (__rocket__)
return (csrr(mstatus) & CSR_MSTATUS_MIE) != 0; return (csrr(mstatus) & CSR_MSTATUS_MIE) != 0;
#elif defined (__microwatt__) #elif defined (__microwatt__)
return 0; // FIXME return 0; /* No interrupt support on Microwatt */
#elif defined (__blackparrot__) #elif defined (__blackparrot__)
return (csrr(mstatus) & CSR_MSTATUS_MIE) != 0;//TODO return (csrr(mstatus) & CSR_MSTATUS_MIE) != 0; /* FIXME */
#elif defined (__serv__) #elif defined (__serv__)
return 0; /* FIXME */ return 0; /* No interrupt support on SERV */
#else #else
#error Unsupported architecture #error Unsupported architecture
#endif #endif
@ -103,11 +103,11 @@ static inline void irq_setie(unsigned int ie)
#elif defined (__rocket__) #elif defined (__rocket__)
if(ie) csrs(mstatus,CSR_MSTATUS_MIE); else csrc(mstatus,CSR_MSTATUS_MIE); if(ie) csrs(mstatus,CSR_MSTATUS_MIE); else csrc(mstatus,CSR_MSTATUS_MIE);
#elif defined (__microwatt__) #elif defined (__microwatt__)
// FIXME /* No interrupt support on Microwatt */
#elif defined (__blackparrot__) #elif defined (__blackparrot__)
if(ie) csrs(mstatus,CSR_MSTATUS_MIE); else csrc(mstatus,CSR_MSTATUS_MIE);//TODO:BP if(ie) csrs(mstatus,CSR_MSTATUS_MIE); else csrc(mstatus,CSR_MSTATUS_MIE); /* FIXME */
#elif defined (__serv__) #elif defined (__serv__)
/* FIXME */ /* No interrupt support on SERV */
#else #else
#error Unsupported architecture #error Unsupported architecture
#endif #endif
@ -136,11 +136,11 @@ static inline unsigned int irq_getmask(void)
#elif defined (__rocket__) #elif defined (__rocket__)
return *((unsigned int *)PLIC_ENABLED) >> 1; return *((unsigned int *)PLIC_ENABLED) >> 1;
#elif defined (__microwatt__) #elif defined (__microwatt__)
return 0; // FIXME return 0; /* No interrupt support on Microwatt */
#elif defined (__blackparrot__) #elif defined (__blackparrot__)
//TODO:BP
#elif defined (__serv__)
return 0; /* FIXME */ return 0; /* FIXME */
#elif defined (__serv__)
return 0; /* No interrupt support on SERV */
#else #else
#error Unsupported architecture #error Unsupported architecture
#endif #endif
@ -163,11 +163,11 @@ static inline void irq_setmask(unsigned int mask)
#elif defined (__rocket__) #elif defined (__rocket__)
*((unsigned int *)PLIC_ENABLED) = mask << 1; *((unsigned int *)PLIC_ENABLED) = mask << 1;
#elif defined (__microwatt__) #elif defined (__microwatt__)
// FIXME /* No interrupt support on Microwatt */
#elif defined (__blackparrot__) #elif defined (__blackparrot__)
//TODO:BP
#elif defined (__serv__)
/* FIXME */ /* FIXME */
#elif defined (__serv__)
/* No interrupt support on SERV */
#else #else
#error Unsupported architecture #error Unsupported architecture
#endif #endif
@ -194,11 +194,11 @@ static inline unsigned int irq_pending(void)
#elif defined (__rocket__) #elif defined (__rocket__)
return *((unsigned int *)PLIC_PENDING) >> 1; return *((unsigned int *)PLIC_PENDING) >> 1;
#elif defined (__microwatt__) #elif defined (__microwatt__)
return 0; // FIXME return 0; /* No interrupt support on Microwatt */
#elif defined (__blackparrot__) #elif defined (__blackparrot__)
return csr_readl(PLIC_PENDING) >> 1;//TODO:BP return csr_readl(PLIC_PENDING) >> 1; /* FIXME */
#elif defined (__serv__) #elif defined (__serv__)
return 0;/* FIXME */ return 0; /* No interrupt support on SERV */
#else #else
#error Unsupported architecture #error Unsupported architecture
#endif #endif