Merged in dcabecinhas/nuttx/fix_intstack_allocation (pull request #269)
ARM: Fix off-by-one interrupt stack allocation in 8-byte aligned architectures Approved-by: Gregory Nutt
This commit is contained in:
commit
116841138b
@ -323,7 +323,7 @@ exception_common:
|
|||||||
.global g_intstackbase
|
.global g_intstackbase
|
||||||
.align 8
|
.align 8
|
||||||
g_intstackalloc:
|
g_intstackalloc:
|
||||||
.skip (CONFIG_ARCH_INTERRUPTSTACK & ~7)
|
.skip ((CONFIG_ARCH_INTERRUPTSTACK + 4) & ~7)
|
||||||
g_intstackbase:
|
g_intstackbase:
|
||||||
.size g_intstackalloc, .-g_intstackalloc
|
.size g_intstackalloc, .-g_intstackalloc
|
||||||
#endif
|
#endif
|
||||||
|
@ -235,7 +235,7 @@ exception_common:
|
|||||||
*
|
*
|
||||||
* Here:
|
* Here:
|
||||||
* r0 = Address of the register save area
|
* r0 = Address of the register save area
|
||||||
|
|
||||||
* NOTE: It is a requirement that up_restorefpu() preserve the value of
|
* NOTE: It is a requirement that up_restorefpu() preserve the value of
|
||||||
* r0!
|
* r0!
|
||||||
*/
|
*/
|
||||||
@ -355,7 +355,7 @@ exception_common:
|
|||||||
.global g_intstackbase
|
.global g_intstackbase
|
||||||
.align 8
|
.align 8
|
||||||
g_intstackalloc:
|
g_intstackalloc:
|
||||||
.skip (CONFIG_ARCH_INTERRUPTSTACK & ~7)
|
.skip ((CONFIG_ARCH_INTERRUPTSTACK + 4) & ~7)
|
||||||
g_intstackbase:
|
g_intstackbase:
|
||||||
.size g_intstackalloc, .-g_intstackalloc
|
.size g_intstackalloc, .-g_intstackalloc
|
||||||
#endif
|
#endif
|
||||||
|
@ -106,7 +106,7 @@ static inline void up_color_intstack(void)
|
|||||||
uint32_t *ptr = (uint32_t *)&g_intstackalloc;
|
uint32_t *ptr = (uint32_t *)&g_intstackalloc;
|
||||||
ssize_t size;
|
ssize_t size;
|
||||||
|
|
||||||
for (size = (CONFIG_ARCH_INTERRUPTSTACK & ~7);
|
for (size = (CONFIG_ARCH_INTERRUPTSTACK & ~3);
|
||||||
size > 0;
|
size > 0;
|
||||||
size -= sizeof(uint32_t))
|
size -= sizeof(uint32_t))
|
||||||
{
|
{
|
||||||
|
@ -484,7 +484,7 @@ exception_common:
|
|||||||
.global g_intstackbase
|
.global g_intstackbase
|
||||||
.align 8
|
.align 8
|
||||||
g_intstackalloc:
|
g_intstackalloc:
|
||||||
.skip (CONFIG_ARCH_INTERRUPTSTACK & ~7)
|
.skip ((CONFIG_ARCH_INTERRUPTSTACK + 4) & ~7)
|
||||||
g_intstackbase:
|
g_intstackbase:
|
||||||
.size g_intstackalloc, .-g_intstackalloc
|
.size g_intstackalloc, .-g_intstackalloc
|
||||||
#endif
|
#endif
|
||||||
|
@ -348,7 +348,7 @@ exception_common:
|
|||||||
*
|
*
|
||||||
* Here:
|
* Here:
|
||||||
* r0 = Address of the register save area
|
* r0 = Address of the register save area
|
||||||
|
|
||||||
* NOTE: It is a requirement that up_restorefpu() preserve the value of
|
* NOTE: It is a requirement that up_restorefpu() preserve the value of
|
||||||
* r0!
|
* r0!
|
||||||
*/
|
*/
|
||||||
@ -468,7 +468,7 @@ exception_common:
|
|||||||
.global g_intstackbase
|
.global g_intstackbase
|
||||||
.align 8
|
.align 8
|
||||||
g_intstackalloc:
|
g_intstackalloc:
|
||||||
.skip (CONFIG_ARCH_INTERRUPTSTACK & ~7)
|
.skip ((CONFIG_ARCH_INTERRUPTSTACK + 4) & ~7)
|
||||||
g_intstackbase:
|
g_intstackbase:
|
||||||
.size g_intstackalloc, .-g_intstackalloc
|
.size g_intstackalloc, .-g_intstackalloc
|
||||||
#endif
|
#endif
|
||||||
|
@ -362,7 +362,7 @@ exception_common:
|
|||||||
*
|
*
|
||||||
* Here:
|
* Here:
|
||||||
* r0 = Address of the register save area
|
* r0 = Address of the register save area
|
||||||
|
|
||||||
* NOTE: It is a requirement that up_restorefpu() preserve the value of
|
* NOTE: It is a requirement that up_restorefpu() preserve the value of
|
||||||
* r0!
|
* r0!
|
||||||
*/
|
*/
|
||||||
@ -482,7 +482,7 @@ exception_common:
|
|||||||
.global g_intstackbase
|
.global g_intstackbase
|
||||||
.align 8
|
.align 8
|
||||||
g_intstackalloc:
|
g_intstackalloc:
|
||||||
.skip (CONFIG_ARCH_INTERRUPTSTACK & ~7)
|
.skip ((CONFIG_ARCH_INTERRUPTSTACK + 4) & ~7)
|
||||||
g_intstackbase:
|
g_intstackbase:
|
||||||
.size g_intstackalloc, .-g_intstackalloc
|
.size g_intstackalloc, .-g_intstackalloc
|
||||||
#endif
|
#endif
|
||||||
|
@ -497,7 +497,7 @@ exception_common:
|
|||||||
.global g_intstackbase
|
.global g_intstackbase
|
||||||
.align 8
|
.align 8
|
||||||
g_intstackalloc:
|
g_intstackalloc:
|
||||||
.skip (CONFIG_ARCH_INTERRUPTSTACK & ~7)
|
.skip ((CONFIG_ARCH_INTERRUPTSTACK + 4) & ~7)
|
||||||
g_intstackbase:
|
g_intstackbase:
|
||||||
.size g_intstackalloc, .-g_intstackalloc
|
.size g_intstackalloc, .-g_intstackalloc
|
||||||
#endif
|
#endif
|
||||||
|
@ -1055,7 +1055,7 @@ l5:
|
|||||||
.global g_intstackbase
|
.global g_intstackbase
|
||||||
.align 8
|
.align 8
|
||||||
g_intstackalloc:
|
g_intstackalloc:
|
||||||
.skip (CONFIG_ARCH_INTERRUPTSTACK & ~7)
|
.skip ((CONFIG_ARCH_INTERRUPTSTACK + 4) & ~7)
|
||||||
g_intstackbase:
|
g_intstackbase:
|
||||||
.size g_intstackalloc, .-g_intstackalloc
|
.size g_intstackalloc, .-g_intstackalloc
|
||||||
#endif
|
#endif
|
||||||
|
@ -339,7 +339,7 @@ exception_common:
|
|||||||
*
|
*
|
||||||
* Here:
|
* Here:
|
||||||
* r0 = Address of the register save area
|
* r0 = Address of the register save area
|
||||||
|
|
||||||
* NOTE: It is a requirement that up_restorefpu() preserve the value of
|
* NOTE: It is a requirement that up_restorefpu() preserve the value of
|
||||||
* r0!
|
* r0!
|
||||||
*/
|
*/
|
||||||
@ -459,7 +459,7 @@ exception_common:
|
|||||||
.global g_intstackbase
|
.global g_intstackbase
|
||||||
.align 8
|
.align 8
|
||||||
g_intstackalloc:
|
g_intstackalloc:
|
||||||
.skip (CONFIG_ARCH_INTERRUPTSTACK & ~7)
|
.skip ((CONFIG_ARCH_INTERRUPTSTACK + 4) & ~7)
|
||||||
g_intstackbase:
|
g_intstackbase:
|
||||||
.size g_intstackalloc, .-g_intstackalloc
|
.size g_intstackalloc, .-g_intstackalloc
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user