hv: pirq: rename related source files

To make the file structure clearer, change the file names:
 - rename arch/x86/interrupt.c to virq.c, for the virtual irq relavant code,
   such as irq injection etc;
 - merge arch/x86/intr_main.c into arch/x86/irq.c;
 - rename arch/x86/intr_lapic.c to lapic.c

Signed-off-by: Yan, Like <like.yan@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
Yan, Like 2018-06-20 13:45:47 +08:00 committed by Xie, nanlin
parent fcbc56439c
commit d5912a4d16
5 changed files with 26 additions and 34 deletions

View File

@ -95,14 +95,13 @@ D_SRCS += $(wildcard debug/*.c)
C_SRCS += boot/acpi.c
C_SRCS += boot/dmar_parse.c
C_SRCS += arch/x86/ioapic.c
C_SRCS += arch/x86/intr_lapic.c
C_SRCS += arch/x86/lapic.c
S_SRCS += arch/x86/trampoline.S
C_SRCS += arch/x86/cpu.c
C_SRCS += arch/x86/softirq.c
C_SRCS += arch/x86/cpuid.c
C_SRCS += arch/x86/mmu.c
C_SRCS += arch/x86/notify.c
C_SRCS += arch/x86/intr_main.c
C_SRCS += arch/x86/vtd.c
C_SRCS += arch/x86/gdt.c
S_SRCS += arch/x86/cpu_primary.S
@ -112,7 +111,7 @@ C_SRCS += arch/x86/timer.c
C_SRCS += arch/x86/ept.c
S_SRCS += arch/x86/vmx_asm.S
C_SRCS += arch/x86/io.c
C_SRCS += arch/x86/interrupt.c
C_SRCS += arch/x86/virq.c
C_SRCS += arch/x86/vmexit.c
C_SRCS += arch/x86/vmx.c
C_SRCS += arch/x86/assign.c

View File

@ -1,31 +0,0 @@
/*
* Copyright (C) 2018 Intel Corporation. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <hypervisor.h>
int interrupt_init(uint32_t cpu_id)
{
struct host_idt_descriptor *idtd = &HOST_IDTR;
int status;
set_idt(idtd);
status = init_lapic(cpu_id);
ASSERT(status == 0, "lapic init failed");
if (status != 0)
return -ENODEV;
status = init_default_irqs(cpu_id);
ASSERT(status == 0, "irqs init failed");
if (status != 0)
return -ENODEV;
#ifndef CONFIG_EFI_STUB
CPU_IRQ_ENABLE();
#endif
return status;
}

View File

@ -732,3 +732,27 @@ void get_cpu_interrupt_info(char *str, int str_max)
}
snprintf(str, size, "\r\n");
}
int interrupt_init(uint32_t cpu_id)
{
struct host_idt_descriptor *idtd = &HOST_IDTR;
int status;
set_idt(idtd);
status = init_lapic(cpu_id);
ASSERT(status == 0, "lapic init failed");
if (status != 0)
return -ENODEV;
status = init_default_irqs(cpu_id);
ASSERT(status == 0, "irqs init failed");
if (status != 0)
return -ENODEV;
#ifndef CONFIG_EFI_STUB
CPU_IRQ_ENABLE();
#endif
return status;
}