mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-01-13 11:33:58 +00:00
hv: ioapic: convert some MACROs to inline functions
Convert GSI_MASK_IRQ and GSI_UNMASK_IRQ to inline functions. v1 -> v2: After changing GSI_MASK_IRQ and GSI_UNMASK_IRQ from MACROs to functions, 'gsi_(mask|unmask)_irq' are the exposed APIs and 'irq_gsi_mask_unmask' becomes internal. In order to reflect this change, - change 'irq_gsi_mask_unmask' as internal function in ioapic.c - declare 'gsi_(mask|unmask)_irq' in ioapic.h - define 'gsi_(mask|unmask)_irq' in ioapic.c Tracked-On: #861 Signed-off-by: Shiqing Gao <shiqing.gao@intel.com> Reviewed-by: Junjie Mao <junjie.mao@intel.com>
This commit is contained in:
@@ -286,7 +286,7 @@ uint32_t pin_to_irq(uint8_t pin)
|
||||
return IRQ_INVALID;
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
irq_gsi_mask_unmask(uint32_t irq, bool mask)
|
||||
{
|
||||
void *addr;
|
||||
@@ -311,6 +311,16 @@ irq_gsi_mask_unmask(uint32_t irq, bool mask)
|
||||
irq, pin, rte.full);
|
||||
}
|
||||
|
||||
void gsi_mask_irq(uint32_t irq)
|
||||
{
|
||||
irq_gsi_mask_unmask(irq, true);
|
||||
}
|
||||
|
||||
void gsi_unmask_irq(uint32_t irq)
|
||||
{
|
||||
irq_gsi_mask_unmask(irq, false);
|
||||
}
|
||||
|
||||
static uint8_t
|
||||
ioapic_nr_pins(void *ioapic_base)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user