mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-23 17:58:30 +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:
@@ -16,21 +16,20 @@
|
||||
#define NR_LEGACY_PIN NR_LEGACY_IRQ
|
||||
#define NR_MAX_GSI (CONFIG_NR_IOAPICS * IOAPIC_MAX_LINES)
|
||||
|
||||
#define GSI_MASK_IRQ(irq) irq_gsi_mask_unmask((irq), true)
|
||||
#define GSI_UNMASK_IRQ(irq) irq_gsi_mask_unmask((irq), false)
|
||||
|
||||
void setup_ioapic_irqs(void);
|
||||
|
||||
bool irq_is_gsi(uint32_t irq);
|
||||
uint8_t irq_to_pin(uint32_t irq);
|
||||
uint32_t pin_to_irq(uint8_t pin);
|
||||
void irq_gsi_mask_unmask(uint32_t irq, bool mask);
|
||||
void ioapic_set_rte(uint32_t irq, union ioapic_rte rte);
|
||||
void ioapic_get_rte(uint32_t irq, union ioapic_rte *rte);
|
||||
|
||||
void suspend_ioapic(void);
|
||||
void resume_ioapic(void);
|
||||
|
||||
void gsi_mask_irq(uint32_t irq);
|
||||
void gsi_unmask_irq(uint32_t irq);
|
||||
|
||||
extern uint8_t pic_ioapic_pin_map[NR_LEGACY_PIN];
|
||||
|
||||
#ifdef HV_DEBUG
|
||||
|
Reference in New Issue
Block a user