arch/risc-v: Remove duplicated declaration for up_irq_save and up_irq_restore

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao 2020-12-18 02:52:43 +08:00 committed by Masayuki Ishikawa
parent 81a9eb190d
commit fe8122ee2b
6 changed files with 39 additions and 118 deletions

View File

@ -121,36 +121,4 @@
#define NR_IRQS (FE310_IRQ_GPIO31 + 1)
/****************************************************************************
* Public Types
****************************************************************************/
#ifndef __ASSEMBLY__
/****************************************************************************
* Public Data
****************************************************************************/
#undef EXTERN
#if defined(__cplusplus)
#define EXTERN extern "C"
extern "C"
{
#else
#define EXTERN extern
#endif
/****************************************************************************
* Public Function Prototypes
****************************************************************************/
EXTERN irqstate_t up_irq_save(void);
EXTERN void up_irq_restore(irqstate_t);
EXTERN irqstate_t up_irq_enable(void);
#undef EXTERN
#if defined(__cplusplus)
}
#endif
#endif /* __ASSEMBLY__ */
#endif /* __ARCH_RISCV_INCLUDE_FE310_IRQ_H */

View File

@ -347,10 +347,10 @@ static inline uint32_t _current_privilege(void)
*
****************************************************************************/
static inline uint32_t up_irq_save(void)
static inline irqstate_t up_irq_save(void)
{
uint32_t oldstat;
uint32_t newstat;
irqstate_t oldstat;
irqstate_t newstat;
if (_current_privilege())
{
@ -404,10 +404,10 @@ static inline void up_irq_restore(uint32_t pri)
*
****************************************************************************/
static inline uint32_t up_irq_enable(void)
static inline irqstate_t up_irq_enable(void)
{
uint32_t oldstat;
uint32_t newstat;
irqstate_t oldstat;
irqstate_t newstat;
if (_current_privilege())
{

View File

@ -57,4 +57,37 @@
# include <arch/rv64gc/irq.h>
#endif
/****************************************************************************
* Public Types
****************************************************************************/
#ifndef __ASSEMBLY__
/****************************************************************************
* Public Data
****************************************************************************/
#undef EXTERN
#if defined(__cplusplus)
#define EXTERN extern "C"
extern "C"
{
#else
#define EXTERN extern
#endif
/****************************************************************************
* Public Function Prototypes
****************************************************************************/
EXTERN irqstate_t up_irq_save(void);
EXTERN void up_irq_restore(irqstate_t);
EXTERN irqstate_t up_irq_enable(void);
#undef EXTERN
#if defined(__cplusplus)
}
#endif
#endif /* __ASSEMBLY__ */
#endif /* __ARCH_RISCV_INCLUDE_IRQ_H */

View File

@ -92,36 +92,4 @@
#define NR_IRQS (K210_IRQ_UART0 + 1)
/****************************************************************************
* Public Types
****************************************************************************/
#ifndef __ASSEMBLY__
/****************************************************************************
* Public Data
****************************************************************************/
#undef EXTERN
#if defined(__cplusplus)
#define EXTERN extern "C"
extern "C"
{
#else
#define EXTERN extern
#endif
/****************************************************************************
* Public Function Prototypes
****************************************************************************/
EXTERN irqstate_t up_irq_save(void);
EXTERN void up_irq_restore(irqstate_t);
EXTERN irqstate_t up_irq_enable(void);
#undef EXTERN
#if defined(__cplusplus)
}
#endif
#endif /* __ASSEMBLY__ */
#endif /* __ARCH_RISCV_INCLUDE_K210_IRQ_H */

View File

@ -78,36 +78,4 @@
#define NR_IRQS (LITEX_IRQ_TIMER0 + 1)
/****************************************************************************
* Public Types
****************************************************************************/
#ifndef __ASSEMBLY__
/****************************************************************************
* Public Data
****************************************************************************/
#undef EXTERN
#if defined(__cplusplus)
#define EXTERN extern "C"
extern "C"
{
#else
#define EXTERN extern
#endif
/****************************************************************************
* Public Function Prototypes
****************************************************************************/
EXTERN irqstate_t up_irq_save(void);
EXTERN void up_irq_restore(irqstate_t);
EXTERN irqstate_t up_irq_enable(void);
#undef EXTERN
#if defined(__cplusplus)
}
#endif
#endif /* __ASSEMBLY__ */
#endif /* __ARCH_RISCV_INCLUDE_LITEX_IRQ_H */

View File

@ -52,20 +52,4 @@
#define EPIC_STATUS_INT_PRI_MASK 0x01C0
#define EPIC_STATUS_INT_PRI1 0x0040
/****************************************************************************
* Public Types
****************************************************************************/
/****************************************************************************
* Public Variables
****************************************************************************/
/****************************************************************************
* Public Function Prototypes
****************************************************************************/
irqstate_t up_irq_save(void);
void up_irq_restore(irqstate_t irqstate);
irqstate_t up_irq_enable(void);
#endif /* __ARCH_RISCV_INCLUDE_NR5M100_IRQ_H */