hv: pirq: add static irq:vector mappings

Since vector is x86 specific concept, we'd like to hide it from common irq APIs.
This commit
 - adds static irq:vector mappings for special interrupt such as timer
and cpu notification;
 - reserves the irq and vector at initialization;
 - removed the vector argument in pri_register_handler(), get reserved vector
   from irq_desc in common_register_handler().

Signed-off-by: Yan, Like <like.yan@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
This commit is contained in:
Yan, Like
2018-08-07 15:19:56 +08:00
committed by lijinxia
parent f6e45c9b13
commit 8fda0d8c5f
5 changed files with 26 additions and 19 deletions

View File

@@ -27,6 +27,9 @@
#define NR_IRQS (256U + 16U)
#define IRQ_INVALID 0xffffffffU
#define TIMER_IRQ (NR_IRQS - 1U)
#define NOTIFY_IRQ (NR_IRQS - 2U)
#define DEFAULT_DEST_MODE IOAPIC_RTE_DESTLOG
#define DEFAULT_DELIVERY_MODE IOAPIC_RTE_DELLOPRI
#define ALL_CPUS_MASK ((1U << phys_cpu_num) - 1U)