/* Restore IO APIC entries which was saved in ioapic_entries.  */
int restore_IO_APIC_setup(struct IO_APIC_route_entry **ioapic_entries)
/* Restore IO APIC entries which was saved in ioapic_entries.  */
int restore_IO_APIC_setup(struct IO_APIC_route_entry **ioapic_entries)
{
	int apic, pin;
	if (!ioapic_entries)
		return -ENOMEM;
	for (apic = 0; apic < nr_ioapics; apic++) {
		if (!ioapic_entries[apic])
			return -ENOMEM;
		for (pin = 0; pin < nr_ioapic_registers[apic]; pin++)
			ioapic_write_entry(apic, pin,
					ioapic_entries[apic][pin]);
	}
	return 0;
}