diff --git a/arch/arm/src/stm32l4/stm32l4.h b/arch/arm/src/stm32l4/stm32l4.h index f8ad428d70..1f22efec7c 100644 --- a/arch/arm/src/stm32l4/stm32l4.h +++ b/arch/arm/src/stm32l4/stm32l4.h @@ -94,4 +94,3 @@ #include "stm32l4_lowputc.h" #endif /* __ARCH_ARM_SRC_STM32_STM32_H */ - diff --git a/arch/arm/src/stm32l4/stm32l4_irq.c b/arch/arm/src/stm32l4/stm32l4_irq.c index e12a362a6e..e0e963c66d 100644 --- a/arch/arm/src/stm32l4/stm32l4_irq.c +++ b/arch/arm/src/stm32l4/stm32l4_irq.c @@ -76,11 +76,13 @@ * Public Data ****************************************************************************/ -/* This is the address of current interrupt saved state data. Used for - * context switching. Only value during interrupt handling. +/* g_current_regs[] holds a references to the current interrupt level + * register storage structure. If is non-NULL only during interrupt + * processing. Access to g_current_regs[] must be through the macro + * CURRENT_REGS for portability. */ -volatile uint32_t *current_regs; +volatile uint32_t *g_current_regs[1]; /* This is the address of the exception vector table (determined by the * linker script). @@ -370,7 +372,7 @@ void up_irqinitialize(void) /* currents_regs is non-NULL only while processing an interrupt */ - current_regs = NULL; + CURRENT_REGS = NULL; /* Attach the SVCall and Hard Fault exception handlers. The SVCall * exception is used for performing context switches; The Hard Fault