xen: Remove the arch specific header init.h
PATCH 1/1 xen: Remove the arch specific header init.h
From: Julien Grall <[email protected]>
Both x86 and (soon) RISC-V version of init.h are empty. On Arm, it contains a structure that should not be used by any common code.
The structure init_info is used to store information to setup the CPU currently being brought-up. setup.h seems to be more suitable even though the header is getting quite crowded.
Looking through the history, <asm/init.h> was introduced at the same time as the ia64 port because for some reasons most of the macros where duplicated. This was changed in 72c07f413879 and I don't foresee any reason to require arch specific definition for init.h in the near future.
Therefore remove asm/init.h for both x86 and arm (the only definition is moved in setup.h). With that RISC-V will not need to introduce an empty header.
---
cc: Oleksii Kurochko <[email protected]>
--- xen/arch/arm/arm32/asm-offsets.c | 1 + xen/arch/arm/arm64/asm-offsets.c | 1 + xen/arch/arm/include/asm/init.h | 20 -------------------- xen/arch/arm/include/asm/setup.h | 8 ++++++++ xen/arch/x86/acpi/power.c | 1 - xen/arch/x86/include/asm/init.h | 4 ---- xen/include/xen/init.h | 2 -- 7 files changed, 10 insertions(+), 27 deletions(-) delete mode 100644 xen/arch/arm/include/asm/init.h delete mode 100644 xen/arch/x86/include/asm/init.h
xen/arch/arm/arm32/asm-offsets.c +1 -0
@@ -11,6 +11,7 @@#include <public/xen.h> #include <asm/current.h> #include <asm/procinfo.h> +#include <asm/setup.h> #define DEFINE(_sym, _val) \ asm volatile ("\n.ascii\"==>#define " #_sym " %0 /* " #_val " */<==\"" \
xen/arch/arm/arm64/asm-offsets.c +1 -0
@@ -10,6 +10,7 @@#include <xen/bitops.h> #include <public/xen.h> #include <asm/current.h> +#include <asm/setup.h> #include <asm/smccc.h> #define DEFINE (_sym, _val) \
xen/arch/arm/include/asm/init.h deleted +0 -20
@@ -1,20 +0,0 @@ -#ifndef _XEN_ASM_INIT_H -#define _XEN_ASM_INIT_H - -struct init_info -{ -/* Pointer to the stack, used by head.S when entering in C */ -unsigned char *stack; -/* Logical CPU ID, used by start_secondary */ -unsigned int cpuid; -}; - -#endif /* _XEN_ASM_INIT_H */ -/* -* Local variables: -* mode: C -* c-file-style: "BSD" -* c-basic-offset: 4 -* indent-tabs-mode: nil -* End: -*/
xen/arch/arm/include/asm/setup.h +8 -0
@@ -168,6 +168,14 @@ int map_range_to_domain(const struct dt_device_node *dev,extern const char __ro_after_init_start[], __ro_after_init_end[]; +struct init_info +{ +/* Pointer to the stack, used by head.S when entering in C */ +unsigned char *stack; +/* Logical CPU ID, used by start_secondary */ +unsigned int cpuid; +}; +#endif /* * Local variables:
xen/arch/x86/acpi/power.c +0 -1
@@ -17,7 +17,6 @@#include <xen/sched.h> #include <asm/acpi.h> #include <asm/irq.h> -#include <asm/init.h> #include <xen/spinlock.h> #include <xen/sched.h> #include <xen/domain.h>
xen/arch/x86/include/asm/init.h deleted +0 -4
@@ -1,4 +0,0 @@ -#ifndef _XEN_ASM_INIT_H -#define _XEN_ASM_INIT_H - -#endif /* _XEN_ASM_INIT_H */
xen/include/xen/init.h +0 -2
@@ -1,8 +1,6 @@#ifndef _LINUX_INIT_H#define _LINUX_INIT_H -#include <asm/init.h> -/* * Mark functions and data as being only used at initialization * or exit time.
Signature · 1 line
2.38.1
Quoted 15 lines · Julien Grall
From: Julien Grall <[email protected]>
Both x86 and (soon) RISC-V version of
init.hare empty. On Arm, it contains a structure that should not be used by any common code.The structure
init_infois used to store information to setup the CPU currently being brought-up.setup.hseems to be more suitable even though the header is getting quite crowded.Looking through the history, <
asm/init.h> was introduced at the same time as the ia64 port because for some reasons most of the macros where duplicated. This was changed in72c07f413879and I don't foresee any reason to require arch specific definition forinit.hin the near future.
Quoted 6 lines
Therefore remove
asm/init.hfor both x86 and arm (the only definition is moved insetup.h). With that RISC-V will not need to introduce an empty header.Suggested-by Jan Beulich <[email protected]>Signed-off-by Julien Grall <[email protected]>
Quoted 16 lines · Julien Grall
From: Julien Grall <[email protected]>
Both x86 and (soon) RISC-V version of
init.hare empty. On Arm, it contains a structure that should not be used by any common code.The structure
init_infois used to store information to setup the CPU currently being brought-up.setup.hseems to be more suitable even though the header is getting quite crowded.Looking through the history, <
asm/init.h> was introduced at the same time as the ia64 port because for some reasons most of the macros where duplicated. This was changed in72c07f413879and I don't foresee any reason to require arch specific definition forinit.hin the near future.
Quoted 6 lines
Therefore remove
asm/init.hfor both x86 and arm (the only definition is moved insetup.h). With that RISC-V will not need to introduce an empty header.Suggested-by Jan Beulich <[email protected]>Signed-off-by Julien Grall <[email protected]>
Alistair
Quoted 123 lines
---
cc: Oleksii Kurochko <[email protected]>--- xen/arch/arm/arm32/asm-offsets.c | 1 + xen/arch/arm/arm64/asm-offsets.c | 1 + xen/arch/arm/include/asm/init.h | 20 -------------------- xen/arch/arm/include/asm/setup.h | 8 ++++++++ xen/arch/x86/acpi/power.c | 1 - xen/arch/x86/include/asm/init.h | 4 ---- xen/include/xen/init.h | 2 -- 7 files changed, 10 insertions(+), 27 deletions(-) delete mode 100644 xen/arch/arm/include/asm/init.h delete mode 100644 xen/arch/x86/include/asm/init.hxen/arch/arm/arm32/asm-offsets.c +1
-0@@ -11,6 +11,7 @@#include <public/xen.h> #include <asm/current.h> #include <asm/procinfo.h> +#include <asm/setup.h> #define DEFINE(_sym, _val) \ asm volatile ("\n.ascii\"==>#define " #_sym " %0 /* " #_val " */<==\"" \xen/arch/arm/arm64/asm-offsets.c +1
-0@@ -10,6 +10,7 @@#include <xen/bitops.h> #include <public/xen.h> #include <asm/current.h> +#include <asm/setup.h> #include <asm/smccc.h> #define DEFINE (_sym, _val) \xen/arch/arm/include/asm/init.h deleted +0
-20@@ -1,20 +0,0 @@ -#ifndef _XEN_ASM_INIT_H -#define _XEN_ASM_INIT_H - -struct init_info -{ -/* Pointer to the stack, used by head.S when entering in C */ -unsigned char *stack; -/* Logical CPU ID, used by start_secondary */ -unsigned int cpuid; -}; - -#endif /* _XEN_ASM_INIT_H */ -/* -* Local variables: -* mode: C -* c-file-style: "BSD" -* c-basic-offset: 4 -* indent-tabs-mode: nil -* End: -*/ xen/arch/arm/include/asm/setup.h +8
-0@@ -168,6 +168,14 @@ int map_range_to_domain(const struct dt_device_node *dev,extern const char __ro_after_init_start[], __ro_after_init_end[]; +struct init_info +{ +/* Pointer to the stack, used by head.S when entering in C */ +unsigned char *stack; +/* Logical CPU ID, used by start_secondary */ +unsigned int cpuid; +}; +#endif /* * Local variables: xen/arch/x86/acpi/power.c +0
-1@@ -17,7 +17,6 @@#include <xen/sched.h> #include <asm/acpi.h> #include <asm/irq.h> -#include <asm/init.h> #include <xen/spinlock.h> #include <xen/sched.h> #include <xen/domain.h> xen/arch/x86/include/asm/init.h deleted +0
-4@@ -1,4 +0,0 @@ -#ifndef _XEN_ASM_INIT_H -#define _XEN_ASM_INIT_H - -#endif /* _XEN_ASM_INIT_H */ xen/include/xen/init.h +0
-3@@ -1,8 +1,6 @@#ifndef _LINUX_INIT_H#define _LINUX_INIT_H -#include <asm/init.h> -/* * Mark functions and data as being only used at initialization * or exit time. -- 2.38.1
Quoted 19 lines · Julien Grall
From: Julien Grall <[email protected]>
Both x86 and (soon) RISC-V version of
init.hare empty. On Arm, it contains a structure that should not be used by any common code.The structure
init_infois used to store information to setup the CPU currently being brought-up.setup.hseems to be more suitable even though the header is getting quite crowded.Looking through the history, <
asm/init.h> was introduced at the same time as the ia64 port because for some reasons most of the macros where duplicated. This was changed in72c07f413879and I don't foresee any reason to require arch specific definition forinit.hin the near future.
Quoted 7 lines
Therefore remove
asm/init.hfor both x86 and arm (the only definition is moved insetup.h). With that RISC-V will not need to introduce an empty header.Suggested-by Jan Beulich <[email protected]>Signed-off-by Julien Grall <[email protected]>
Hi Julien,
The arm part looks good to me, I’ve also built x86, arm32 and arm64 and no problems found.
Quoted 15 lines · Julien Grall
From: Julien Grall <[email protected]>
Both x86 and (soon) RISC-V version of
init.hare empty. On Arm, it contains a structure that should not be used by any common code.The structure
init_infois used to store information to setup the CPU currently being brought-up.setup.hseems to be more suitable even though the header is getting quite crowded.Looking through the history, <
asm/init.h> was introduced at the same time as the ia64 port because for some reasons most of the macros where duplicated. This was changed in72c07f413879and I don't foresee any reason to require arch specific definition forinit.hin the near future.
Quoted 6 lines
Therefore remove
asm/init.hfor both x86 and arm (the only definition is moved insetup.h). With that RISC-V will not need to introduce an empty header.Suggested-by Jan Beulich <[email protected]>Signed-off-by Julien Grall <[email protected]>