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 <daniel.leung@intel.com>
This commit is contained in:
Daniel Leung 2019-08-29 12:13:00 -07:00 committed by Kumar Gala
commit eb11e6990b

View file

@ -44,7 +44,11 @@ static inline void z_xt_ints_off(unsigned int mask)
*/
static inline void z_xt_set_intset(unsigned int arg)
{
xthal_set_intset(arg);
#if XCHAL_HAVE_INTERRUPTS
__asm__ volatile("wsr.intset %0; rsync" : : "r"(arg));
#else
ARG_UNUSED(arg);
#endif
}
@ -53,7 +57,11 @@ static inline void z_xt_set_intset(unsigned int arg)
*/
static inline void _xt_set_intclear(unsigned int arg)
{
xthal_set_intclear(arg);
#if XCHAL_HAVE_INTERRUPTS
__asm__ volatile("wsr.intclear %0; rsync" : : "r"(arg));
#else
ARG_UNUSED(arg);
#endif
}
#endif /* ZEPHYR_ARCH_XTENSA_INCLUDE_XTENSA_API_H_ */