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:
Shiqing Gao
2018-09-20 09:03:51 +08:00
committed by lijinxia
parent 99ed5469ab
commit e0973e4883
4 changed files with 20 additions and 11 deletions

View File

@@ -302,7 +302,7 @@ static inline void handle_irq(struct irq_desc *desc)
irq_action_t action = desc->action;
if (irq_need_mask(desc)) {
GSI_MASK_IRQ(desc->irq);
gsi_mask_irq(desc->irq);
}
/* Send EOI to LAPIC/IOAPIC IRR */
@@ -313,7 +313,7 @@ static inline void handle_irq(struct irq_desc *desc)
}
if (irq_need_unmask(desc)) {
GSI_UNMASK_IRQ(desc->irq);
gsi_unmask_irq(desc->irq);
}
}