[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] x86/xen: move declaration/definition of xen_processor_present()
- To: linux-kernel@xxxxxxxxxxxxxxx
- From: Roger Pau Monne <roger.pau@xxxxxxxxxx>
- Date: Tue, 21 Mar 2023 12:25:21 +0100
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=gMHe2DakAJR71lo6we96Oa53JRvpTPWRAJgRDRsBjjM=; b=emnKWTZ2hAq4t4HXuxfJYM8lA2q53I6Ceg+Xsr3terbFZHNKhpqvCOeGHaTUsvxJBMFzzudd7d33QStlFvDURNZexS6qkbUPieg3dkv3uqRzVC0b64KTEjOXEqzzmbgYAJtVvb0lRE4u1vWTStMmCnWWj2iknigEqZkm4fih+htCYai4+ijPKxUIJIXUaUeFYAWEG18TrMeL6RHiHv61msnQ5xW1d/6K1xkXZh1ZBcs12gsjkVHaLY7kFDueMZj1JK+xnr/mBJ3AunJAjWJReOLgp4YCvCpalfiRGwl2BFJAawwxkTeVn+0xfvYSUEKlICtJ19ZLIhZOYju5bBFW4Q==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=USXbQxlXwsJ35PS6GoSN/RpmapSlqR7wFaGBYxXe4JktFa5OFH2Hnnnt1WhuUYIGI6OI0IJBlctCd/OqjSVixKO2CSvZJqR5Hbvm9koRVZtnpSdPWgg5+vuzJ6yHrup0IehcJNdouMn92VKQ6BnWmiPJbG7hletnkLEWHri3efeSM3g/d7/DM6IcvRn7oI1+Gput+S/OpAdJ4ENzD8WrQ7El67rIM9456bGWSxygslOh/8oGgDjPw4jbRhrqSFXejDOoIdoKuhLeJA5QsMxS2VZPJqoxo+kCS5e8lQaOg1/MH/cF6JV1t75GVdJD3zaEF5XPtLGIUUjFJt0FeP52Tg==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
- Cc: xen-devel@xxxxxxxxxxxxxxxxxxxx, rafael@xxxxxxxxxx, Roger Pau Monne <roger.pau@xxxxxxxxxx>, kernel test robot <lkp@xxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>, Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>, Borislav Petkov <bp@xxxxxxxxx>, Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>, x86@xxxxxxxxxx, "H. Peter Anvin" <hpa@xxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Oleksandr Tyshchenko <oleksandr_tyshchenko@xxxxxxxx>
- Delivery-date: Tue, 21 Mar 2023 11:26:57 +0000
- Ironport-data: A9a23:tfGNGKujIeqd+CWH5yy/sIANRefnVEteMUV32f8akzHdYApBsoF/q tZmKTuHPfmMZGejKY8gbYzi8B9Sv5GHzoRqSVE6/CE2F3sR+JbJXdiXEBz9bniYRiHhoOCLz O1FM4Wdc5pkJpP4jk3wWlQ0hSAkjclkfpKlVKiffHg3HVQ+IMsYoUoLs/YjhYJ1isSODQqIu Nfjy+XSI1bg0DNvWo4uw/vrRChH4bKj6Fv0gnRkPaoQ5ASEziFMZH4iDfrZw0XQE9E88tGSH 44v/JnhlkvF8hEkDM+Sk7qTWiXmlZaLYGBiIlIPM0STqkAqSh4ai87XB9JFAatjsB2bnsgZ9 Tl4ncfYpTHFnEH7sL91vxFwS0mSNEDdkVPNCSDXXce7lyUqf5ZwqhnH4Y5f0YAwo45K7W9yG fMwcyAtVzyKqMuN0K+LQMhgl8UjC8i2FdZK0p1g5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D30kwdFvU2z0mUUnC+oBPr1QWl+DEy60X6wVvdrWr/rdf/TDcaDdMEoY5CaBPW52cpodk5+q NW2GCysYZREHr77XzAzumNcysvulu/oHIkn+JWp3tDUbEGYLsUloAb9FM9KuZLIMqvgrpHLM BeSOXnoNpGe1KTaH7U+kN1xsa3Y3g1FhCaBmAfp828yVFt7SBE5npd4PZasmYL9Zo7RZUBzf /DKL5UmLZHSdJTRb5hBd0GXdC8BgX2MEPx2VqpUAfa/Zw8Si3wQt/MkekIDdiRCcE1JU4J6c r8uFAxjx94R6uhM7zPrc92GtakehT+Yd2n8LAt23FDgMy0eFIwWRfzDGzGo/HQ5sn3SverLs pbGKgmRMMLflGeX7qgKWXFKtVvwY53arxZhj98YSPVniqnQrea49DzQbLvAP7EHDslXSfWHm YDNQKDD/lo3wSXfjvRjRXQXDfVYUrz4ZhsOq7W84EouaIwH7wJjyxQpFi95t6GMnl5sqIwdF ZjO7+PqNKSmUCGuVvtq0FAGj8YNWp+zJXef14PmC8vHyrPG4oripGjXSR39FujYiNCb+6+Km NiT5Eew9PgE3RVrRpSXO5O9Qqh/i8ujUPPcrM1oIHG1OnIXbkcKKoKMZYBPDkiG3FO6HJXQU 94GXk5enM=
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
So that it doesn't break the build when CONFIG_XEN or CONFIG_XEN_DOM0
are not enabled.
The current header is only included when CONFIG_XEN_DOM0 is selected,
so instead place it in the top level xen.h header, and also use the
dummy helper when CONFIG_X86 is not selected, as the current
implementation is x86 only.
Reported-by: kernel test robot <lkp@xxxxxxxxx>
Link: https://lore.kernel.org/oe-kbuild-all/202303210729.DvRvIUla-lkp@xxxxxxxxx/
Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
---
arch/x86/include/asm/xen/hypervisor.h | 10 ----------
include/xen/xen.h | 10 ++++++++++
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/arch/x86/include/asm/xen/hypervisor.h
b/arch/x86/include/asm/xen/hypervisor.h
index 990a1609677e..5fc35f889cd1 100644
--- a/arch/x86/include/asm/xen/hypervisor.h
+++ b/arch/x86/include/asm/xen/hypervisor.h
@@ -63,14 +63,4 @@ void __init xen_pvh_init(struct boot_params *boot_params);
void __init mem_map_via_hcall(struct boot_params *boot_params_p);
#endif
-#if defined(CONFIG_XEN_DOM0) && defined(CONFIG_ACPI)
-bool __init xen_processor_present(uint32_t acpi_id);
-#else
-static inline bool xen_processor_present(uint32_t acpi_id)
-{
- BUG();
- return false;
-}
-#endif
-
#endif /* _ASM_X86_XEN_HYPERVISOR_H */
diff --git a/include/xen/xen.h b/include/xen/xen.h
index 7adf59837c25..4410e74f3eb5 100644
--- a/include/xen/xen.h
+++ b/include/xen/xen.h
@@ -71,4 +71,14 @@ static inline void xen_free_unpopulated_pages(unsigned int
nr_pages,
}
#endif
+#if defined(CONFIG_XEN_DOM0) && defined(CONFIG_ACPI) && defined(CONFIG_X86)
+bool __init xen_processor_present(uint32_t acpi_id);
+#else
+static inline bool xen_processor_present(uint32_t acpi_id)
+{
+ BUG();
+ return false;
+}
+#endif
+
#endif /* _XEN_XEN_H */
--
2.40.0
|