diff --git a/arch/xtensa/include/xtensa/core.h b/arch/xtensa/include/xtensa/core.h index bf769b9fca4..01112b9b575 100644 --- a/arch/xtensa/include/xtensa/core.h +++ b/arch/xtensa/include/xtensa/core.h @@ -71,6 +71,12 @@ # define XCHAL_SEP2 },{ #endif +/* WSBITS and WBBITS are the width of the WINDOWSTART and WINDOWBASE + * registers + */ +#define WSBITS (XCHAL_NUM_AREGS / 4) /* width of WINDOWSTART in bits */ +#define WBBITS (XCHAL_NUM_AREGS_LOG2 - 2) /* width of WINDOWBASE in bits */ + /* ISA **********************************************************************/ #if XCHAL_HAVE_BE diff --git a/arch/xtensa/src/common/xtensa_windowspill.S b/arch/xtensa/src/common/xtensa_windowspill.S index 9e92ed6e103..f2d3448be5d 100644 --- a/arch/xtensa/src/common/xtensa_windowspill.S +++ b/arch/xtensa/src/common/xtensa_windowspill.S @@ -40,6 +40,7 @@ ****************************************************************************/ #include +#include #include #include @@ -116,8 +117,6 @@ _xtensa_window_spill: ret #else /* XCHAL_HAVE_WINDOWED */ -# define WSBITS (XCHAL_NUM_AREGS / 4) /* Width of WINDOWSTART register in bits */ -# define WBBITS (XCHAL_NUM_AREGS_LOG2 - 2) /* Width of WINDOWBASE register in bits */ /* * Rearrange (rotate) window start bits relative to the current