From df36da1b807a6125407abdc1f259c37992e25f60 Mon Sep 17 00:00:00 2001 From: Liang Yi Date: Thu, 4 Mar 2021 16:24:36 +0800 Subject: [PATCH] hv/mod_irq: do not include x86/irq.h in common/irq.h Each .c file includes the arch specific irq header file (with full path) by itself if required. Tracked-On: #5825 Signed-off-by: Jason Chen CJ --- hypervisor/arch/x86/cpu.c | 1 + hypervisor/arch/x86/guest/assign.c | 1 + hypervisor/arch/x86/guest/vcpu.c | 1 + hypervisor/arch/x86/guest/virq.c | 1 + hypervisor/arch/x86/guest/vlapic.c | 1 + hypervisor/arch/x86/guest/vm.c | 1 + hypervisor/arch/x86/ioapic.c | 1 + hypervisor/arch/x86/irq.c | 9 ++++----- hypervisor/arch/x86/notify.c | 2 +- hypervisor/arch/x86/timer.c | 1 + hypervisor/arch/x86/vtd.c | 1 + hypervisor/common/hypercall.c | 1 + hypervisor/common/irq.c | 1 + hypervisor/common/schedule.c | 1 + hypervisor/debug/profiling.c | 2 +- hypervisor/debug/shell.c | 2 +- hypervisor/dm/io_req.c | 2 +- hypervisor/dm/vioapic.c | 2 +- hypervisor/dm/vpic.c | 1 + hypervisor/include/arch/x86/irq.h | 4 +--- hypervisor/include/common/irq.h | 4 +--- 21 files changed, 24 insertions(+), 16 deletions(-) diff --git a/hypervisor/arch/x86/cpu.c b/hypervisor/arch/x86/cpu.c index 2e2608cea..42d6527e3 100644 --- a/hypervisor/arch/x86/cpu.c +++ b/hypervisor/arch/x86/cpu.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include diff --git a/hypervisor/arch/x86/guest/assign.c b/hypervisor/arch/x86/guest/assign.c index f19869c90..366dc4886 100644 --- a/hypervisor/arch/x86/guest/assign.c +++ b/hypervisor/arch/x86/guest/assign.c @@ -13,6 +13,7 @@ #include #include #include +#include /* * Check if the IRQ is single-destination and return the destination vCPU if so. diff --git a/hypervisor/arch/x86/guest/vcpu.c b/hypervisor/arch/x86/guest/vcpu.c index a74c0add7..9ebba21d7 100644 --- a/hypervisor/arch/x86/guest/vcpu.c +++ b/hypervisor/arch/x86/guest/vcpu.c @@ -20,6 +20,7 @@ #include #include #include +#include /* stack_frame is linked with the sequence of stack operation in arch_switch_to() */ struct stack_frame { diff --git a/hypervisor/arch/x86/guest/virq.c b/hypervisor/arch/x86/guest/virq.c index 24c9ea362..2035dc088 100644 --- a/hypervisor/arch/x86/guest/virq.c +++ b/hypervisor/arch/x86/guest/virq.c @@ -17,6 +17,7 @@ #include #include #include +#include #define EXCEPTION_ERROR_CODE_VALID 8U diff --git a/hypervisor/arch/x86/guest/vlapic.c b/hypervisor/arch/x86/guest/vlapic.c index 3a98f8b22..eddf5d3b1 100644 --- a/hypervisor/arch/x86/guest/vlapic.c +++ b/hypervisor/arch/x86/guest/vlapic.c @@ -45,6 +45,7 @@ #include #include #include +#include #include "vlapic_priv.h" #define VLAPIC_VERBOS 0 diff --git a/hypervisor/arch/x86/guest/vm.c b/hypervisor/arch/x86/guest/vm.c index e8fb77c91..3d4895a8e 100644 --- a/hypervisor/arch/x86/guest/vm.c +++ b/hypervisor/arch/x86/guest/vm.c @@ -37,6 +37,7 @@ #include #include #include +#include /* Local variables */ diff --git a/hypervisor/arch/x86/ioapic.c b/hypervisor/arch/x86/ioapic.c index af87a15ef..a06de83ba 100644 --- a/hypervisor/arch/x86/ioapic.c +++ b/hypervisor/arch/x86/ioapic.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include diff --git a/hypervisor/arch/x86/irq.c b/hypervisor/arch/x86/irq.c index e23361783..8687189a5 100644 --- a/hypervisor/arch/x86/irq.c +++ b/hypervisor/arch/x86/irq.c @@ -10,11 +10,10 @@ #include #include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include #include #include #include diff --git a/hypervisor/arch/x86/notify.c b/hypervisor/arch/x86/notify.c index f97a02e04..03f3a0f2a 100644 --- a/hypervisor/arch/x86/notify.c +++ b/hypervisor/arch/x86/notify.c @@ -8,7 +8,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/hypervisor/arch/x86/timer.c b/hypervisor/arch/x86/timer.c index 0f10ce327..9c051bd76 100644 --- a/hypervisor/arch/x86/timer.c +++ b/hypervisor/arch/x86/timer.c @@ -13,6 +13,7 @@ #include #include #include +#include #define MAX_TIMER_ACTIONS 32U #define CAL_MS 10U diff --git a/hypervisor/arch/x86/vtd.c b/hypervisor/arch/x86/vtd.c index 39fd98ce4..3cd0e728e 100644 --- a/hypervisor/arch/x86/vtd.c +++ b/hypervisor/arch/x86/vtd.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include diff --git a/hypervisor/common/hypercall.c b/hypervisor/common/hypercall.c index 03aee211a..a25386958 100644 --- a/hypervisor/common/hypercall.c +++ b/hypervisor/common/hypercall.c @@ -23,6 +23,7 @@ #include #include #include +#include #define DBG_LEVEL_HYCALL 6U diff --git a/hypervisor/common/irq.c b/hypervisor/common/irq.c index 3947ccdc6..9a194745b 100644 --- a/hypervisor/common/irq.c +++ b/hypervisor/common/irq.c @@ -8,6 +8,7 @@ #include #include #include +#include #include static spinlock_t irq_alloc_spinlock = { .head = 0U, .tail = 0U, }; diff --git a/hypervisor/common/schedule.c b/hypervisor/common/schedule.c index 2986718be..0ce7f58ea 100644 --- a/hypervisor/common/schedule.c +++ b/hypervisor/common/schedule.c @@ -12,6 +12,7 @@ #include #include #include +#include bool is_idle_thread(const struct thread_object *obj) { diff --git a/hypervisor/debug/profiling.c b/hypervisor/debug/profiling.c index 4a2c0bffc..0b2dbcf9d 100644 --- a/hypervisor/debug/profiling.c +++ b/hypervisor/debug/profiling.c @@ -7,7 +7,7 @@ #include #include -#include +#include #include #include #include diff --git a/hypervisor/debug/shell.c b/hypervisor/debug/shell.c index 63fd4015f..2fd67f4b6 100644 --- a/hypervisor/debug/shell.c +++ b/hypervisor/debug/shell.c @@ -8,7 +8,7 @@ #include #include #include "shell_priv.h" -#include +#include #include #include #include diff --git a/hypervisor/dm/io_req.c b/hypervisor/dm/io_req.c index f9f69e56c..145f05f21 100644 --- a/hypervisor/dm/io_req.c +++ b/hypervisor/dm/io_req.c @@ -4,7 +4,7 @@ */ #include -#include +#include #include #include diff --git a/hypervisor/dm/vioapic.c b/hypervisor/dm/vioapic.c index 5e02497e3..a086a85f0 100644 --- a/hypervisor/dm/vioapic.c +++ b/hypervisor/dm/vioapic.c @@ -32,7 +32,7 @@ #include #include -#include +#include #include #include #include diff --git a/hypervisor/dm/vpic.c b/hypervisor/dm/vpic.c index 8dd455f5e..ab2675413 100644 --- a/hypervisor/dm/vpic.c +++ b/hypervisor/dm/vpic.c @@ -34,6 +34,7 @@ #include #include #include +#include #define DBG_LEVEL_PIC 6U diff --git a/hypervisor/include/arch/x86/irq.h b/hypervisor/include/arch/x86/irq.h index da6287aac..823bf29d8 100644 --- a/hypervisor/include/arch/x86/irq.h +++ b/hypervisor/include/arch/x86/irq.h @@ -7,9 +7,7 @@ #ifndef ARCH_X86_IRQ_H #define ARCH_X86_IRQ_H -#include -#include -#include +#include /** * @file arch/x86/irq.h diff --git a/hypervisor/include/common/irq.h b/hypervisor/include/common/irq.h index bb8235879..00fdb55d8 100644 --- a/hypervisor/include/common/irq.h +++ b/hypervisor/include/common/irq.h @@ -7,11 +7,9 @@ #ifndef COMMON_IRQ_H #define COMMON_IRQ_H -#include +#include #include -#include - /** * @file common/irq.h *