From 4be1f45d1e0f589e8ef305ef460729c13d814594 Mon Sep 17 00:00:00 2001 From: Ioannis Glaropoulos Date: Tue, 24 Sep 2019 10:38:38 +0200 Subject: [PATCH] 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 --- arch/arm/core/cortex_m/irq_init.c | 9 --------- arch/common/timing_info_bench.c | 5 ++--- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/arch/arm/core/cortex_m/irq_init.c b/arch/arm/core/cortex_m/irq_init.c index 9ec017fdf4..988fd2cde1 100644 --- a/arch/arm/core/cortex_m/irq_init.c +++ b/arch/arm/core/cortex_m/irq_init.c @@ -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 -#include -#include #include #include diff --git a/arch/common/timing_info_bench.c b/arch/common/timing_info_bench.c index 66302c6362..47c64a63d0 100644 --- a/arch/common/timing_info_bench.c +++ b/arch/common/timing_info_bench.c @@ -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 -#endif #ifdef CONFIG_NRF_RTC_TIMER +#include /* 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 #define TIMING_INFO_PRE_READ() #define TIMING_INFO_OS_GET_TIME() (k_cycle_get_32()) #define TIMING_INFO_GET_TIMER_VALUE() (SysTick->VAL)