arch/irq.h: update all inline to inline_function

Inline & inline_function both used make confuze, let's modify all inline
in irq.h to inline_function, also clear the always_inline_funcion
declaration.

Signed-off-by: buxiasen <buxiasen@xiaomi.com>
This commit is contained in:
buxiasen 2025-01-02 16:26:26 +08:00 committed by Xiang Xiao
parent 1bc2e1a175
commit 9bdcc4dc4b
35 changed files with 220 additions and 257 deletions

View file

@ -177,7 +177,7 @@ extern volatile bool g_interrupt_context[CONFIG_SMP_NCPUS];
/* Save the current interrupt enable state & disable IRQs. */
static inline irqstate_t up_irq_save(void)
static inline_function irqstate_t up_irq_save(void)
{
unsigned int flags;
unsigned int temp;
@ -194,7 +194,7 @@ static inline irqstate_t up_irq_save(void)
/* Restore saved IRQ & FIQ state */
static inline void up_irq_restore(irqstate_t flags)
static inline_function void up_irq_restore(irqstate_t flags)
{
__asm__ __volatile__
(
@ -206,7 +206,7 @@ static inline void up_irq_restore(irqstate_t flags)
/* Enable IRQs and return the previous IRQ state */
static inline irqstate_t up_irq_enable(void)
static inline_function irqstate_t up_irq_enable(void)
{
unsigned int flags;
unsigned int temp;

View file

@ -209,8 +209,7 @@ struct xcptcontext
/* Get/set the PRIMASK register */
static inline uint8_t getprimask(void) always_inline_function;
static inline uint8_t getprimask(void)
static always_inline_function uint8_t getprimask(void)
{
uint32_t primask;
__asm__ __volatile__
@ -223,8 +222,7 @@ static inline uint8_t getprimask(void)
return (uint8_t)primask;
}
static inline void setprimask(uint32_t primask) always_inline_function;
static inline void setprimask(uint32_t primask)
static always_inline_function void setprimask(uint32_t primask)
{
__asm__ __volatile__
(
@ -236,16 +234,14 @@ static inline void setprimask(uint32_t primask)
/* Disable IRQs */
static inline void up_irq_disable(void) always_inline_function;
static inline void up_irq_disable(void)
static always_inline_function void up_irq_disable(void)
{
__asm__ __volatile__ ("\tcpsid i\n");
}
/* Save the current primask state & disable IRQs */
static inline irqstate_t up_irq_save(void) always_inline_function;
static inline irqstate_t up_irq_save(void)
static always_inline_function irqstate_t up_irq_save(void)
{
unsigned short primask;
@ -266,16 +262,14 @@ static inline irqstate_t up_irq_save(void)
/* Enable IRQs */
static inline void up_irq_enable(void) always_inline_function;
static inline void up_irq_enable(void)
static always_inline_function void up_irq_enable(void)
{
__asm__ __volatile__ ("\tcpsie i\n");
}
/* Restore saved primask state */
static inline void up_irq_restore(irqstate_t flags) always_inline_function;
static inline void up_irq_restore(irqstate_t flags)
static always_inline_function void up_irq_restore(irqstate_t flags)
{
/* If bit 0 of the primask is 0, then we need to restore
* interrupts.
@ -291,8 +285,7 @@ static inline void up_irq_restore(irqstate_t flags)
/* Get/set IPSR */
static inline uint32_t getipsr(void) always_inline_function;
static inline uint32_t getipsr(void)
static always_inline_function uint32_t getipsr(void)
{
uint32_t ipsr;
__asm__ __volatile__
@ -307,8 +300,7 @@ static inline uint32_t getipsr(void)
/* Get/set CONTROL */
static inline uint32_t getcontrol(void) always_inline_function;
static inline uint32_t getcontrol(void)
static always_inline_function uint32_t getcontrol(void)
{
uint32_t control;
__asm__ __volatile__
@ -321,8 +313,7 @@ static inline uint32_t getcontrol(void)
return control;
}
static inline void setcontrol(uint32_t control) always_inline_function;
static inline void setcontrol(uint32_t control)
static always_inline_function void setcontrol(uint32_t control)
{
__asm__ __volatile__
(
@ -344,7 +335,7 @@ static inline void setcontrol(uint32_t control)
int up_cpu_index(void) noinstrument_function;
#endif /* CONFIG_ARCH_HAVE_MULTICPU */
static inline_function uint32_t up_getsp(void)
static always_inline_function uint32_t up_getsp(void)
{
register uint32_t sp;
@ -357,8 +348,7 @@ static inline_function uint32_t up_getsp(void)
return sp;
}
noinstrument_function
static inline_function bool up_interrupt_context(void)
static always_inline_function bool up_interrupt_context(void)
{
return getipsr() != 0;
}

View file

@ -343,7 +343,7 @@ struct xcptcontext
/* Return the current IRQ state */
static inline irqstate_t irqstate(void)
static inline_function irqstate_t irqstate(void)
{
unsigned int cpsr;
@ -360,7 +360,7 @@ static inline irqstate_t irqstate(void)
/* Disable IRQs and return the previous IRQ state */
noinstrument_function static inline irqstate_t up_irq_save(void)
noinstrument_function static inline_function irqstate_t up_irq_save(void)
{
unsigned int cpsr;
@ -382,7 +382,7 @@ noinstrument_function static inline irqstate_t up_irq_save(void)
/* Enable IRQs and return the previous IRQ state */
static inline irqstate_t up_irq_enable(void)
static inline_function irqstate_t up_irq_enable(void)
{
unsigned int cpsr;
@ -406,7 +406,7 @@ static inline irqstate_t up_irq_enable(void)
/* Disable IRQs and return the previous IRQ state */
static inline irqstate_t up_irq_disable(void)
static inline_function irqstate_t up_irq_disable(void)
{
unsigned int cpsr;
@ -424,7 +424,8 @@ static inline irqstate_t up_irq_disable(void)
/* Restore saved IRQ & FIQ state */
noinstrument_function static inline void up_irq_restore(irqstate_t flags)
noinstrument_function static inline_function
void up_irq_restore(irqstate_t flags)
{
__asm__ __volatile__
(

View file

@ -267,8 +267,7 @@ struct xcptcontext
/* Get/set the PRIMASK register */
static inline uint8_t getprimask(void) always_inline_function;
static inline uint8_t getprimask(void)
static always_inline_function uint8_t getprimask(void)
{
uint32_t primask;
__asm__ __volatile__
@ -281,8 +280,7 @@ static inline uint8_t getprimask(void)
return (uint8_t)primask;
}
static inline void setprimask(uint32_t primask) always_inline_function;
static inline void setprimask(uint32_t primask)
static always_inline_function void setprimask(uint32_t primask)
{
__asm__ __volatile__
(
@ -292,14 +290,12 @@ static inline void setprimask(uint32_t primask)
: "memory");
}
static inline void cpsie(void) always_inline_function;
static inline void cpsie(void)
static always_inline_function void cpsie(void)
{
__asm__ __volatile__ ("\tcpsie i\n");
}
static inline void cpsid(void) always_inline_function;
static inline void cpsid(void)
static always_inline_function void cpsid(void)
{
__asm__ __volatile__ ("\tcpsid i\n");
}
@ -310,8 +306,7 @@ static inline void cpsid(void)
* lower priority level as the BASEPRI value.
*/
static inline uint8_t getbasepri(void) always_inline_function;
static inline uint8_t getbasepri(void)
static always_inline_function uint8_t getbasepri(void)
{
uint32_t basepri;
@ -325,8 +320,7 @@ static inline uint8_t getbasepri(void)
return (uint8_t)basepri;
}
static inline void setbasepri(uint32_t basepri) always_inline_function;
static inline void setbasepri(uint32_t basepri)
static always_inline_function void setbasepri(uint32_t basepri)
{
__asm__ __volatile__
(
@ -343,8 +337,7 @@ static inline void setbasepri(uint32_t basepri)
* 837070 Workaround may be required if we are raising the priority.
*/
static inline void raisebasepri(uint32_t basepri) always_inline_function;
static inline void raisebasepri(uint32_t basepri)
static always_inline_function void raisebasepri(uint32_t basepri)
{
register uint32_t primask;
@ -378,8 +371,7 @@ static inline void raisebasepri(uint32_t basepri)
/* Disable IRQs */
static inline void up_irq_disable(void) always_inline_function;
static inline void up_irq_disable(void)
static always_inline_function void up_irq_disable(void)
{
/* Probably raising priority */
@ -388,9 +380,7 @@ static inline void up_irq_disable(void)
/* Save the current primask state & disable IRQs */
static inline irqstate_t up_irq_save(void)
always_inline_function noinstrument_function;
static inline irqstate_t up_irq_save(void)
static always_inline_function irqstate_t up_irq_save(void)
{
/* Probably raising priority */
@ -401,8 +391,7 @@ static inline irqstate_t up_irq_save(void)
/* Enable IRQs */
static inline void up_irq_enable(void) always_inline_function;
static inline void up_irq_enable(void)
static always_inline_function void up_irq_enable(void)
{
/* In this case, we are always retaining or lowering the priority value */
@ -412,9 +401,7 @@ static inline void up_irq_enable(void)
/* Restore saved primask state */
static inline void up_irq_restore(irqstate_t flags)
always_inline_function noinstrument_function;
static inline void up_irq_restore(irqstate_t flags)
static always_inline_function void up_irq_restore(irqstate_t flags)
{
/* In this case, we are always retaining or lowering the priority value */
@ -423,8 +410,7 @@ static inline void up_irq_restore(irqstate_t flags)
/* Get/set IPSR */
static inline uint32_t getipsr(void) always_inline_function;
static inline uint32_t getipsr(void)
static always_inline_function uint32_t getipsr(void)
{
uint32_t ipsr;
__asm__ __volatile__
@ -439,8 +425,7 @@ static inline uint32_t getipsr(void)
/* Get/set FAULTMASK */
static inline uint32_t getfaultmask(void) always_inline_function;
static inline uint32_t getfaultmask(void)
static always_inline_function uint32_t getfaultmask(void)
{
uint32_t faultmask;
__asm__ __volatile__
@ -453,8 +438,7 @@ static inline uint32_t getfaultmask(void)
return faultmask;
}
static inline void setfaultmask(uint32_t faultmask) always_inline_function;
static inline void setfaultmask(uint32_t faultmask)
static always_inline_function void setfaultmask(uint32_t faultmask)
{
__asm__ __volatile__
(
@ -466,8 +450,7 @@ static inline void setfaultmask(uint32_t faultmask)
/* Get/set CONTROL */
static inline uint32_t getcontrol(void) always_inline_function;
static inline uint32_t getcontrol(void)
static always_inline_function uint32_t getcontrol(void)
{
uint32_t control;
__asm__ __volatile__
@ -480,8 +463,7 @@ static inline uint32_t getcontrol(void)
return control;
}
static inline void setcontrol(uint32_t control) always_inline_function;
static inline void setcontrol(uint32_t control)
static always_inline_function void setcontrol(uint32_t control)
{
__asm__ __volatile__
(
@ -503,7 +485,7 @@ static inline void setcontrol(uint32_t control)
int up_cpu_index(void) noinstrument_function;
#endif /* CONFIG_ARCH_HAVE_MULTICPU */
static inline_function uint32_t up_getsp(void)
static always_inline_function uint32_t up_getsp(void)
{
register uint32_t sp;
@ -516,8 +498,7 @@ static inline_function uint32_t up_getsp(void)
return sp;
}
noinstrument_function
static inline_function bool up_interrupt_context(void)
static always_inline_function bool up_interrupt_context(void)
{
return getipsr() != 0;
}

View file

@ -342,7 +342,7 @@ struct xcptcontext
/* Return the current IRQ state */
static inline irqstate_t irqstate(void)
static inline_function irqstate_t irqstate(void)
{
unsigned int cpsr;
@ -359,7 +359,7 @@ static inline irqstate_t irqstate(void)
/* Disable IRQs and return the previous IRQ state */
noinstrument_function static inline irqstate_t up_irq_save(void)
noinstrument_function static inline_function irqstate_t up_irq_save(void)
{
unsigned int cpsr;
@ -380,7 +380,7 @@ noinstrument_function static inline irqstate_t up_irq_save(void)
/* Enable IRQs and return the previous IRQ state */
static inline irqstate_t up_irq_enable(void)
static inline_function irqstate_t up_irq_enable(void)
{
unsigned int cpsr;
@ -401,7 +401,7 @@ static inline irqstate_t up_irq_enable(void)
/* Disable IRQs and return the previous IRQ state */
static inline irqstate_t up_irq_disable(void)
static inline_function irqstate_t up_irq_disable(void)
{
unsigned int cpsr;
@ -419,7 +419,8 @@ static inline irqstate_t up_irq_disable(void)
/* Restore saved IRQ & FIQ state */
noinstrument_function static inline void up_irq_restore(irqstate_t flags)
noinstrument_function static inline_function
void up_irq_restore(irqstate_t flags)
{
__asm__ __volatile__
(

View file

@ -278,8 +278,7 @@ struct xcptcontext
/* Get/set the PRIMASK register */
static inline uint8_t getprimask(void) always_inline_function;
static inline uint8_t getprimask(void)
static always_inline_function uint8_t getprimask(void)
{
uint32_t primask;
__asm__ __volatile__
@ -292,8 +291,7 @@ static inline uint8_t getprimask(void)
return (uint8_t)primask;
}
static inline void setprimask(uint32_t primask) always_inline_function;
static inline void setprimask(uint32_t primask)
static always_inline_function void setprimask(uint32_t primask)
{
__asm__ __volatile__
(
@ -303,14 +301,12 @@ static inline void setprimask(uint32_t primask)
: "memory");
}
static inline void cpsie(void) always_inline_function;
static inline void cpsie(void)
static always_inline_function void cpsie(void)
{
__asm__ __volatile__ ("\tcpsie i\n");
}
static inline void cpsid(void) always_inline_function;
static inline void cpsid(void)
static always_inline_function void cpsid(void)
{
__asm__ __volatile__ ("\tcpsid i\n");
}
@ -321,8 +317,7 @@ static inline void cpsid(void)
* lower priority level as the BASEPRI value.
*/
static inline uint8_t getbasepri(void) always_inline_function;
static inline uint8_t getbasepri(void)
static always_inline_function uint8_t getbasepri(void)
{
uint32_t basepri;
@ -336,8 +331,7 @@ static inline uint8_t getbasepri(void)
return (uint8_t)basepri;
}
static inline void setbasepri(uint32_t basepri) always_inline_function;
static inline void setbasepri(uint32_t basepri)
static always_inline_function void setbasepri(uint32_t basepri)
{
__asm__ __volatile__
(
@ -351,8 +345,7 @@ static inline void setbasepri(uint32_t basepri)
/* Disable IRQs */
static inline void up_irq_disable(void) always_inline_function;
static inline void up_irq_disable(void)
static always_inline_function void up_irq_disable(void)
{
/* Probably raising priority */
@ -361,9 +354,7 @@ static inline void up_irq_disable(void)
/* Save the current primask state & disable IRQs */
static inline irqstate_t up_irq_save(void)
always_inline_function noinstrument_function;
static inline irqstate_t up_irq_save(void)
static always_inline_function irqstate_t up_irq_save(void)
{
/* Probably raising priority */
@ -374,8 +365,7 @@ static inline irqstate_t up_irq_save(void)
/* Enable IRQs */
static inline void up_irq_enable(void) always_inline_function;
static inline void up_irq_enable(void)
static always_inline_function void up_irq_enable(void)
{
/* In this case, we are always retaining or lowering the priority value */
@ -385,9 +375,8 @@ static inline void up_irq_enable(void)
/* Restore saved primask state */
static inline void up_irq_restore(irqstate_t flags)
always_inline_function noinstrument_function;
static inline void up_irq_restore(irqstate_t flags)
static always_inline_function
void up_irq_restore(irqstate_t flags)
{
/* In this case, we are always retaining or lowering the priority value */
@ -396,8 +385,7 @@ static inline void up_irq_restore(irqstate_t flags)
/* Get/set IPSR */
static inline uint32_t getipsr(void) always_inline_function;
static inline uint32_t getipsr(void)
static always_inline_function uint32_t getipsr(void)
{
uint32_t ipsr;
__asm__ __volatile__
@ -412,8 +400,7 @@ static inline uint32_t getipsr(void)
/* Get/set FAULTMASK */
static inline uint32_t getfaultmask(void) always_inline_function;
static inline uint32_t getfaultmask(void)
static always_inline_function uint32_t getfaultmask(void)
{
uint32_t faultmask;
__asm__ __volatile__
@ -426,8 +413,7 @@ static inline uint32_t getfaultmask(void)
return faultmask;
}
static inline void setfaultmask(uint32_t faultmask) always_inline_function;
static inline void setfaultmask(uint32_t faultmask)
static always_inline_function void setfaultmask(uint32_t faultmask)
{
__asm__ __volatile__
(
@ -439,8 +425,7 @@ static inline void setfaultmask(uint32_t faultmask)
/* Get/set CONTROL */
static inline uint32_t getcontrol(void) always_inline_function;
static inline uint32_t getcontrol(void)
static always_inline_function uint32_t getcontrol(void)
{
uint32_t control;
__asm__ __volatile__
@ -453,8 +438,7 @@ static inline uint32_t getcontrol(void)
return control;
}
static inline void setcontrol(uint32_t control) always_inline_function;
static inline void setcontrol(uint32_t control)
static always_inline_function void setcontrol(uint32_t control)
{
__asm__ __volatile__
(
@ -476,7 +460,7 @@ static inline void setcontrol(uint32_t control)
int up_cpu_index(void) noinstrument_function;
#endif /* CONFIG_ARCH_HAVE_MULTICPU */
static inline_function uint32_t up_getsp(void)
static always_inline_function uint32_t up_getsp(void)
{
uint32_t sp;
@ -489,8 +473,7 @@ static inline_function uint32_t up_getsp(void)
return sp;
}
noinstrument_function
static inline_function bool up_interrupt_context(void)
static always_inline_function bool up_interrupt_context(void)
{
return getipsr() != 0;
}

View file

@ -342,7 +342,7 @@ struct xcptcontext
/* Return the current IRQ state */
static inline irqstate_t irqstate(void)
static inline_function irqstate_t irqstate(void)
{
unsigned int cpsr;
@ -359,7 +359,7 @@ static inline irqstate_t irqstate(void)
/* Disable IRQs and return the previous IRQ state */
noinstrument_function static inline irqstate_t up_irq_save(void)
noinstrument_function static inline_function irqstate_t up_irq_save(void)
{
unsigned int cpsr;
@ -380,7 +380,7 @@ noinstrument_function static inline irqstate_t up_irq_save(void)
/* Enable IRQs and return the previous IRQ state */
static inline irqstate_t up_irq_enable(void)
static inline_function irqstate_t up_irq_enable(void)
{
unsigned int cpsr;
@ -401,7 +401,7 @@ static inline irqstate_t up_irq_enable(void)
/* Disable IRQs and return the previous IRQ state */
static inline irqstate_t up_irq_disable(void)
static inline_function irqstate_t up_irq_disable(void)
{
unsigned int cpsr;
@ -419,7 +419,8 @@ static inline irqstate_t up_irq_disable(void)
/* Restore saved IRQ & FIQ state */
noinstrument_function static inline void up_irq_restore(irqstate_t flags)
noinstrument_function static inline_function
void up_irq_restore(irqstate_t flags)
{
__asm__ __volatile__
(

View file

@ -194,7 +194,7 @@ extern volatile bool g_interrupt_context[CONFIG_SMP_NCPUS];
/* Save the current interrupt enable state & disable IRQs. */
static inline irqstate_t up_irq_save(void)
static inline_function irqstate_t up_irq_save(void)
{
irqstate_t r = _IRQ_EN_REG;
_IRQ_EN_REG = 0;
@ -203,36 +203,36 @@ static inline irqstate_t up_irq_save(void)
/* Restore saved IRQ & FIQ state */
static inline void up_irq_restore(irqstate_t flags)
static inline_function void up_irq_restore(irqstate_t flags)
{
_IRQ_EN_REG = flags;
}
/* Enable IRQs and return the previous IRQ state */
static inline irqstate_t up_irq_enable(void)
static inline_function irqstate_t up_irq_enable(void)
{
irqstate_t r = _IRQ_EN_REG;
_IRQ_EN_REG = 1;
return r;
}
static inline void up_irq_disable(void)
static inline_function void up_irq_disable(void)
{
up_irq_save();
}
static inline void up_disable_irq(int irq)
static inline_function void up_disable_irq(int irq)
{
_IRQ_MASK_REG &= ~(1 << irq);
}
static inline void up_enable_irq(int irq)
static inline_function void up_enable_irq(int irq)
{
_IRQ_MASK_REG |= (1 << irq);
}
static inline uint32_t getcontrol(void)
static inline_function uint32_t getcontrol(void)
{
return 0;
}

View file

@ -326,7 +326,7 @@ struct xcptcontext
/* Return the current IRQ state */
static inline irqstate_t irqstate(void)
static inline_function irqstate_t irqstate(void)
{
irqstate_t flags;
@ -337,7 +337,7 @@ static inline irqstate_t irqstate(void)
/* Disable IRQs and return the previous IRQ state */
static inline irqstate_t up_irq_save(void)
static inline_function irqstate_t up_irq_save(void)
{
irqstate_t flags;
@ -355,7 +355,7 @@ static inline irqstate_t up_irq_save(void)
/* Enable IRQs and return the previous IRQ state */
static inline irqstate_t up_irq_enable(void)
static inline_function irqstate_t up_irq_enable(void)
{
irqstate_t flags;
@ -372,7 +372,7 @@ static inline irqstate_t up_irq_enable(void)
/* Restore saved IRQ & FIQ state */
static inline void up_irq_restore(irqstate_t flags)
static inline_function void up_irq_restore(irqstate_t flags)
{
__asm__ __volatile__("msr daif, %0" :: "r" (flags): "memory");
}

View file

@ -133,21 +133,21 @@ struct xcptcontext
/* Read/write the SREG */
static inline irqstate_t getsreg(void)
static inline_function irqstate_t getsreg(void)
{
irqstate_t sreg;
asm volatile ("in %0, __SREG__" : "=r" (sreg) ::);
return sreg;
}
static inline void putsreg(irqstate_t sreg)
static inline_function void putsreg(irqstate_t sreg)
{
asm volatile ("out __SREG__, %s" : : "r" (sreg) :);
}
/* Return the current value of the stack pointer */
static inline uint16_t up_getsp(void)
static inline_function uint16_t up_getsp(void)
{
uint8_t spl;
uint8_t sph;
@ -165,19 +165,19 @@ static inline uint16_t up_getsp(void)
/* Interrupt enable/disable */
static inline void up_irq_enable()
static inline_function void up_irq_enable()
{
asm volatile ("sei" ::);
}
static inline void up_irq_disabled()
static inline_function void up_irq_disabled()
{
asm volatile ("cli" ::);
}
/* Save the current interrupt enable state & disable all interrupts */
static inline irqstate_t up_irq_save(void)
static inline_function irqstate_t up_irq_save(void)
{
irqstate_t sreg;
asm volatile
@ -191,7 +191,7 @@ static inline irqstate_t up_irq_save(void)
/* Restore saved interrupt state */
static inline void up_irq_restore(irqstate_t flags)
static inline_function void up_irq_restore(irqstate_t flags)
{
asm volatile ("out __SREG__, %0" : : "r" (flags) :);
}

View file

@ -129,7 +129,7 @@ struct xcptcontext
/* Read the AVR32 status register */
static inline uint32_t avr32_sr(void)
static inline_function uint32_t avr32_sr(void)
{
uint32_t sr;
__asm__ __volatile__ (
@ -142,7 +142,7 @@ static inline uint32_t avr32_sr(void)
/* Read the interrupt vector base address */
static inline uint32_t avr32_evba(void)
static inline_function uint32_t avr32_evba(void)
{
uint32_t evba;
__asm__ __volatile__ (
@ -155,7 +155,7 @@ static inline uint32_t avr32_evba(void)
/* Return the current value of the stack pointer */
static inline uint32_t up_getsp(void)
static inline_function uint32_t up_getsp(void)
{
uint32_t retval;
__asm__ __volatile__
@ -170,7 +170,7 @@ static inline uint32_t up_getsp(void)
/* Return the current interrupt enable state and disable all interrupts */
static inline irqstate_t up_irq_save(void)
static inline_function irqstate_t up_irq_save(void)
{
irqstate_t sr = (irqstate_t)avr32_sr();
__asm__ __volatile__ (
@ -185,7 +185,7 @@ static inline irqstate_t up_irq_save(void)
/* Restore saved interrupt state */
static inline void up_irq_restore(irqstate_t flags)
static inline_function void up_irq_restore(irqstate_t flags)
{
if ((flags & AVR32_SR_GM_MASK) == 0)
{
@ -201,7 +201,7 @@ static inline void up_irq_restore(irqstate_t flags)
/* Return the current interrupt enable state and enable all interrupts */
static inline irqstate_t up_irq_enable(void)
static inline_function irqstate_t up_irq_enable(void)
{
irqstate_t sr = (irqstate_t)avr32_sr();
__asm__ __volatile__ (

View file

@ -210,14 +210,14 @@ struct xcptcontext
* Both behavior don't match the nuttx requirement.
*/
static inline uint32_t getmodp(void)
static inline_function uint32_t getmodp(void)
{
register uint32_t modp __asm__ ("r0");
__asm__ __volatile__("mov modp, %0\nnop\nnop" : "=r"(modp));
return modp;
}
static inline void setmodp(uint32_t modp_v)
static inline_function void setmodp(uint32_t modp_v)
{
__asm__ __volatile__("nop\nnop\nmov %0, r0\nnop\nnop" : : "r"(modp_v));
__asm__ __volatile__
@ -229,31 +229,31 @@ static inline void setmodp(uint32_t modp_v)
/* Return the current value of the stack pointer */
static inline uint32_t up_getsp(void)
static inline_function uint32_t up_getsp(void)
{
uint32_t sp;
__asm__ __volatile__("nop\nmov sp, %0" : "=r"(sp));
return sp;
}
static inline void up_irq_disable(void)
static inline_function void up_irq_disable(void)
{
setmodp(REG_MODP_DISABLE);
}
static inline irqstate_t up_irq_save(void)
static inline_function irqstate_t up_irq_save(void)
{
irqstate_t flags = getmodp();
up_irq_disable();
return flags;
}
static inline void up_irq_enable(void)
static inline_function void up_irq_enable(void)
{
setmodp(REG_MODP_ENABLE);
}
static inline void up_irq_restore(irqstate_t flags)
static inline_function void up_irq_restore(irqstate_t flags)
{
setmodp(flags);
}

View file

@ -205,45 +205,45 @@ struct xcptcontext
* Both behavior don't match the nuttx requirement.
*/
static inline uint32_t getmoda(void)
static inline_function uint32_t getmoda(void)
{
uint32_t moda;
__asm__ __volatile__("mov moda.ui, %0.ui\nnop #0x02" : "=r"(moda));
return moda;
}
static inline void setmoda(uint32_t moda)
static inline_function void setmoda(uint32_t moda)
{
__asm__ __volatile__("nop #0x04\nnop\nmovp %0.ui, moda.ui" : : "r"(moda));
}
/* Return the current value of the stack pointer */
static inline uint32_t up_getsp(void)
static inline_function uint32_t up_getsp(void)
{
uint32_t sp;
__asm__ __volatile__("mov sp.ui, %0.ui" : "=r"(sp));
return sp;
}
static inline void up_irq_disable(void)
static inline_function void up_irq_disable(void)
{
setmoda(REG_MODA_DISABLE);
}
static inline irqstate_t up_irq_save(void)
static inline_function irqstate_t up_irq_save(void)
{
irqstate_t flags = getmoda();
up_irq_disable();
return flags;
}
static inline void up_irq_enable(void)
static inline_function void up_irq_enable(void)
{
setmoda(REG_MODA_ENABLE);
}
static inline void up_irq_restore(irqstate_t flags)
static inline_function void up_irq_restore(irqstate_t flags)
{
setmoda(flags);
}

View file

@ -65,19 +65,20 @@ struct xcptcontext
/* Save the current interrupt enable state & disable IRQs */
static inline irqstate_t up_irq_save(void)
static inline_function irqstate_t up_irq_save(void)
{
/* To be provided */
}
/* Restore saved IRQ & FIQ state */
static inline void up_irq_restore(irqstate_t flags)
static inline_function void up_irq_restore(irqstate_t flags)
{
/* To be provided */
}
static inline void system_call3(unsigned int nbr, uintptr_t parm1,
static inline_function
void system_call3(unsigned int nbr, uintptr_t parm1,
uintptr_t parm2, uintptr_t parm3)
{
/* To be provided */

View file

@ -185,7 +185,7 @@ struct xcptcontext
/* Get the current value of the CCR */
static inline irqstate_t up_getccr(void)
static inline_function irqstate_t up_getccr(void)
{
irqstate_t ccr;
__asm__
@ -199,7 +199,7 @@ static inline irqstate_t up_getccr(void)
/* Save the current interrupt enable state & disable IRQs */
static inline irqstate_t up_irq_save(void)
static inline_function irqstate_t up_irq_save(void)
{
irqstate_t ccr;
__asm__
@ -214,7 +214,7 @@ static inline irqstate_t up_irq_save(void)
/* Restore saved interrupt state */
static inline void up_irq_restore(irqstate_t flags)
static inline_function void up_irq_restore(irqstate_t flags)
{
/* Should interrupts be enabled? */
@ -228,7 +228,8 @@ static inline void up_irq_restore(irqstate_t flags)
/* System call */
static inline void system_call3(unsigned int nbr, uintptr_t parm1,
static inline_function
void system_call3(unsigned int nbr, uintptr_t parm1,
uintptr_t parm2, uintptr_t parm3)
{
/* To be provided */

View file

@ -77,7 +77,7 @@ extern "C"
/* Return the current value of the stack pointer */
static inline uint16_t up_getsp(void)
static inline_function uint16_t up_getsp(void)
{
uint16_t ret;
__asm__

View file

@ -75,7 +75,7 @@ extern "C"
/* Return the current value of the stack pointer */
static inline uint32_t up_getsp(void)
static inline_function uint32_t up_getsp(void)
{
register uint32_t sp;
__asm__

View file

@ -377,7 +377,7 @@ struct xcptcontext
*
****************************************************************************/
static inline irqstate_t cp0_getstatus(void)
static inline_function irqstate_t cp0_getstatus(void)
{
register irqstate_t status;
__asm__ __volatile__
@ -408,7 +408,7 @@ static inline irqstate_t cp0_getstatus(void)
*
****************************************************************************/
static inline void cp0_putstatus(irqstate_t status)
static inline_function void cp0_putstatus(irqstate_t status)
{
__asm__ __volatile__
(
@ -441,7 +441,7 @@ static inline void cp0_putstatus(irqstate_t status)
*
****************************************************************************/
static inline uint32_t cp0_getcause(void)
static inline_function uint32_t cp0_getcause(void)
{
register uint32_t cause;
__asm__ __volatile__
@ -472,7 +472,7 @@ static inline uint32_t cp0_getcause(void)
*
****************************************************************************/
static inline void cp0_putcause(uint32_t cause)
static inline_function void cp0_putcause(uint32_t cause)
{
__asm__ __volatile__
(

View file

@ -70,7 +70,7 @@
*
****************************************************************************/
static inline uint32_t cp0_getintctl(void)
static inline_function uint32_t cp0_getintctl(void)
{
register uint32_t intctl;
__asm__ __volatile__
@ -101,7 +101,7 @@ static inline uint32_t cp0_getintctl(void)
*
****************************************************************************/
static inline void cp0_putintctl(uint32_t intctl)
static inline_function void cp0_putintctl(uint32_t intctl)
{
__asm__ __volatile__
(
@ -130,7 +130,7 @@ static inline void cp0_putintctl(uint32_t intctl)
*
****************************************************************************/
static inline uint32_t cp0_getebase(void)
static inline_function uint32_t cp0_getebase(void)
{
register uint32_t ebase;
__asm__ __volatile__
@ -161,7 +161,7 @@ static inline uint32_t cp0_getebase(void)
*
****************************************************************************/
static inline void cp0_putebase(uint32_t ebase)
static inline_function void cp0_putebase(uint32_t ebase)
{
__asm__ __volatile__
(

View file

@ -70,7 +70,7 @@
*
****************************************************************************/
static inline uint32_t cp0_getintctl(void)
static inline_function uint32_t cp0_getintctl(void)
{
register uint32_t intctl;
__asm__ __volatile__
@ -101,7 +101,7 @@ static inline uint32_t cp0_getintctl(void)
*
****************************************************************************/
static inline void cp0_putintctl(uint32_t intctl)
static inline_function void cp0_putintctl(uint32_t intctl)
{
__asm__ __volatile__
(
@ -130,7 +130,7 @@ static inline void cp0_putintctl(uint32_t intctl)
*
****************************************************************************/
static inline uint32_t cp0_getebase(void)
static inline_function uint32_t cp0_getebase(void)
{
register uint32_t ebase;
__asm__ __volatile__
@ -161,7 +161,7 @@ static inline uint32_t cp0_getebase(void)
*
****************************************************************************/
static inline void cp0_putebase(uint32_t ebase)
static inline_function void cp0_putebase(uint32_t ebase)
{
__asm__ __volatile__
(

View file

@ -65,7 +65,7 @@ extern "C"
/* Return the current value of the stack pointer */
static inline uint32_t up_getsp(void)
static inline_function uint32_t up_getsp(void)
{
register uint32_t sp;

View file

@ -50,7 +50,7 @@
/* Return the current value of the stack pointer */
static inline uint32_t up_getsp(void)
static inline_function uint32_t up_getsp(void)
{
uint32_t sp;

View file

@ -202,7 +202,7 @@ struct xcptcontext
/* Save the current interrupt enable state & disable IRQs. */
static inline irqstate_t up_irq_save(void)
static inline_function irqstate_t up_irq_save(void)
{
irqstate_t flags;
irqstate_t x;
@ -218,7 +218,7 @@ static inline irqstate_t up_irq_save(void)
/* Restore saved state */
static inline void up_irq_restore(irqstate_t flags)
static inline_function void up_irq_restore(irqstate_t flags)
{
uint32_t x;
mfspr(SPR_SYS_SR, x);
@ -228,8 +228,8 @@ static inline void up_irq_restore(irqstate_t flags)
/* Enable IRQs */
static inline void up_irq_enable(void) always_inline_function;
static inline void up_irq_enable(void)
static inline_function void up_irq_enable(void) always_inline_function;
static inline_function void up_irq_enable(void)
{
irqstate_t flags;
mfspr(SPR_SYS_SR, flags);

View file

@ -253,7 +253,7 @@ struct xcptcontext
/* Return the current value of the stack pointer */
static inline uint16_t up_getsp(void)
static inline_function uint16_t up_getsp(void)
{
uint16_t sp;
@ -297,7 +297,7 @@ extern "C"
/* Return the current interrupt enable state and disable IRQs */
static inline irqstate_t up_irq_save(void)
static inline_function irqstate_t up_irq_save(void)
{
irqstate_t flags;
__asm__ __volatile__
@ -312,7 +312,7 @@ static inline irqstate_t up_irq_save(void)
/* Restore saved IRQ state */
static inline void up_irq_restore(irqstate_t flags)
static inline_function void up_irq_restore(irqstate_t flags)
{
__asm__ __volatile__
(
@ -324,7 +324,7 @@ static inline void up_irq_restore(irqstate_t flags)
/* Return the current interrupt enable state and enable IRQs */
static inline irqstate_t up_irq_enable(void)
static inline_function irqstate_t up_irq_enable(void)
{
irqstate_t flags;
__asm__ __volatile__

View file

@ -1013,7 +1013,7 @@ struct xcptcontext
/* Get the current value of the SR */
static inline irqstate_t __getsr(void)
static inline_function irqstate_t __getsr(void)
{
irqstate_t flags;
__asm__ __volatile__("mvfc psw, %0":"=r"(flags));
@ -1022,14 +1022,14 @@ static inline irqstate_t __getsr(void)
/* Set the new value of the SR */
static inline void __setsr(irqstate_t psw)
static inline_function void __setsr(irqstate_t psw)
{
__asm__ __volatile__("mvtc %0, psw": :"r"(psw));
}
/* Return the current value of the stack pointer */
static inline uint16_t up_getsp(void)
static inline_function uint16_t up_getsp(void)
{
uint16_t sp;
@ -1046,21 +1046,21 @@ static inline uint16_t up_getsp(void)
/* Disable interrupts */
static inline void up_irq_disable(void)
static inline_function void up_irq_disable(void)
{
__asm__ __volatile__("CLRPSW I");
}
/* Enable interrupts */
static inline void up_irq_enable(void)
static inline_function void up_irq_enable(void)
{
__asm__ __volatile__("SETPSW I");
}
/* Return the current interrupt enable state and disable interrupts */
static inline irqstate_t up_irq_save(void)
static inline_function irqstate_t up_irq_save(void)
{
irqstate_t flags = __getsr();
up_irq_disable();
@ -1069,7 +1069,7 @@ static inline irqstate_t up_irq_save(void)
/* Restore saved interrupt state */
static inline void up_irq_restore(irqstate_t flags)
static inline_function void up_irq_restore(irqstate_t flags)
{
if (RX65N_PSW_INTERRUPT == (flags & RX65N_PSW_INTERRUPT))
{

View file

@ -489,7 +489,7 @@ extern "C"
/* Get the current value of the SR */
static inline irqstate_t __getsr(void)
static inline_function irqstate_t __getsr(void)
{
irqstate_t flags;
@ -499,14 +499,14 @@ static inline irqstate_t __getsr(void)
/* Set the new value of the SR */
static inline void __setsr(irqstate_t sr)
static inline_function void __setsr(irqstate_t sr)
{
__asm__ __volatile__ ("ldc %0, sr" : : "r" (sr));
}
/* Return the current value of the stack pointer */
static inline uint32_t up_getsp(void)
static inline_function uint32_t up_getsp(void)
{
uint32_t sp;
@ -522,7 +522,7 @@ static inline uint32_t up_getsp(void)
/* Return the current interrupt enable state and disable interrupts */
static inline irqstate_t up_irq_save(void)
static inline_function irqstate_t up_irq_save(void)
{
irqstate_t flags = __getsr();
__setsr(flags | 0x000000f0);
@ -531,7 +531,7 @@ static inline irqstate_t up_irq_save(void)
/* Disable interrupts */
static inline void up_irq_disable(void)
static inline_function void up_irq_disable(void)
{
uint32_t flags = __getsr();
__setsr(flags | 0x000000f0);
@ -539,7 +539,7 @@ static inline void up_irq_disable(void)
/* Enable interrupts */
static inline void up_irq_enable(void)
static inline_function void up_irq_enable(void)
{
uint32_t flags = __getsr();
__setsr(flags & ~0x000000f0);
@ -547,7 +547,7 @@ static inline void up_irq_enable(void)
/* Restore saved interrupt state */
static inline void up_irq_restore(irqstate_t flags)
static inline_function void up_irq_restore(irqstate_t flags)
{
if ((flags & 0x000000f0) != 0x000000f0)
{

View file

@ -649,7 +649,7 @@ struct xcptcontext
/* Return the current value of the stack pointer */
static inline uintptr_t up_getsp(void)
static inline_function uintptr_t up_getsp(void)
{
register uintptr_t sp;
__asm__
@ -743,7 +743,7 @@ int up_this_cpu(void);
*
****************************************************************************/
noinstrument_function static inline irqstate_t up_irq_save(void)
noinstrument_function static inline_function irqstate_t up_irq_save(void)
{
irqstate_t flags;
@ -772,7 +772,8 @@ noinstrument_function static inline irqstate_t up_irq_save(void)
*
****************************************************************************/
noinstrument_function static inline void up_irq_restore(irqstate_t flags)
noinstrument_function static inline_function
void up_irq_restore(irqstate_t flags)
{
__asm__ __volatile__
(

View file

@ -135,7 +135,7 @@ static inline_function void up_set_current_regs(xcpt_reg_t *regs)
/* Return the current value of the stack pointer */
static inline uintptr_t up_getsp(void)
static inline_function uintptr_t up_getsp(void)
{
#ifdef _MSC_VER
uintptr_t tmp;

View file

@ -76,7 +76,7 @@ extern "C"
/* Return the current value of the stack pointer */
static inline uint32_t up_getsp(void)
static inline_function uint32_t up_getsp(void)
{
uint32_t retval;

View file

@ -564,7 +564,7 @@ struct xcptcontext
* This method returns the entire PSR contents.
*/
static inline uint32_t sparc_disable_interrupts(void)
static inline_function uint32_t sparc_disable_interrupts(void)
{
register uint32_t psr __asm__("g1"); /* return value of trap handler */
__asm__ volatile ("ta %1\n\t" : "=r" (psr) : "i" (SPARC_SWTRAP_IRQDIS));
@ -576,7 +576,7 @@ static inline uint32_t sparc_disable_interrupts(void)
* psr is the PSR returned by sparc_disable_interrupts.
*/
static inline void sparc_enable_interrupts(uint32_t psr)
static inline_function void sparc_enable_interrupts(uint32_t psr)
{
register uint32_t _psr __asm__("g1") = psr; /* input to trap handler */

View file

@ -104,7 +104,7 @@ void up_irq_enable(void);
* Inline functions
****************************************************************************/
noinstrument_function static inline uintptr_t up_getsp(void)
noinstrument_function static inline_function uintptr_t up_getsp(void)
{
#ifdef CONFIG_TRICORE_TOOLCHAIN_TASKING
return (uintptr_t)__get_sp();
@ -121,7 +121,7 @@ noinstrument_function static inline uintptr_t up_getsp(void)
*
****************************************************************************/
noinstrument_function static inline irqstate_t up_irq_save(void)
noinstrument_function static inline_function irqstate_t up_irq_save(void)
{
return __disable_and_save();
}
@ -134,7 +134,8 @@ noinstrument_function static inline irqstate_t up_irq_save(void)
*
****************************************************************************/
noinstrument_function static inline void up_irq_restore(irqstate_t flags)
noinstrument_function static inline_function
void up_irq_restore(irqstate_t flags)
{
__restore(flags);
}

View file

@ -179,7 +179,7 @@ struct xcptcontext
/* Return stack pointer */
static inline uint32_t up_getsp(void)
static inline_function uint32_t up_getsp(void)
{
uint32_t regval;
@ -193,7 +193,7 @@ static inline uint32_t up_getsp(void)
/* Get segment registers */
static inline uint32_t up_getds(void)
static inline_function uint32_t up_getds(void)
{
uint32_t regval;
@ -205,7 +205,7 @@ static inline uint32_t up_getds(void)
return regval;
}
static inline uint32_t up_getcs(void)
static inline_function uint32_t up_getcs(void)
{
uint32_t regval;
@ -217,7 +217,7 @@ static inline uint32_t up_getcs(void)
return regval;
}
static inline uint32_t up_getss(void)
static inline_function uint32_t up_getss(void)
{
uint32_t regval;
@ -240,7 +240,7 @@ static inline uint32_t up_getss(void)
/* Get the current FLAGS register contents */
static inline irqstate_t irqflags()
static inline_function irqstate_t irqflags()
{
irqstate_t flags;
@ -258,33 +258,33 @@ static inline irqstate_t irqflags()
* if the X86_FLAGS_IF is set by sti, then interrupts are enable.
*/
static inline bool up_irq_disabled(irqstate_t flags)
static inline_function bool up_irq_disabled(irqstate_t flags)
{
return ((flags & X86_FLAGS_IF) == 0);
}
static inline bool up_irq_enabled(irqstate_t flags)
static inline_function bool up_irq_enabled(irqstate_t flags)
{
return ((flags & X86_FLAGS_IF) != 0);
}
/* Disable interrupts unconditionally */
static inline void up_irq_disable(void)
static inline_function void up_irq_disable(void)
{
asm volatile("cli": : :"memory");
}
/* Enable interrupts unconditionally */
static inline void up_irq_enable(void)
static inline_function void up_irq_enable(void)
{
asm volatile("sti": : :"memory");
}
/* Disable interrupts, but return previous interrupt state */
static inline irqstate_t up_irq_save(void)
static inline_function irqstate_t up_irq_save(void)
{
irqstate_t flags = irqflags();
up_irq_disable();
@ -293,7 +293,7 @@ static inline irqstate_t up_irq_save(void)
/* Conditionally disable interrupts */
static inline void up_irq_restore(irqstate_t flags)
static inline_function void up_irq_restore(irqstate_t flags)
{
if (up_irq_enabled(flags))
{
@ -301,7 +301,7 @@ static inline void up_irq_restore(irqstate_t flags)
}
}
static inline void system_call3(unsigned int nbr, uintptr_t parm1,
static inline_function void system_call3(unsigned int nbr, uintptr_t parm1,
uintptr_t parm2, uintptr_t parm3)
{
/* To be provided */

View file

@ -573,7 +573,7 @@ struct xcptcontext
#ifndef __ASSEMBLY__
static inline void setgdt(void *gdt, int size)
static inline_function void setgdt(void *gdt, int size)
{
struct gdt_ptr_s gdt_ptr;
gdt_ptr.limit = size;
@ -582,7 +582,7 @@ static inline void setgdt(void *gdt, int size)
__asm__ volatile ("lgdt %0"::"m"(gdt_ptr):"memory");
}
static inline void setidt(void *idt, int size)
static inline_function void setidt(void *idt, int size)
{
struct idt_ptr_s idt_ptr;
idt_ptr.limit = size;
@ -591,7 +591,7 @@ static inline void setidt(void *idt, int size)
__asm__ volatile ("lidt %0"::"m"(idt_ptr):"memory");
}
static inline uint64_t rdtscp(void)
static inline_function uint64_t rdtscp(void)
{
uint32_t lo;
uint32_t hi;
@ -600,7 +600,7 @@ static inline uint64_t rdtscp(void)
return (uint64_t)lo | (((uint64_t)hi) << 32);
}
static inline uint64_t rdtsc(void)
static inline_function uint64_t rdtsc(void)
{
uint32_t lo;
uint32_t hi;
@ -609,7 +609,7 @@ static inline uint64_t rdtsc(void)
return (uint64_t)lo | (((uint64_t)hi) << 32);
}
static inline void set_pcid(uint64_t pcid)
static inline_function void set_pcid(uint64_t pcid)
{
if (pcid < 4095)
{
@ -619,26 +619,26 @@ static inline void set_pcid(uint64_t pcid)
}
}
static inline void set_cr3(uint64_t cr3)
static inline_function void set_cr3(uint64_t cr3)
{
__asm__ volatile("mov %0, %%cr3" :: "r"(cr3));
}
static inline uint64_t get_cr3(void)
static inline_function uint64_t get_cr3(void)
{
uint64_t cr3;
__asm__ volatile("mov %%cr3, %0" : "=rm"(cr3) : : "memory");
return cr3;
}
static inline uint64_t get_pml4(void)
static inline_function uint64_t get_pml4(void)
{
/* Aligned to a 4-KByte boundary */
return get_cr3() & 0xfffffffffffff000;
}
static inline unsigned long read_msr(unsigned int msr)
static inline_function unsigned long read_msr(unsigned int msr)
{
uint32_t low;
uint32_t high;
@ -647,7 +647,7 @@ static inline unsigned long read_msr(unsigned int msr)
return low | ((unsigned long)high << 32);
}
static inline void write_msr(unsigned int msr, unsigned long val)
static inline_function void write_msr(unsigned int msr, unsigned long val)
{
__asm__ volatile("wrmsr"
: /* no output */
@ -655,7 +655,7 @@ static inline void write_msr(unsigned int msr, unsigned long val)
: "memory");
}
static inline uint64_t read_fsbase(void)
static inline_function uint64_t read_fsbase(void)
{
uint64_t val;
__asm__ volatile("rdfsbase %0"
@ -666,7 +666,7 @@ static inline uint64_t read_fsbase(void)
return val;
}
static inline void write_fsbase(unsigned long val)
static inline_function void write_fsbase(unsigned long val)
{
__asm__ volatile("wrfsbase %0"
: /* no output */
@ -674,7 +674,7 @@ static inline void write_fsbase(unsigned long val)
: "memory");
}
static inline uint64_t read_gsbase(void)
static inline_function uint64_t read_gsbase(void)
{
uint64_t val;
__asm__ volatile("rdgsbase %0"
@ -685,7 +685,7 @@ static inline uint64_t read_gsbase(void)
return val;
}
static inline void write_gsbase(unsigned long val)
static inline_function void write_gsbase(unsigned long val)
{
__asm__ volatile("wrgsbase %0"
: /* no output */
@ -695,7 +695,7 @@ static inline void write_gsbase(unsigned long val)
/* Return stack pointer */
static inline uint64_t up_getsp(void)
static inline_function uint64_t up_getsp(void)
{
uint64_t regval;
@ -709,7 +709,7 @@ static inline uint64_t up_getsp(void)
/* Get segment registers */
static inline uint32_t up_getds(void)
static inline_function uint32_t up_getds(void)
{
uint32_t regval;
@ -721,7 +721,7 @@ static inline uint32_t up_getds(void)
return regval;
}
static inline uint32_t up_getcs(void)
static inline_function uint32_t up_getcs(void)
{
uint32_t regval;
@ -733,7 +733,7 @@ static inline uint32_t up_getcs(void)
return regval;
}
static inline uint32_t up_getss(void)
static inline_function uint32_t up_getss(void)
{
uint32_t regval;
@ -745,7 +745,7 @@ static inline uint32_t up_getss(void)
return regval;
}
static inline uint32_t up_getes(void)
static inline_function uint32_t up_getes(void)
{
uint32_t regval;
@ -757,7 +757,7 @@ static inline uint32_t up_getes(void)
return regval;
}
static inline uint32_t up_getfs(void)
static inline_function uint32_t up_getfs(void)
{
uint32_t regval;
@ -769,7 +769,7 @@ static inline uint32_t up_getfs(void)
return regval;
}
static inline uint32_t up_getgs(void)
static inline_function uint32_t up_getgs(void)
{
uint32_t regval;
@ -792,7 +792,7 @@ static inline uint32_t up_getgs(void)
/* Get the current FLAGS register contents */
static inline irqstate_t irqflags()
static inline_function irqstate_t irqflags()
{
irqstate_t flags;
@ -810,33 +810,33 @@ static inline irqstate_t irqflags()
* if the X86_FLAGS_IF is set by sti, then interrupts are enable.
*/
static inline bool up_irq_disabled(irqstate_t flags)
static inline_function bool up_irq_disabled(irqstate_t flags)
{
return ((flags & X86_64_RFLAGS_IF) == 0);
}
static inline bool up_irq_enabled(irqstate_t flags)
static inline_function bool up_irq_enabled(irqstate_t flags)
{
return ((flags & X86_64_RFLAGS_IF) != 0);
}
/* Disable interrupts unconditionally */
static inline void up_irq_disable(void)
static inline_function void up_irq_disable(void)
{
__asm__ volatile("cli": : :"memory");
}
/* Enable interrupts unconditionally */
static inline void up_irq_enable(void)
static inline_function void up_irq_enable(void)
{
__asm__ volatile("sti": : :"memory");
}
/* Disable interrupts, but return previous interrupt state */
static inline irqstate_t up_irq_save(void)
static inline_function irqstate_t up_irq_save(void)
{
irqstate_t flags = irqflags();
up_irq_disable();
@ -845,7 +845,7 @@ static inline irqstate_t up_irq_save(void)
/* Conditionally disable interrupts */
static inline void up_irq_restore(irqstate_t flags)
static inline_function void up_irq_restore(irqstate_t flags)
{
if (up_irq_enabled(flags))
{
@ -853,7 +853,7 @@ static inline void up_irq_restore(irqstate_t flags)
}
}
static inline unsigned int up_apic_cpu_id(void)
static inline_function unsigned int up_apic_cpu_id(void)
{
return read_msr(MSR_X2APIC_ID);
}

View file

@ -479,7 +479,7 @@
#ifdef CONFIG_ESP32_GPIO_IRQ
#ifdef CONFIG_SMP
static inline int esp32_irq_gpio(int cpu)
static inline_function int esp32_irq_gpio(int cpu)
{
if (cpu == 0)
{

View file

@ -220,7 +220,7 @@ struct xcptcontext
/* Return the current value of the PS register */
static inline uint32_t xtensa_getps(void)
static inline_function uint32_t xtensa_getps(void)
{
uint32_t ps;
@ -234,7 +234,8 @@ static inline uint32_t xtensa_getps(void)
/* Set the value of the PS register */
noinstrument_function static inline void xtensa_setps(uint32_t ps)
noinstrument_function static inline_function
void xtensa_setps(uint32_t ps)
{
__asm__ __volatile__
(
@ -263,7 +264,8 @@ static inline_function uint32_t up_getsp(void)
/* Restore the value of the PS register */
noinstrument_function static inline void up_irq_restore(uint32_t ps)
noinstrument_function static inline_function
void up_irq_restore(uint32_t ps)
{
__asm__ __volatile__
(
@ -277,7 +279,7 @@ noinstrument_function static inline void up_irq_restore(uint32_t ps)
/* Disable interrupts and return the previous value of the PS register */
noinstrument_function static inline uint32_t up_irq_save(void)
noinstrument_function static inline_function uint32_t up_irq_save(void)
{
uint32_t ps;
@ -300,7 +302,7 @@ noinstrument_function static inline uint32_t up_irq_save(void)
/* Enable interrupts at all levels */
static inline void up_irq_enable(void)
static inline_function void up_irq_enable(void)
{
#ifdef __XTENSA_CALL0_ABI__
xtensa_setps(PS_INTLEVEL(0) | PS_UM);
@ -311,7 +313,7 @@ static inline void up_irq_enable(void)
/* Disable low- and medium- priority interrupts */
noinstrument_function static inline void up_irq_disable(void)
noinstrument_function static inline_function void up_irq_disable(void)
{
#ifdef __XTENSA_CALL0_ABI__
xtensa_setps(PS_INTLEVEL(XCHAL_EXCM_LEVEL) | PS_UM);
@ -324,7 +326,7 @@ noinstrument_function static inline void up_irq_disable(void)
* Name: xtensa_disable_all
****************************************************************************/
static inline void xtensa_disable_all(void)
static inline_function void xtensa_disable_all(void)
{
__asm__ __volatile__
(
@ -339,7 +341,7 @@ static inline void xtensa_disable_all(void)
* Name: xtensa_intclear
****************************************************************************/
static inline void xtensa_intclear(uint32_t mask)
static inline_function void xtensa_intclear(uint32_t mask)
{
__asm__ __volatile__
(