[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 3/3] xen/arm: vpci: Move content of xen/arch/arm/vpci.h to arch header


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Michal Orzel <michal.orzel@xxxxxxx>
  • Date: Wed, 1 Apr 2026 16:58:16 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=B/HuOQxA0RHFb08ApkVbZL0fHFl6S6/91W7UGQFdUAk=; b=HonZ5FwcO+J247mAGfzHa1sXEYCuEjJG7Mr8LdH7yLV9fVt4MNm0NVZcdBebyl2GcizZX43PADyEon8QPKb0RQTOXoQMwdyz2OYUzc+/G9nCZelJehUgO2xctx4VMg/RlhDMYxz3oyZGab4P3n7ZMt/QtfH4Uyuv+ysPzg4B1qXoKyzGCHK7LPIVBM2cP92/rVaeyXQL2GC/uLEfbFxuy2xft4p7Gx5XtWXHU7zCp4uuIRZBDl63Di9Uj3kDU4ceF8yNturUIUbuh8jCo/X0X5YyLvufX/Nie9rDuiJCWcBGoTdJQi82PiboBePU0gNptawNbzyJPHvPsltMXFCz/Q==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=vshDJzq/1FUERdJW0zOu2eT2OixXCDRJ4A4TZQe3PDypbEF2wDzmIdHrWrpwiV2hznn3DnvkYomqJKzrwKBfxdnXsXFUtsavKOelNK6g7jX6Ds5DsgXO7faWKiPe32ZtfRvI7zOItP8+d/IQTKOiLM8Ap9kwbSZb195FDQUmi/OXEx043rH4ceR9/Ny4Cbz2gWtlwHhiiUG/8bQaXqRZBpie6ibl7cbQmbviKbUZDV1poKsK83iz7sveOMrsdPW1WONjVpQfndbCCLaXCcYWQWPgxzPcnEzp2zgd9akTee4vhTZhi2+vhJ7umiVLQUneHj8fMY/GHtFijQkSUkrNXw==
  • Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=amd.com header.i="@amd.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"
  • Cc: Michal Orzel <michal.orzel@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Wed, 01 Apr 2026 14:58:38 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Move domain_vpci_init() and domain_vpci_get_num_mmio_handlers()
declarations from the private xen/arch/arm/vpci.h into the public
xen/arch/arm/include/asm/vpci.h, and remove the now redundant
private header.

Update domain.c to include <asm/vpci.h> instead of the removed private
header.

This ensures the declarations are visible where the functions are
defined, resolving a MISRA C Rule 8.4 violation.

Signed-off-by: Michal Orzel <michal.orzel@xxxxxxx>
---
I'm moving a file with GPL2+ license to a file with GPL2-only. I consider this
ok in this case becase the copyright on a file with just prototypes does not
make any sense and a license text was most likely blindly copy-pasted like for
most of the files in that era.
---
 xen/arch/arm/domain.c           |  2 +-
 xen/arch/arm/include/asm/vpci.h | 18 ++++++++++++++
 xen/arch/arm/vpci.h             | 42 ---------------------------------
 3 files changed, 19 insertions(+), 43 deletions(-)
 delete mode 100644 xen/arch/arm/vpci.h

diff --git a/xen/arch/arm/domain.c b/xen/arch/arm/domain.c
index 581f82bddd48..26380a807cad 100644
--- a/xen/arch/arm/domain.c
+++ b/xen/arch/arm/domain.c
@@ -31,10 +31,10 @@
 #include <asm/tee/tee.h>
 #include <asm/vfp.h>
 #include <asm/vgic.h>
+#include <asm/vpci.h>
 #include <asm/vpsci.h>
 #include <asm/vtimer.h>
 
-#include "vpci.h"
 #include "vuart.h"
 
 DEFINE_PER_CPU(struct vcpu *, curr_vcpu);
diff --git a/xen/arch/arm/include/asm/vpci.h b/xen/arch/arm/include/asm/vpci.h
index db04687fc099..0cc6f5a10532 100644
--- a/xen/arch/arm/include/asm/vpci.h
+++ b/xen/arch/arm/include/asm/vpci.h
@@ -2,6 +2,9 @@
 #ifndef ARM_VPCI_H
 #define ARM_VPCI_H
 
+struct domain;
+
+#ifdef CONFIG_HAS_VPCI
 /* Arch-specific MSI data for vPCI. */
 struct vpci_arch_msi {
 };
@@ -10,4 +13,19 @@ struct vpci_arch_msi {
 struct vpci_arch_msix_entry {
 };
 
+
+int domain_vpci_init(struct domain *d);
+unsigned int domain_vpci_get_num_mmio_handlers(struct domain *d);
+#else
+static inline int domain_vpci_init(struct domain *d)
+{
+    return 0;
+}
+
+static inline unsigned int domain_vpci_get_num_mmio_handlers(struct domain *d)
+{
+    return 0;
+}
+#endif /* CONFIG_HAS_VPCI */
+
 #endif /* ARM_VPCI_H */
diff --git a/xen/arch/arm/vpci.h b/xen/arch/arm/vpci.h
deleted file mode 100644
index 3c713f3fcdb5..000000000000
--- a/xen/arch/arm/vpci.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * xen/arch/arm/vpci.h
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- */
-
-#ifndef __ARCH_ARM_VPCI_H__
-#define __ARCH_ARM_VPCI_H__
-
-#ifdef CONFIG_HAS_VPCI
-int domain_vpci_init(struct domain *d);
-unsigned int domain_vpci_get_num_mmio_handlers(struct domain *d);
-#else
-static inline int domain_vpci_init(struct domain *d)
-{
-    return 0;
-}
-
-static inline unsigned int domain_vpci_get_num_mmio_handlers(struct domain *d)
-{
-    return 0;
-}
-#endif
-
-#endif /* __ARCH_ARM_VPCI_H__ */
-
-/*
- * Local variables:
- * mode: C
- * c-file-style: "BSD"
- * c-basic-offset: 4
- * indent-tabs-mode: nil
- * End:
- */
-- 
2.43.0




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.