arch: armv8-m: Refactor interrupt stack related code
Summary: - Apply the same logic for armv7-m - NOTE: stack pointer alignment is 8-byte Impact: - Affects armv8-m with interrupt stack enabled Testing: - Not tested but should work Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
This commit is contained in:
parent
d553515758
commit
0b73eec5cd
@ -244,7 +244,7 @@ static void up_dumpstate(void)
|
|||||||
* stack?
|
* stack?
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (sp <= istackbase && sp > istackbase - istacksize)
|
if (sp < istackbase && sp > istackbase - istacksize)
|
||||||
{
|
{
|
||||||
/* Yes.. dump the interrupt stack */
|
/* Yes.. dump the interrupt stack */
|
||||||
|
|
||||||
|
@ -67,7 +67,7 @@
|
|||||||
* no privileged task has run.
|
* no privileged task has run.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
# if defined(CONFIG_BUILD_PROTECTED) && CONFIG_ARCH_INTERRUPTSTACK < 4
|
# if defined(CONFIG_BUILD_PROTECTED) && CONFIG_ARCH_INTERRUPTSTACK < 8
|
||||||
# error Interrupt stack must be used with high priority interrupts in kernel mode
|
# error Interrupt stack must be used with high priority interrupts in kernel mode
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
@ -355,7 +355,7 @@ exception_common:
|
|||||||
.bss
|
.bss
|
||||||
.global g_intstackalloc
|
.global g_intstackalloc
|
||||||
.global g_intstackbase
|
.global g_intstackbase
|
||||||
.align 8
|
.balign 8
|
||||||
g_intstackalloc:
|
g_intstackalloc:
|
||||||
.skip ((CONFIG_ARCH_INTERRUPTSTACK + 4) & ~7)
|
.skip ((CONFIG_ARCH_INTERRUPTSTACK + 4) & ~7)
|
||||||
g_intstackbase:
|
g_intstackbase:
|
||||||
|
@ -50,7 +50,7 @@
|
|||||||
* nested interrupt, the interrupt stack if no privileged task has run.
|
* nested interrupt, the interrupt stack if no privileged task has run.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
# if defined(CONFIG_BUILD_PROTECTED) && CONFIG_ARCH_INTERRUPTSTACK < 4
|
# if defined(CONFIG_BUILD_PROTECTED) && CONFIG_ARCH_INTERRUPTSTACK < 8
|
||||||
# error Interrupt stack must be used with high priority interrupts in kernel mode
|
# error Interrupt stack must be used with high priority interrupts in kernel mode
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
@ -373,7 +373,7 @@ exception_common:
|
|||||||
.bss
|
.bss
|
||||||
.global g_intstackalloc
|
.global g_intstackalloc
|
||||||
.global g_intstackbase
|
.global g_intstackbase
|
||||||
.align 8
|
.balign 8
|
||||||
g_intstackalloc:
|
g_intstackalloc:
|
||||||
.skip ((CONFIG_ARCH_INTERRUPTSTACK + 4) & ~7)
|
.skip ((CONFIG_ARCH_INTERRUPTSTACK + 4) & ~7)
|
||||||
g_intstackbase:
|
g_intstackbase:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user