From d61c679d43dc2390f2a70c82f96607fb22b6fadf Mon Sep 17 00:00:00 2001 From: Flavio Ceolin Date: Wed, 17 Apr 2019 13:15:26 -0700 Subject: [PATCH] arch: all: Remove legacy code The struct _kernel_ach exists only because ARC' s port needed it, in all other ports this was defined as an empty struct. Turns out that this struct is not required even for ARC anymore, this is a legacy code from nanokernel time. Signed-off-by: Flavio Ceolin --- arch/arc/include/kernel_arch_data.h | 13 ------------- arch/arm/include/kernel_arch_data.h | 6 ------ arch/nios2/include/kernel_arch_data.h | 6 ------ arch/posix/include/kernel_arch_data.h | 6 ------ arch/riscv32/include/kernel_arch_data.h | 6 ------ arch/x86/include/kernel_arch_data.h | 6 ------ arch/x86_64/include/kernel_arch_data.h | 2 -- arch/xtensa/include/kernel_arch_data.h | 5 ----- kernel/include/kernel_offsets.h | 1 - kernel/include/kernel_structs.h | 3 --- 10 files changed, 54 deletions(-) diff --git a/arch/arc/include/kernel_arch_data.h b/arch/arc/include/kernel_arch_data.h index c5aa471d13c..98950803319 100644 --- a/arch/arc/include/kernel_arch_data.h +++ b/arch/arc/include/kernel_arch_data.h @@ -162,19 +162,6 @@ struct _callee_saved_stack { typedef struct _callee_saved_stack _callee_saved_stack_t; -struct _kernel_arch { - - char *rirq_sp; /* regular IRQ stack pointer base */ - - /* - * FIRQ stack pointer is installed once in the second bank's SP, so - * there is no need to track it in _kernel. - */ - -}; - -typedef struct _kernel_arch _kernel_arch_t; - #endif /* _ASMLANGUAGE */ /* stacks */ diff --git a/arch/arm/include/kernel_arch_data.h b/arch/arm/include/kernel_arch_data.h index c47d5dde77f..794a4c77dca 100644 --- a/arch/arm/include/kernel_arch_data.h +++ b/arch/arm/include/kernel_arch_data.h @@ -55,12 +55,6 @@ typedef struct __esf _esf_t; #ifndef _ASMLANGUAGE -struct _kernel_arch { - /* empty */ -}; - -typedef struct _kernel_arch _kernel_arch_t; - #endif /* _ASMLANGUAGE */ #ifdef __cplusplus diff --git a/arch/nios2/include/kernel_arch_data.h b/arch/nios2/include/kernel_arch_data.h index 08be33ad463..c4fed91e57b 100644 --- a/arch/nios2/include/kernel_arch_data.h +++ b/arch/nios2/include/kernel_arch_data.h @@ -47,12 +47,6 @@ extern "C" { #ifndef _ASMLANGUAGE -struct _kernel_arch { - /* nothing for now */ -}; - -typedef struct _kernel_arch _kernel_arch_t; - extern K_THREAD_STACK_DEFINE(_interrupt_stack, CONFIG_ISR_STACK_SIZE); #endif /* _ASMLANGUAGE */ diff --git a/arch/posix/include/kernel_arch_data.h b/arch/posix/include/kernel_arch_data.h index 5f50adcc04f..ff2394c3abc 100644 --- a/arch/posix/include/kernel_arch_data.h +++ b/arch/posix/include/kernel_arch_data.h @@ -27,12 +27,6 @@ extern "C" { #ifndef _ASMLANGUAGE -struct _kernel_arch { - /* empty */ -}; - -typedef struct _kernel_arch _kernel_arch_t; - #endif /* _ASMLANGUAGE */ #ifdef __cplusplus diff --git a/arch/riscv32/include/kernel_arch_data.h b/arch/riscv32/include/kernel_arch_data.h index 6f6b6a5b234..ffacc4fe511 100644 --- a/arch/riscv32/include/kernel_arch_data.h +++ b/arch/riscv32/include/kernel_arch_data.h @@ -31,12 +31,6 @@ extern "C" { #include #include -struct _kernel_arch { - /* nothing for now */ -}; - -typedef struct _kernel_arch _kernel_arch_t; - extern K_THREAD_STACK_DEFINE(_interrupt_stack, CONFIG_ISR_STACK_SIZE); #endif /* _ASMLANGUAGE */ diff --git a/arch/x86/include/kernel_arch_data.h b/arch/x86/include/kernel_arch_data.h index e595f85980c..e06430517d8 100644 --- a/arch/x86/include/kernel_arch_data.h +++ b/arch/x86/include/kernel_arch_data.h @@ -413,12 +413,6 @@ extern void z_x86_thread_entry_wrapper(k_thread_entry_t entry, extern "C" { #endif - -struct _kernel_arch { -}; - -typedef struct _kernel_arch _kernel_arch_t; - #ifdef __cplusplus } #endif diff --git a/arch/x86_64/include/kernel_arch_data.h b/arch/x86_64/include/kernel_arch_data.h index 827bb3cd08d..3dc8f90bc88 100644 --- a/arch/x86_64/include/kernel_arch_data.h +++ b/arch/x86_64/include/kernel_arch_data.h @@ -6,6 +6,4 @@ #ifndef _KERNEL_ARCH_DATA_H #define _KERNEL_ARCH_DATA_H -struct _kernel_arch { }; - #endif /* _KERNEL_ARCH_DATA_H */ diff --git a/arch/xtensa/include/kernel_arch_data.h b/arch/xtensa/include/kernel_arch_data.h index 17c4ab59c02..636ec1d6521 100644 --- a/arch/xtensa/include/kernel_arch_data.h +++ b/arch/xtensa/include/kernel_arch_data.h @@ -47,11 +47,6 @@ extern "C" { typedef struct __esf __esf_t; -struct _kernel_arch { -}; - -typedef struct _kernel_arch _kernel_arch_t; - #endif /*! _ASMLANGUAGE && ! __ASSEMBLER__ */ #ifdef CONFIG_USE_SWITCH diff --git a/kernel/include/kernel_offsets.h b/kernel/include/kernel_offsets.h index cb459c96a2f..7eb590a18d0 100644 --- a/kernel/include/kernel_offsets.h +++ b/kernel/include/kernel_offsets.h @@ -36,7 +36,6 @@ GEN_OFFSET_SYM(_kernel_t, idle); #endif GEN_OFFSET_SYM(_kernel_t, ready_q); -GEN_OFFSET_SYM(_kernel_t, arch); #ifndef CONFIG_SMP GEN_OFFSET_SYM(_ready_q_t, cache); diff --git a/kernel/include/kernel_structs.h b/kernel/include/kernel_structs.h index dd625d5844a..f40df4a1f1e 100644 --- a/kernel/include/kernel_structs.h +++ b/kernel/include/kernel_structs.h @@ -167,9 +167,6 @@ struct z_kernel { #if defined(CONFIG_THREAD_MONITOR) struct k_thread *threads; /* singly linked list of ALL threads */ #endif - - /* arch-specific part of _kernel */ - struct _kernel_arch arch; }; typedef struct z_kernel _kernel_t;