arch: arm: minor clean-up in irq_init.c and timing_info_bench.c

- Remove redundant inclusions in irq_init.c
- Remove comment about thread_abort function,
  which does not belong in this file (probably
  left-out during code refactoring)
- Include arm cmsis.h only under #ifdef CONFIG_ARM

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
This commit is contained in:
Ioannis Glaropoulos 2019-09-24 10:38:38 +02:00
parent 35754375bc
commit 4be1f45d1e
2 changed files with 2 additions and 12 deletions

View file

@ -8,17 +8,8 @@
* @file
* @brief ARM Cortex-M interrupt initialization
*
* The ARM Cortex-M architecture provides its own k_thread_abort() to deal with
* different CPU modes (handler vs thread) when a thread aborts. When its entry
* point returns or when it aborts itself, the CPU is in thread mode and must
* call z_swap() (which triggers a service call), but when in handler mode, the
* CPU must exit handler mode to cause the context switch, and thus must queue
* the PendSV exception.
*/
#include <toolchain.h>
#include <linker/sections.h>
#include <kernel.h>
#include <arch/cpu.h>
#include <arch/arm/cortex_m/cmsis.h>

View file

@ -20,10 +20,8 @@ u32_t __read_swap_end_time_value;
u64_t __common_var_swap_end_time;
u64_t __temp_start_swap_time;
#if CONFIG_ARM
#include <arch/arm/cortex_m/cmsis.h>
#endif
#ifdef CONFIG_NRF_RTC_TIMER
#include <nrfx.h>
/* To get current count of timer, first 1 need to be written into
* Capture Register and Current Count will be copied into corresponding
@ -41,6 +39,7 @@ u64_t __temp_start_swap_time;
#define SUBTRACT_CLOCK_CYCLES(val) (val)
#elif CONFIG_ARM
#include <arch/arm/cortex_m/cmsis.h>
#define TIMING_INFO_PRE_READ()
#define TIMING_INFO_OS_GET_TIME() (k_cycle_get_32())
#define TIMING_INFO_GET_TIMER_VALUE() (SysTick->VAL)