From 9bdcc4dc4b8eb843f2b9cf13a1c8ee539fb0725b Mon Sep 17 00:00:00 2001 From: buxiasen Date: Thu, 2 Jan 2025 16:26:26 +0800 Subject: [PATCH] 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 --- arch/arm/include/arm/irq.h | 6 ++-- arch/arm/include/armv6-m/irq.h | 32 ++++++----------- arch/arm/include/armv7-a/irq.h | 11 +++--- arch/arm/include/armv7-m/irq.h | 55 ++++++++++------------------- arch/arm/include/armv7-r/irq.h | 11 +++--- arch/arm/include/armv8-m/irq.h | 53 ++++++++++------------------ arch/arm/include/armv8-r/irq.h | 11 +++--- arch/arm/include/tlsr82/irq.h | 14 ++++---- arch/arm64/include/irq.h | 8 ++--- arch/avr/include/avr/irq.h | 14 ++++---- arch/avr/include/avr32/irq.h | 12 +++---- arch/ceva/include/xc5/irq.h | 14 ++++---- arch/ceva/include/xm6/irq.h | 14 ++++---- arch/hc/include/hc12/irq.h | 9 ++--- arch/hc/include/hcs12/irq.h | 11 +++--- arch/hc/include/irq.h | 2 +- arch/mips/include/irq.h | 2 +- arch/mips/include/mips32/irq.h | 8 ++--- arch/mips/include/pic32mx/irq.h | 8 ++--- arch/mips/include/pic32mz/irq.h | 8 ++--- arch/misoc/include/irq.h | 2 +- arch/or1k/include/irq.h | 2 +- arch/or1k/include/mor1kx/irq.h | 8 ++--- arch/renesas/include/m16c/irq.h | 8 ++--- arch/renesas/include/rx65n/irq.h | 14 ++++---- arch/renesas/include/sh1/irq.h | 14 ++++---- arch/risc-v/include/irq.h | 7 ++-- arch/sim/include/irq.h | 2 +- arch/sparc/include/irq.h | 2 +- arch/sparc/include/sparc_v8/irq.h | 4 +-- arch/tricore/include/irq.h | 7 ++-- arch/x86/include/i486/irq.h | 26 +++++++------- arch/x86_64/include/intel64/irq.h | 58 +++++++++++++++---------------- arch/xtensa/include/esp32/irq.h | 2 +- arch/xtensa/include/irq.h | 18 +++++----- 35 files changed, 220 insertions(+), 257 deletions(-) diff --git a/arch/arm/include/arm/irq.h b/arch/arm/include/arm/irq.h index 59b219d8c3..dbb62e9eb3 100644 --- a/arch/arm/include/arm/irq.h +++ b/arch/arm/include/arm/irq.h @@ -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; diff --git a/arch/arm/include/armv6-m/irq.h b/arch/arm/include/armv6-m/irq.h index 521c2bd428..10d9238839 100644 --- a/arch/arm/include/armv6-m/irq.h +++ b/arch/arm/include/armv6-m/irq.h @@ -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; } diff --git a/arch/arm/include/armv7-a/irq.h b/arch/arm/include/armv7-a/irq.h index 62425feddb..98d13aaa99 100644 --- a/arch/arm/include/armv7-a/irq.h +++ b/arch/arm/include/armv7-a/irq.h @@ -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__ ( diff --git a/arch/arm/include/armv7-m/irq.h b/arch/arm/include/armv7-m/irq.h index 2c5bd03f77..c09b79fb31 100644 --- a/arch/arm/include/armv7-m/irq.h +++ b/arch/arm/include/armv7-m/irq.h @@ -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; } diff --git a/arch/arm/include/armv7-r/irq.h b/arch/arm/include/armv7-r/irq.h index 3c404d1366..f82e07803c 100644 --- a/arch/arm/include/armv7-r/irq.h +++ b/arch/arm/include/armv7-r/irq.h @@ -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__ ( diff --git a/arch/arm/include/armv8-m/irq.h b/arch/arm/include/armv8-m/irq.h index c2a9ff07bd..09940739d6 100644 --- a/arch/arm/include/armv8-m/irq.h +++ b/arch/arm/include/armv8-m/irq.h @@ -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; } diff --git a/arch/arm/include/armv8-r/irq.h b/arch/arm/include/armv8-r/irq.h index 6f49b40a2a..643a697cb5 100644 --- a/arch/arm/include/armv8-r/irq.h +++ b/arch/arm/include/armv8-r/irq.h @@ -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__ ( diff --git a/arch/arm/include/tlsr82/irq.h b/arch/arm/include/tlsr82/irq.h index 9ddc0444b9..fc3d3fb051 100644 --- a/arch/arm/include/tlsr82/irq.h +++ b/arch/arm/include/tlsr82/irq.h @@ -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; } diff --git a/arch/arm64/include/irq.h b/arch/arm64/include/irq.h index 0ef6d5e249..2f3e1c88c8 100644 --- a/arch/arm64/include/irq.h +++ b/arch/arm64/include/irq.h @@ -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"); } diff --git a/arch/avr/include/avr/irq.h b/arch/avr/include/avr/irq.h index 7f9b90af0f..cde36c1d04 100644 --- a/arch/avr/include/avr/irq.h +++ b/arch/avr/include/avr/irq.h @@ -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) :); } diff --git a/arch/avr/include/avr32/irq.h b/arch/avr/include/avr32/irq.h index aa5c5cf3f7..a60fa9cda3 100644 --- a/arch/avr/include/avr32/irq.h +++ b/arch/avr/include/avr32/irq.h @@ -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__ ( diff --git a/arch/ceva/include/xc5/irq.h b/arch/ceva/include/xc5/irq.h index 9d87efbe6e..2332669f7d 100644 --- a/arch/ceva/include/xc5/irq.h +++ b/arch/ceva/include/xc5/irq.h @@ -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); } diff --git a/arch/ceva/include/xm6/irq.h b/arch/ceva/include/xm6/irq.h index 380f2570d4..9327a4ccb3 100644 --- a/arch/ceva/include/xm6/irq.h +++ b/arch/ceva/include/xm6/irq.h @@ -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); } diff --git a/arch/hc/include/hc12/irq.h b/arch/hc/include/hc12/irq.h index a67b3f53cc..2339797e92 100644 --- a/arch/hc/include/hc12/irq.h +++ b/arch/hc/include/hc12/irq.h @@ -65,20 +65,21 @@ 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, - uintptr_t parm2, uintptr_t parm3) +static inline_function +void system_call3(unsigned int nbr, uintptr_t parm1, + uintptr_t parm2, uintptr_t parm3) { /* To be provided */ } diff --git a/arch/hc/include/hcs12/irq.h b/arch/hc/include/hcs12/irq.h index fe218fe5eb..2113a76d94 100644 --- a/arch/hc/include/hcs12/irq.h +++ b/arch/hc/include/hcs12/irq.h @@ -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,8 +228,9 @@ static inline void up_irq_restore(irqstate_t flags) /* System call */ -static inline void system_call3(unsigned int nbr, uintptr_t parm1, - uintptr_t parm2, uintptr_t parm3) +static inline_function +void system_call3(unsigned int nbr, uintptr_t parm1, + uintptr_t parm2, uintptr_t parm3) { /* To be provided */ diff --git a/arch/hc/include/irq.h b/arch/hc/include/irq.h index 6e6ccafcb1..b277b90e80 100644 --- a/arch/hc/include/irq.h +++ b/arch/hc/include/irq.h @@ -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__ diff --git a/arch/mips/include/irq.h b/arch/mips/include/irq.h index 6832412520..3cdc19d01d 100644 --- a/arch/mips/include/irq.h +++ b/arch/mips/include/irq.h @@ -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__ diff --git a/arch/mips/include/mips32/irq.h b/arch/mips/include/mips32/irq.h index 0388b465e6..8f293f6297 100644 --- a/arch/mips/include/mips32/irq.h +++ b/arch/mips/include/mips32/irq.h @@ -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__ ( diff --git a/arch/mips/include/pic32mx/irq.h b/arch/mips/include/pic32mx/irq.h index b9bc533774..dc09753654 100644 --- a/arch/mips/include/pic32mx/irq.h +++ b/arch/mips/include/pic32mx/irq.h @@ -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__ ( diff --git a/arch/mips/include/pic32mz/irq.h b/arch/mips/include/pic32mz/irq.h index ca22f093c0..e6a8493d0a 100644 --- a/arch/mips/include/pic32mz/irq.h +++ b/arch/mips/include/pic32mz/irq.h @@ -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__ ( diff --git a/arch/misoc/include/irq.h b/arch/misoc/include/irq.h index f5a2f8a634..fb72179a75 100644 --- a/arch/misoc/include/irq.h +++ b/arch/misoc/include/irq.h @@ -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; diff --git a/arch/or1k/include/irq.h b/arch/or1k/include/irq.h index a4a5b63085..b73d6e7c4c 100644 --- a/arch/or1k/include/irq.h +++ b/arch/or1k/include/irq.h @@ -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; diff --git a/arch/or1k/include/mor1kx/irq.h b/arch/or1k/include/mor1kx/irq.h index c9bc9cddb9..41255e815b 100644 --- a/arch/or1k/include/mor1kx/irq.h +++ b/arch/or1k/include/mor1kx/irq.h @@ -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); diff --git a/arch/renesas/include/m16c/irq.h b/arch/renesas/include/m16c/irq.h index 6dad943ef3..04ed3d17c2 100644 --- a/arch/renesas/include/m16c/irq.h +++ b/arch/renesas/include/m16c/irq.h @@ -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__ diff --git a/arch/renesas/include/rx65n/irq.h b/arch/renesas/include/rx65n/irq.h index e6a9a40ad8..61f930d990 100644 --- a/arch/renesas/include/rx65n/irq.h +++ b/arch/renesas/include/rx65n/irq.h @@ -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)) { diff --git a/arch/renesas/include/sh1/irq.h b/arch/renesas/include/sh1/irq.h index 20de070a80..70e0d9c2ae 100644 --- a/arch/renesas/include/sh1/irq.h +++ b/arch/renesas/include/sh1/irq.h @@ -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) { diff --git a/arch/risc-v/include/irq.h b/arch/risc-v/include/irq.h index 23d2986b07..6542b10760 100644 --- a/arch/risc-v/include/irq.h +++ b/arch/risc-v/include/irq.h @@ -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__ ( diff --git a/arch/sim/include/irq.h b/arch/sim/include/irq.h index 1ddcba47ff..11c6272aa5 100644 --- a/arch/sim/include/irq.h +++ b/arch/sim/include/irq.h @@ -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; diff --git a/arch/sparc/include/irq.h b/arch/sparc/include/irq.h index 0b15d4914a..e4627f3676 100644 --- a/arch/sparc/include/irq.h +++ b/arch/sparc/include/irq.h @@ -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; diff --git a/arch/sparc/include/sparc_v8/irq.h b/arch/sparc/include/sparc_v8/irq.h index a714e17d72..ed0f07aab8 100644 --- a/arch/sparc/include/sparc_v8/irq.h +++ b/arch/sparc/include/sparc_v8/irq.h @@ -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 */ diff --git a/arch/tricore/include/irq.h b/arch/tricore/include/irq.h index a256dd2462..d33e67184b 100644 --- a/arch/tricore/include/irq.h +++ b/arch/tricore/include/irq.h @@ -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); } diff --git a/arch/x86/include/i486/irq.h b/arch/x86/include/i486/irq.h index a554b781bf..a464d13699 100644 --- a/arch/x86/include/i486/irq.h +++ b/arch/x86/include/i486/irq.h @@ -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,8 +301,8 @@ static inline void up_irq_restore(irqstate_t flags) } } -static inline void system_call3(unsigned int nbr, uintptr_t parm1, - uintptr_t parm2, uintptr_t parm3) +static inline_function void system_call3(unsigned int nbr, uintptr_t parm1, + uintptr_t parm2, uintptr_t parm3) { /* To be provided */ } diff --git a/arch/x86_64/include/intel64/irq.h b/arch/x86_64/include/intel64/irq.h index ca4a3118f5..fbbc6b35bc 100644 --- a/arch/x86_64/include/intel64/irq.h +++ b/arch/x86_64/include/intel64/irq.h @@ -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); } diff --git a/arch/xtensa/include/esp32/irq.h b/arch/xtensa/include/esp32/irq.h index f1a640c9fe..a91ee2a2d6 100644 --- a/arch/xtensa/include/esp32/irq.h +++ b/arch/xtensa/include/esp32/irq.h @@ -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) { diff --git a/arch/xtensa/include/irq.h b/arch/xtensa/include/irq.h index 0994abc6eb..973799f1d6 100644 --- a/arch/xtensa/include/irq.h +++ b/arch/xtensa/include/irq.h @@ -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__ (