From 3664ed64c3c1f4a0e9022a35c021340fed6a2c94 Mon Sep 17 00:00:00 2001 From: Daniel Leung Date: Wed, 8 Nov 2023 08:54:57 -0800 Subject: [PATCH] arch: move arch_interface.h under zephyr/arch arch_interface.h is for architecture and should not be under sys/. So move it under include/zephyr/arch/. Signed-off-by: Daniel Leung --- arch/arm64/core/smp.c | 2 +- arch/riscv/core/pmp.c | 2 +- arch/xtensa/include/xtensa_internal.h | 2 +- drivers/interrupt_controller/intc_cavs.c | 2 +- drivers/sensor/qdec_nxp_s32/qdec_nxp_s32.c | 2 +- include/zephyr/{sys => arch}/arch_interface.h | 6 +++--- include/zephyr/arch/cpu.h | 2 +- include/zephyr/internal/syscall_handler.h | 2 +- include/zephyr/kernel/thread.h | 2 +- include/zephyr/timing/timing.h | 2 +- kernel/include/kernel_arch_interface.h | 4 ++-- samples/kernel/condition_variables/condvar/src/main.c | 1 - samples/kernel/condition_variables/simple/src/main.c | 1 - subsys/shell/modules/device_service.c | 2 +- subsys/testsuite/include/zephyr/interrupt_util.h | 2 +- subsys/testsuite/ztest/include/zephyr/arch/cpu.h | 2 +- tests/arch/common/timing/src/main.c | 2 +- 17 files changed, 18 insertions(+), 20 deletions(-) rename include/zephyr/{sys => arch}/arch_interface.h (99%) diff --git a/arch/arm64/core/smp.c b/arch/arm64/core/smp.c index 97fd60b423..76ccd77090 100644 --- a/arch/arm64/core/smp.c +++ b/arch/arm64/core/smp.c @@ -21,7 +21,7 @@ #include #include #include -#include +#include #include #include #include "boot.h" diff --git a/arch/riscv/core/pmp.c b/arch/riscv/core/pmp.c index bfeb1c025c..3807b3b103 100644 --- a/arch/riscv/core/pmp.c +++ b/arch/riscv/core/pmp.c @@ -29,7 +29,7 @@ #include #include #include -#include +#include #include #define LOG_LEVEL CONFIG_MPU_LOG_LEVEL diff --git a/arch/xtensa/include/xtensa_internal.h b/arch/xtensa/include/xtensa_internal.h index b97c109a99..60b512ab57 100644 --- a/arch/xtensa/include/xtensa_internal.h +++ b/arch/xtensa/include/xtensa_internal.h @@ -11,7 +11,7 @@ #include #include -#include +#include /** * @ingroup xtensa_internal_apis diff --git a/drivers/interrupt_controller/intc_cavs.c b/drivers/interrupt_controller/intc_cavs.c index 4313bbecfa..47e4940e13 100644 --- a/drivers/interrupt_controller/intc_cavs.c +++ b/drivers/interrupt_controller/intc_cavs.c @@ -10,7 +10,7 @@ #include #include #include -#include +#include #include "intc_cavs.h" #if defined(CONFIG_SMP) && (CONFIG_MP_MAX_NUM_CPUS > 1) diff --git a/drivers/sensor/qdec_nxp_s32/qdec_nxp_s32.c b/drivers/sensor/qdec_nxp_s32/qdec_nxp_s32.c index 1b233d500e..56e31f357f 100644 --- a/drivers/sensor/qdec_nxp_s32/qdec_nxp_s32.c +++ b/drivers/sensor/qdec_nxp_s32/qdec_nxp_s32.c @@ -10,7 +10,7 @@ #include #include #include -#include +#include #ifndef M_PI #define M_PI 3.14159265358979323846 diff --git a/include/zephyr/sys/arch_interface.h b/include/zephyr/arch/arch_interface.h similarity index 99% rename from include/zephyr/sys/arch_interface.h rename to include/zephyr/arch/arch_interface.h index 0ffc95c663..9faa9df005 100644 --- a/include/zephyr/sys/arch_interface.h +++ b/include/zephyr/arch/arch_interface.h @@ -24,8 +24,8 @@ * include/kernel.h and other public headers depend on definitions in this * header. */ -#ifndef ZEPHYR_INCLUDE_SYS_ARCH_INTERFACE_H_ -#define ZEPHYR_INCLUDE_SYS_ARCH_INTERFACE_H_ +#ifndef ZEPHYR_INCLUDE_ARCH_ARCH_INTERFACE_H_ +#define ZEPHYR_INCLUDE_ARCH_ARCH_INTERFACE_H_ #ifndef _ASMLANGUAGE #include @@ -1248,4 +1248,4 @@ void arch_spin_relax(void); #endif /* _ASMLANGUAGE */ -#endif /* ZEPHYR_INCLUDE_SYS_ARCH_INTERFACE_H_ */ +#endif /* ZEPHYR_INCLUDE_ARCH_ARCH_INTERFACE_H_ */ diff --git a/include/zephyr/arch/cpu.h b/include/zephyr/arch/cpu.h index 17ec125b39..11abe8df8c 100644 --- a/include/zephyr/arch/cpu.h +++ b/include/zephyr/arch/cpu.h @@ -9,7 +9,7 @@ #ifndef ZEPHYR_INCLUDE_ARCH_CPU_H_ #define ZEPHYR_INCLUDE_ARCH_CPU_H_ -#include +#include #if defined(CONFIG_X86) #include diff --git a/include/zephyr/internal/syscall_handler.h b/include/zephyr/internal/syscall_handler.h index a9b9a642c7..d387962191 100644 --- a/include/zephyr/internal/syscall_handler.h +++ b/include/zephyr/internal/syscall_handler.h @@ -17,7 +17,7 @@ #ifndef _ASMLANGUAGE #include -#include +#include #include #include #include diff --git a/include/zephyr/kernel/thread.h b/include/zephyr/kernel/thread.h index 91cf710e87..c319404f44 100644 --- a/include/zephyr/kernel/thread.h +++ b/include/zephyr/kernel/thread.h @@ -12,7 +12,7 @@ #endif #include -#include +#include /** * @typedef k_thread_entry_t diff --git a/include/zephyr/timing/timing.h b/include/zephyr/timing/timing.h index a0c4a644ab..d4191d10b3 100644 --- a/include/zephyr/timing/timing.h +++ b/include/zephyr/timing/timing.h @@ -7,7 +7,7 @@ #ifndef ZEPHYR_INCLUDE_TIMING_TIMING_H_ #define ZEPHYR_INCLUDE_TIMING_TIMING_H_ -#include +#include #include #ifdef __cplusplus diff --git a/kernel/include/kernel_arch_interface.h b/kernel/include/kernel_arch_interface.h index 7388446352..a20c7a706b 100644 --- a/kernel/include/kernel_arch_interface.h +++ b/kernel/include/kernel_arch_interface.h @@ -9,7 +9,7 @@ * @brief Internal kernel APIs implemented at the architecture layer. * * Not all architecture-specific defines are here, APIs that are used - * by public functions and macros are defined in include/sys/arch_interface.h. + * by public functions and macros are defined in include/zephyr/arch/arch_interface.h. * * For all inline functions prototyped here, the implementation is expected * to be provided by arch/ARCH/include/kernel_arch_func.h @@ -18,7 +18,7 @@ #define ZEPHYR_KERNEL_INCLUDE_KERNEL_ARCH_INTERFACE_H_ #include -#include +#include #ifndef _ASMLANGUAGE diff --git a/samples/kernel/condition_variables/condvar/src/main.c b/samples/kernel/condition_variables/condvar/src/main.c index 7f7278814c..5eb064e407 100644 --- a/samples/kernel/condition_variables/condvar/src/main.c +++ b/samples/kernel/condition_variables/condvar/src/main.c @@ -5,7 +5,6 @@ */ #include #include -#include #define NUM_THREADS 3 #define TCOUNT 10 diff --git a/samples/kernel/condition_variables/simple/src/main.c b/samples/kernel/condition_variables/simple/src/main.c index d8aba186a3..6fc2951b72 100644 --- a/samples/kernel/condition_variables/simple/src/main.c +++ b/samples/kernel/condition_variables/simple/src/main.c @@ -6,7 +6,6 @@ #include #include -#include #define NUM_THREADS 20 #define STACK_SIZE (1024) diff --git a/subsys/shell/modules/device_service.c b/subsys/shell/modules/device_service.c index c11c8b4a7b..fec4b25f6b 100644 --- a/subsys/shell/modules/device_service.c +++ b/subsys/shell/modules/device_service.c @@ -12,7 +12,7 @@ #include #include #include -#include +#include static const char *get_device_name(const struct device *dev, char *buf, diff --git a/subsys/testsuite/include/zephyr/interrupt_util.h b/subsys/testsuite/include/zephyr/interrupt_util.h index 61d1206d5f..0bccd53cc5 100644 --- a/subsys/testsuite/include/zephyr/interrupt_util.h +++ b/subsys/testsuite/include/zephyr/interrupt_util.h @@ -109,7 +109,7 @@ static inline void trigger_irq(int irq) #include #define VECTOR_MASK 0xFF #else -#include +#include #define LOAPIC_ICR_IPI_TEST 0x00004000U #endif diff --git a/subsys/testsuite/ztest/include/zephyr/arch/cpu.h b/subsys/testsuite/ztest/include/zephyr/arch/cpu.h index 5969b0ce10..db65632029 100644 --- a/subsys/testsuite/ztest/include/zephyr/arch/cpu.h +++ b/subsys/testsuite/ztest/include/zephyr/arch/cpu.h @@ -61,7 +61,7 @@ static inline bool arch_irq_unlocked(unsigned int key) } #endif /* __cplusplus */ -#include +#include #endif /* ZEPHYR_SUBSYS_TESTSUITE_ZTEST_INCLUDE_ARCH_CPU_H */ diff --git a/tests/arch/common/timing/src/main.c b/tests/arch/common/timing/src/main.c index 4beaee01f8..83ff500a11 100644 --- a/tests/arch/common/timing/src/main.c +++ b/tests/arch/common/timing/src/main.c @@ -5,7 +5,7 @@ */ #include #include -#include +#include #if defined(CONFIG_SMP) && CONFIG_MP_MAX_NUM_CPUS > 1 #define SMP_TEST