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:
parent
7cb9286895
commit
eb11e6990b
1 changed files with 10 additions and 2 deletions
|
@ -44,7 +44,11 @@ static inline void z_xt_ints_off(unsigned int mask)
|
||||||
*/
|
*/
|
||||||
static inline void z_xt_set_intset(unsigned int arg)
|
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)
|
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_ */
|
#endif /* ZEPHYR_ARCH_XTENSA_INCLUDE_XTENSA_API_H_ */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue