arch/arm: Fix linker error: undefined reference to `g_intstackalloc'
when CONFIG_ARCH_INTERRUPTSTACK, CONFIG_SMP and CONFIG_STACK_COLORATION are true
This commit is contained in:
parent
272a1460c5
commit
d5905d5963
@ -211,9 +211,15 @@ ssize_t up_check_stack_remain(void)
|
|||||||
#if CONFIG_ARCH_INTERRUPTSTACK > 3
|
#if CONFIG_ARCH_INTERRUPTSTACK > 3
|
||||||
size_t up_check_intstack(void)
|
size_t up_check_intstack(void)
|
||||||
{
|
{
|
||||||
|
#ifdef CONFIG_SMP
|
||||||
|
return do_stackcheck(up_intstack_base(),
|
||||||
|
(CONFIG_ARCH_INTERRUPTSTACK & ~3),
|
||||||
|
true);
|
||||||
|
#else
|
||||||
return do_stackcheck((uintptr_t)&g_intstackalloc,
|
return do_stackcheck((uintptr_t)&g_intstackalloc,
|
||||||
(CONFIG_ARCH_INTERRUPTSTACK & ~3),
|
(CONFIG_ARCH_INTERRUPTSTACK & ~3),
|
||||||
true);
|
true);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t up_check_intstack_remain(void)
|
size_t up_check_intstack_remain(void)
|
||||||
|
@ -75,7 +75,11 @@
|
|||||||
#if defined(CONFIG_STACK_COLORATION) && CONFIG_ARCH_INTERRUPTSTACK > 3
|
#if defined(CONFIG_STACK_COLORATION) && CONFIG_ARCH_INTERRUPTSTACK > 3
|
||||||
static inline void up_color_intstack(void)
|
static inline void up_color_intstack(void)
|
||||||
{
|
{
|
||||||
|
#ifdef CONFIG_SMP
|
||||||
|
uint32_t *ptr = (uint32_t *)up_intstack_base();
|
||||||
|
#else
|
||||||
uint32_t *ptr = (uint32_t *)&g_intstackalloc;
|
uint32_t *ptr = (uint32_t *)&g_intstackalloc;
|
||||||
|
#endif
|
||||||
ssize_t size;
|
ssize_t size;
|
||||||
|
|
||||||
for (size = (CONFIG_ARCH_INTERRUPTSTACK & ~3);
|
for (size = (CONFIG_ARCH_INTERRUPTSTACK & ~3);
|
||||||
|
Loading…
Reference in New Issue
Block a user