arch: arm: aarch32: Fix incorrect z_arm_{int,exc}_exit usage
In the ARM Cortex-M architecture implementation, the concepts of "exceptions" and "interrupts" are interchangeable; whereas, in the Cortex-A/-R architecture implementation, they are considered separate and therefore handled differently (i.e. `z_arm_exc_exit` cannot be used to exit an "interrupt"). This commit fixes all `z_arm_exc_exit` usages in the interrupt handlers to use `z_arm_int_exit`. NOTE: In terms of the ARM AArch32 Cortex-A and Cortex-R architecture implementations, the "exceptions" refer to the "Undefined Instruction (UNDEF)" and "Prefetch/Data Abort (PABT/DABT)" exceptions, while "interrupts" refer to the "Interrupt (IRQ)", "Fast Interrupt (FIQ)" and "Software Interrupt/Supervisor Call (SWI/SVC)". Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
This commit is contained in:
parent
b14d53435b
commit
c442203c08
2 changed files with 2 additions and 4 deletions
|
@ -91,5 +91,5 @@ void z_NmiHandlerSet(void (*pHandler)(void))
|
||||||
void z_arm_nmi(void)
|
void z_arm_nmi(void)
|
||||||
{
|
{
|
||||||
handler();
|
handler();
|
||||||
z_arm_exc_exit();
|
z_arm_int_exit();
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,8 +8,6 @@
|
||||||
#include <spinlock.h>
|
#include <spinlock.h>
|
||||||
#include <arch/arm/aarch32/cortex_m/cmsis.h>
|
#include <arch/arm/aarch32/cortex_m/cmsis.h>
|
||||||
|
|
||||||
void z_arm_exc_exit(void);
|
|
||||||
|
|
||||||
#define COUNTER_MAX 0x00ffffff
|
#define COUNTER_MAX 0x00ffffff
|
||||||
#define TIMER_STOPPED 0xff000000
|
#define TIMER_STOPPED 0xff000000
|
||||||
|
|
||||||
|
@ -148,7 +146,7 @@ void z_clock_isr(void *arg)
|
||||||
} else {
|
} else {
|
||||||
z_clock_announce(1);
|
z_clock_announce(1);
|
||||||
}
|
}
|
||||||
z_arm_exc_exit();
|
z_arm_int_exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
int z_clock_driver_init(struct device *device)
|
int z_clock_driver_init(struct device *device)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue