Skip to content

Commit eb11e69

Browse files
dcpleunggalak
authored andcommitted
arch: xtensa: use asm for _xt_set_intset/_xt_set_intclear
Use assembly for _xt_set_intset() and _xt_set_intclear() instead of calling into the Xtensa HAL, allowing these to be inlined. Signed-off-by: Daniel Leung <[email protected]>
1 parent 7cb9286 commit eb11e69

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

include/arch/xtensa/xtensa_api.h

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,11 @@ static inline void z_xt_ints_off(unsigned int mask)
4444
*/
4545
static inline void z_xt_set_intset(unsigned int arg)
4646
{
47-
xthal_set_intset(arg);
47+
#if XCHAL_HAVE_INTERRUPTS
48+
__asm__ volatile("wsr.intset %0; rsync" : : "r"(arg));
49+
#else
50+
ARG_UNUSED(arg);
51+
#endif
4852
}
4953

5054

@@ -53,7 +57,11 @@ static inline void z_xt_set_intset(unsigned int arg)
5357
*/
5458
static inline void _xt_set_intclear(unsigned int arg)
5559
{
56-
xthal_set_intclear(arg);
60+
#if XCHAL_HAVE_INTERRUPTS
61+
__asm__ volatile("wsr.intclear %0; rsync" : : "r"(arg));
62+
#else
63+
ARG_UNUSED(arg);
64+
#endif
5765
}
5866

5967
#endif /* ZEPHYR_ARCH_XTENSA_INCLUDE_XTENSA_API_H_ */

0 commit comments

Comments
 (0)