if (disable_timer_pin_1 > 0) clear_IO_APIC_pin(0, pin1); 
static inline void check_timer(void){	int pin1, pin2;	int vector;	/*	 * get/set the timer IRQ vector:	 */	disable_8259A_irq(0);	vector = assign_irq_vector(0);	set_intr_gate(vector, interrupt[0]);	/*	 * Subtle, code in do_timer_interrupt() expects an AEOI	 * mode for the 8259A whenever interrupts are routed	 * through I/O APICs.  Also IRQ0 has to be enabled in	 * the 8259A which implies the virtual wire has to be	 * disabled in the local APIC.	 */	apic_write_around(APIC_LVT0, APIC_LVT_MASKED | APIC_DM_EXTINT);	init_8259A(1);	enable_8259A_irq(0);	pin1 = find_isa_irq_pin(0, mp_INT);	pin2 = find_isa_irq_pin(0, mp_ExtINT);	apic_printk(APIC_VERBOSE,KERN_INFO "..TIMER: vector=0x%02X pin1=%d pin2=%d\n", vector, pin1, pin2);	if (pin1 != -1) {		/*		 * Ok, does IRQ0 through the IOAPIC work?		 */		unmask_IO_APIC_irq(0);		if (!no_timer_check && timer_irq_works()) {			nmi_watchdog_default();			if (nmi_watchdog == NMI_IO_APIC) {				disable_8259A_irq(0);				setup_nmi();				enable_8259A_irq(0);			}			return;		}		clear_IO_APIC_pin(0, pin1);		apic_printk(APIC_QUIET,KERN_ERR "..MP-BIOS bug: 8254 timer not connected to IO-APIC\n");	}	apic_printk(APIC_VERBOSE,KERN_INFO "...trying to set up timer (IRQ0) through the 8259A ... ");	if (pin2 != -1) {		apic_printk(APIC_VERBOSE,"\n..... (found pin %d) ...", pin2);		/*		 * legacy devices should be connected to IO APIC #0		 */		setup_ExtINT_IRQ0_pin(pin2, vector);		if (timer_irq_works()) {			printk("works.\n");			nmi_watchdog_default();			if (nmi_watchdog == NMI_IO_APIC) {				setup_nmi();			}			return;		}		/*		 * Cleanup, just in case ...		 */		clear_IO_APIC_pin(0, pin2);	}	printk(" failed.\n");	if (nmi_watchdog) {		printk(KERN_WARNING "timer doesn't work through the IO-APIC - disabling NMI Watchdog!\n");		nmi_watchdog = 0;	}	apic_printk(APIC_VERBOSE, KERN_INFO "...trying to set up timer as Virtual Wire IRQ...");	disable_8259A_irq(0);	irq_desc[0].handler = &lapic_irq_type;	apic_write_around(APIC_LVT0, APIC_DM_FIXED | vector);	/* Fixed mode */	enable_8259A_irq(0);	if (timer_irq_works()) {		apic_printk(APIC_QUIET, " works.\n");		return;	}	apic_write_around(APIC_LVT0, APIC_LVT_MASKED | APIC_DM_FIXED | vector);	apic_printk(APIC_VERBOSE," failed.\n");	apic_printk(APIC_VERBOSE, KERN_INFO "...trying to set up timer as ExtINT IRQ...");	init_8259A(0);	make_8259A_irq(0);	apic_write_around(APIC_LVT0, APIC_DM_EXTINT);	unlock_ExtINT_logic();	if (timer_irq_works()) {		apic_printk(APIC_VERBOSE," works.\n");		return;	}	apic_printk(APIC_VERBOSE," failed :(.\n");	panic("IO-APIC + timer doesn't work! Try using the 'noapic' kernel parameter\n");}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/66759a01adbfe8828dd063e32cf5ed3f46696181/io_apic.c/buggy/arch/x86_64/kernel/io_apic.c