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

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



commit b9f6a102f535b8444c3538fa99ccb0b12c3ab6b4
Author:     Michal Orzel <michal.orzel@xxxxxxx>
AuthorDate: Wed Apr 1 16:58:16 2026 +0200
Commit:     Michal Orzel <michal.orzel@xxxxxxx>
CommitDate: Fri Apr 3 08:43:07 2026 +0200

    xen/arm: vpci: Move content of xen/arch/arm/vpci.h to arch header
    
    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>
    Reviewed-by: Luca Fancellu <luca.fancellu@xxxxxxx>
    Acked-by: Volodymyr Babchuk <volodymyr_babchuk@xxxxxxxx>
---
 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(-)

diff --git a/xen/arch/arm/domain.c b/xen/arch/arm/domain.c
index 581f82bddd..26380a807c 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 db04687fc0..0cc6f5a105 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 3c713f3fcd..0000000000
--- 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:
- */
--
generated by git-patchbot for /home/xen/git/xen.git#staging



 


Rackspace

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