Commit c442203c authored by Stephanos Ioannidis's avatar Stephanos Ioannidis Committed by Carles Cufi
Browse files

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: default avatarStephanos Ioannidis <root@stephanos.io>
parent b14d5343
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -91,5 +91,5 @@ void z_NmiHandlerSet(void (*pHandler)(void))
void z_arm_nmi(void)
{
	handler();
	z_arm_exc_exit();
	z_arm_int_exit();
}
+1 −3
Original line number Diff line number Diff line
@@ -8,8 +8,6 @@
#include <spinlock.h>
#include <arch/arm/aarch32/cortex_m/cmsis.h>

void z_arm_exc_exit(void);

#define COUNTER_MAX 0x00ffffff
#define TIMER_STOPPED 0xff000000

@@ -148,7 +146,7 @@ void z_clock_isr(void *arg)
	} else {
		z_clock_announce(1);
	}
	z_arm_exc_exit();
	z_arm_int_exit();
}

int z_clock_driver_init(struct device *device)