/* For IO-APIC's with EOI register, we use that to do an explicit EOI. Otherwise, we simulate the EOI message manually by changing the trigger mode to edge and then back to level, with RTE being masked during this.  */
static void __eoi_ioapic_irq(unsigned int irq, struct irq_cfg *cfg)
/* For IO-APIC's with EOI register, we use that to do an explicit EOI. Otherwise, we simulate the EOI message manually by changing the trigger mode to edge and then back to level, with RTE being masked during this.  */
static void __eoi_ioapic_irq(unsigned int irq, struct irq_cfg *cfg)
{
	struct irq_pin_list *entry;
	for_each_irq_pin(entry, cfg->irq_2_pin) {
		if (mp_ioapics[entry->apic].apicver >= 0x20) {
			if (irq_remapped(irq))
				io_apic_eoi(entry->apic, entry->pin);
			else
				io_apic_eoi(entry->apic, cfg->vector);
		} else {
			__mask_and_edge_IO_APIC_irq(entry);
			__unmask_and_level_IO_APIC_irq(entry);
		}
	}
}