From patchwork Wed Jan 11 11:44:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 13096505 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1AFF0C5479D for ; Wed, 11 Jan 2023 11:44:33 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.475231.736832 (Exim 4.92) (envelope-from ) id 1pFZWm-0000qm-7N; Wed, 11 Jan 2023 11:44:20 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 475231.736832; Wed, 11 Jan 2023 11:44:20 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1pFZWm-0000qf-4K; Wed, 11 Jan 2023 11:44:20 +0000 Received: by outflank-mailman (input) for mailman id 475231; Wed, 11 Jan 2023 11:44:18 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1pFZWk-0000qZ-MG for xen-devel@lists.xenproject.org; Wed, 11 Jan 2023 11:44:18 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1pFZWj-0005Uq-UA; Wed, 11 Jan 2023 11:44:17 +0000 Received: from 54-240-197-232.amazon.com ([54.240.197.232] helo=dev-dsk-jgrall-1b-035652ec.eu-west-1.amazon.com) by xenbits.xenproject.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pFZWj-0004U7-LW; Wed, 11 Jan 2023 11:44:17 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Content-Transfer-Encoding:MIME-Version:Message-Id:Date: Subject:Cc:To:From; bh=IqfAabigwW7CFHzU0bZ0FY9KOz/BysPhEjw0xmgSgig=; b=Gy3Snw FPKTAkG1qUEP9B/Bco0jMaZx0BKx8PW1ffs1HugeclmkrTKpKNVlnrKChowYRzR8eXFv63DX5ljo1 OBnOt9MsCW4mGAC1hU0Go3L28u6iv2S9k1EWjK/HuzVG/Fo1cUz7HGUK89Yp2o2TIj5XPYtUFQt8T RzG+oNgFc6Y=; From: Julien Grall To: xen-devel@lists.xenproject.org Cc: julien@xen.org, Julien Grall , Stefano Stabellini , Bertrand Marquis , Volodymyr Babchuk , Andrew Cooper , George Dunlap , Jan Beulich , Wei Liu , =?utf-8?q?Roger_Pau_Monn=C3=A9?= , Oleksii Kurochko Subject: [PATCH] xen: Remove the arch specific header init.h Date: Wed, 11 Jan 2023 11:44:09 +0000 Message-Id: <20230111114409.7495-1-julien@xen.org> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 From: Julien Grall 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, 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. Suggested-by: Jan Beulich Signed-off-by: Julien Grall Acked-by: Andrew Cooper Acked-by: Alistair Francis Reviewed-by: Luca Fancellu Reviewed-by: Jan Beulich --- cc: Oleksii Kurochko --- 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 diff --git a/xen/arch/arm/arm32/asm-offsets.c b/xen/arch/arm/arm32/asm-offsets.c index 2116ba5b95bf..05c692bb2822 100644 --- a/xen/arch/arm/arm32/asm-offsets.c +++ b/xen/arch/arm/arm32/asm-offsets.c @@ -11,6 +11,7 @@ #include #include #include +#include #define DEFINE(_sym, _val) \ asm volatile ("\n.ascii\"==>#define " #_sym " %0 /* " #_val " */<==\"" \ diff --git a/xen/arch/arm/arm64/asm-offsets.c b/xen/arch/arm/arm64/asm-offsets.c index 280ddb55bfd4..7226cd9b2eb0 100644 --- a/xen/arch/arm/arm64/asm-offsets.c +++ b/xen/arch/arm/arm64/asm-offsets.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #define DEFINE(_sym, _val) \ diff --git a/xen/arch/arm/include/asm/init.h b/xen/arch/arm/include/asm/init.h deleted file mode 100644 index 5ac8cf8797d6..000000000000 --- a/xen/arch/arm/include/asm/init.h +++ /dev/null @@ -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: - */ diff --git a/xen/arch/arm/include/asm/setup.h b/xen/arch/arm/include/asm/setup.h index fdbf68aadcaa..a926f30a2be4 100644 --- a/xen/arch/arm/include/asm/setup.h +++ b/xen/arch/arm/include/asm/setup.h @@ -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: diff --git a/xen/arch/x86/acpi/power.c b/xen/arch/x86/acpi/power.c index b76f673acb1a..d23335391c67 100644 --- a/xen/arch/x86/acpi/power.c +++ b/xen/arch/x86/acpi/power.c @@ -17,7 +17,6 @@ #include #include #include -#include #include #include #include diff --git a/xen/arch/x86/include/asm/init.h b/xen/arch/x86/include/asm/init.h deleted file mode 100644 index 5295b35e6337..000000000000 --- a/xen/arch/x86/include/asm/init.h +++ /dev/null @@ -1,4 +0,0 @@ -#ifndef _XEN_ASM_INIT_H -#define _XEN_ASM_INIT_H - -#endif /* _XEN_ASM_INIT_H */ diff --git a/xen/include/xen/init.h b/xen/include/xen/init.h index 0af0e234ec80..1d7c0216bc80 100644 --- a/xen/include/xen/init.h +++ b/xen/include/xen/init.h @@ -1,8 +1,6 @@ #ifndef _LINUX_INIT_H #define _LINUX_INIT_H -#include - /* * Mark functions and data as being only used at initialization * or exit time.