From nobody Tue May 7 11:25:35 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1673437484; cv=none; d=zohomail.com; s=zohoarc; b=WVzD1p5BbsNxeTQ8fYaQbKoKMVaZPbZEiSkA+XMxU50BQ59ytv8DYID20iYViSYct+vAI4+XPaxPQDAX3z2yg3px1e04WdEwD3fU7QiL4zBsT3a6bfCADCnH1U99VyCM4se9KEE6gCy0LVkaNe+xOjkZ4tq+/1E2oLbADigdl+g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1673437484; h=Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=IqfAabigwW7CFHzU0bZ0FY9KOz/BysPhEjw0xmgSgig=; b=LZT0gxE3ZvhXRCdg+sITOEQrWv2vyMCsROJ3GgnGzmOzPj8XyBBVdik97i6bCggZ3nu/o63wFNL6uBQAGNgPFIz6/P+0Hq3tZC8XLD6ynkMhr6TzQBB3C04yeHdcSag8YiGaTRnGKoLKrk0PgPi0+bO1UAvMpbBdmQ8rPWAl45k= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1673437484665200.64553781602592; Wed, 11 Jan 2023 03:44:44 -0800 (PST) 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 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-Outflank-Mailman: Message body and most headers restored to incoming version 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=20Pau=20Monn=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 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @xen.org) X-ZM-MESSAGEID: 1673437486517100001 Content-Type: text/plain; charset="utf-8" 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: Alistair Francis Acked-by: Andrew Cooper Reviewed-by: Jan Beulich Reviewed-by: Luca Fancellu --- 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-offs= ets.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 =20 #define DEFINE(_sym, _val) = \ asm volatile ("\n.ascii\"=3D=3D>#define " #_sym " %0 /* " #_val " */<= =3D=3D\"" \ diff --git a/xen/arch/arm/arm64/asm-offsets.c b/xen/arch/arm/arm64/asm-offs= ets.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 =20 #define DEFINE(_sym, _val) = \ diff --git a/xen/arch/arm/include/asm/init.h b/xen/arch/arm/include/asm/ini= t.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/se= tup.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 *d= ev, =20 extern const char __ro_after_init_start[], __ro_after_init_end[]; =20 +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/ini= t.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 =20 -#include - /* * Mark functions and data as being only used at initialization * or exit time. --=20 2.38.1