arch: armv6-m: Refactor interrupt stack related code

Summary:
- Apply the same logic for armv7-m
- NOTE: stack pointer alignment is 4-byte

Impact:
- Affects armv6-m with interrupt stack enabled

Testing:
- Built with freedom-kl25z:nsh (CONFIG_ARCH_INTERRUPTSTACK=2048)
- Not tested but should work

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
This commit is contained in:
Masayuki Ishikawa 2020-10-22 15:46:31 +09:00 committed by David Sidrane
parent 0b73eec5cd
commit 3c4bf1a2bf
2 changed files with 2 additions and 2 deletions

View File

@ -247,7 +247,7 @@ static void up_dumpstate(void)
* stack?
*/
if (sp <= istackbase && sp > istackbase - istacksize)
if (sp < istackbase && sp > istackbase - istacksize)
{
/* Yes.. dump the interrupt stack */

View File

@ -270,7 +270,7 @@ exception_common:
.bss
.global g_intstackalloc
.global g_intstackbase
.align 4
.balign 4
g_intstackalloc:
.skip (CONFIG_ARCH_INTERRUPTSTACK & ~3)
g_intstackbase: