disconnect_bsp_APIC();
pin = find_isa_irq_pin(0, mp_ExtINT); if (pin != -1) { struct IO_APIC_route_entry entry; unsigned long flags;  memset(&entry, 0, sizeof(entry)); entry.mask            = 0;  entry.trigger         = 0;  entry.irr             = 0; entry.polarity        = 0;  entry.delivery_status = 0; entry.dest_mode       = 0;  entry.delivery_mode   = 7;  entry.vector          = 0; entry.dest.physical.physical_dest = 0;    spin_lock_irqsave(&ioapic_lock, flags); io_apic_write(0, 0x11+2*pin, *(((int *)&entry)+1)); io_apic_write(0, 0x10+2*pin, *(((int *)&entry)+0)); spin_unlock_irqrestore(&ioapic_lock, flags); } disconnect_bsp_APIC(pin != -1);
void disable_IO_APIC(void){	/*	 * Clear the IO-APIC before rebooting:	 */	clear_IO_APIC();	disconnect_bsp_APIC();}