From 3cb5542b0a8ad88cc4f1ba42dfcf5f22f2086902 Mon Sep 17 00:00:00 2001 From: Minggui Cao Date: Mon, 25 Feb 2019 16:44:07 +0800 Subject: [PATCH] HV: cleanup header files under hypervisor/dm it removes hypervisor.h and just includes needed header files. Tracked-On: #1842 Signed-off-by: Minggui Cao Acked-by: Eddie Dong --- hypervisor/dm/vioapic.c | 8 +++++++- hypervisor/dm/vmptable.c | 5 ++++- hypervisor/dm/vpci/core.c | 2 +- hypervisor/dm/vpci/hostbridge.c | 4 +++- hypervisor/dm/vpci/msi.c | 6 +++++- hypervisor/dm/vpci/msix.c | 10 +++++++++- hypervisor/dm/vpci/partition_mode.c | 3 ++- hypervisor/dm/vpci/pci_pt.c | 6 +++++- hypervisor/dm/vpci/sharing_mode.c | 4 +++- hypervisor/dm/vpci/vpci.c | 2 +- hypervisor/dm/vpic.c | 5 ++++- hypervisor/dm/vrtc.c | 3 ++- 12 files changed, 46 insertions(+), 12 deletions(-) diff --git a/hypervisor/dm/vioapic.c b/hypervisor/dm/vioapic.c index 55f996e1d..6cbfedd3b 100644 --- a/hypervisor/dm/vioapic.c +++ b/hypervisor/dm/vioapic.c @@ -30,7 +30,13 @@ #define pr_prefix "vioapic: " -#include +#include +#include +#include +#include +#include +#include +#include #define RTBL_RO_BITS ((uint32_t)0x00004000U | (uint32_t)0x00001000U) /*Remote IRR and Delivery Status bits*/ diff --git a/hypervisor/dm/vmptable.c b/hypervisor/dm/vmptable.c index 6690080e3..b8d55b0f6 100644 --- a/hypervisor/dm/vmptable.c +++ b/hypervisor/dm/vmptable.c @@ -4,7 +4,10 @@ * SPDX-License-Identifier: BSD-3-Clause */ -#include +#include +#include +#include +#include static struct mptable_info mptable_template = { .mpfp = { diff --git a/hypervisor/dm/vpci/core.c b/hypervisor/dm/vpci/core.c index e81a8d213..b714056b7 100644 --- a/hypervisor/dm/vpci/core.c +++ b/hypervisor/dm/vpci/core.c @@ -27,7 +27,7 @@ * $FreeBSD$ */ -#include +#include #include "pci_priv.h" uint32_t pci_vdev_read_cfg(const struct pci_vdev *vdev, uint32_t offset, uint32_t bytes) diff --git a/hypervisor/dm/vpci/hostbridge.c b/hypervisor/dm/vpci/hostbridge.c index 605a1f924..c03702eb6 100644 --- a/hypervisor/dm/vpci/hostbridge.c +++ b/hypervisor/dm/vpci/hostbridge.c @@ -34,7 +34,9 @@ * Series Host Bridge (rev 0b) */ -#include +#include +#include +#include #include "pci_priv.h" static int32_t vdev_hostbridge_init(struct pci_vdev *vdev) diff --git a/hypervisor/dm/vpci/msi.c b/hypervisor/dm/vpci/msi.c index d16a65698..bdcdd77f6 100644 --- a/hypervisor/dm/vpci/msi.c +++ b/hypervisor/dm/vpci/msi.c @@ -27,7 +27,11 @@ * $FreeBSD$ */ -#include +#include +#include +#include +#include +#include #include "pci_priv.h" static inline bool msicap_access(const struct pci_vdev *vdev, uint32_t offset) diff --git a/hypervisor/dm/vpci/msix.c b/hypervisor/dm/vpci/msix.c index ca1053221..bee8a4325 100644 --- a/hypervisor/dm/vpci/msix.c +++ b/hypervisor/dm/vpci/msix.c @@ -27,7 +27,15 @@ * $FreeBSD$ */ -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include "pci_priv.h" static inline bool msixcap_access(const struct pci_vdev *vdev, uint32_t offset) diff --git a/hypervisor/dm/vpci/partition_mode.c b/hypervisor/dm/vpci/partition_mode.c index 6632653b2..e238f88c2 100644 --- a/hypervisor/dm/vpci/partition_mode.c +++ b/hypervisor/dm/vpci/partition_mode.c @@ -29,7 +29,8 @@ /* Virtual PCI device related operations (read/write, etc) */ -#include +#include +#include #include "pci_priv.h" static struct pci_vdev *partition_mode_find_vdev(struct acrn_vpci *vpci, union pci_bdf vbdf) diff --git a/hypervisor/dm/vpci/pci_pt.c b/hypervisor/dm/vpci/pci_pt.c index 930b24d96..eb4905f67 100644 --- a/hypervisor/dm/vpci/pci_pt.c +++ b/hypervisor/dm/vpci/pci_pt.c @@ -29,8 +29,12 @@ /* Passthrough PCI device related operations */ -#include +#include +#include #include +#include +#include +#include #include "pci_priv.h" static inline uint32_t pci_bar_base(uint32_t bar) diff --git a/hypervisor/dm/vpci/sharing_mode.c b/hypervisor/dm/vpci/sharing_mode.c index d98ef7e42..80ae88ffe 100644 --- a/hypervisor/dm/vpci/sharing_mode.c +++ b/hypervisor/dm/vpci/sharing_mode.c @@ -27,7 +27,9 @@ * $FreeBSD$ */ -#include +#include +#include +#include #include "pci_priv.h" static uint32_t num_pci_vdev; diff --git a/hypervisor/dm/vpci/vpci.c b/hypervisor/dm/vpci/vpci.c index cdf8a9b25..d53df312f 100644 --- a/hypervisor/dm/vpci/vpci.c +++ b/hypervisor/dm/vpci/vpci.c @@ -27,7 +27,7 @@ * $FreeBSD$ */ -#include +#include #include "pci_priv.h" static void pci_cfg_clear_cache(struct pci_addr_info *pi) diff --git a/hypervisor/dm/vpic.c b/hypervisor/dm/vpic.c index 0a47f2632..6dd825b66 100644 --- a/hypervisor/dm/vpic.c +++ b/hypervisor/dm/vpic.c @@ -27,7 +27,10 @@ #define pr_prefix "vpic: " -#include +#include +#include +#include +#include #define ACRN_DBG_PIC 6U diff --git a/hypervisor/dm/vrtc.c b/hypervisor/dm/vrtc.c index 1d17731ea..25b0da1bb 100644 --- a/hypervisor/dm/vrtc.c +++ b/hypervisor/dm/vrtc.c @@ -4,7 +4,8 @@ * SPDX-License-Identifier: BSD-3-Clause */ -#include +#include +#include #define CMOS_ADDR_PORT 0x70U #define CMOS_DATA_PORT 0x71U