public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* RE: [PATCH 4/4] x86_64 ioapic: Improve the heuristics for when check_timer fails.
@ 2007-01-08 17:16 Lu, Yinghai
  2007-01-08 20:46 ` Eric W. Biederman
  0 siblings, 1 reply; 23+ messages in thread
From: Lu, Yinghai @ 2007-01-08 17:16 UTC (permalink / raw)
  To: ebiederm, Linus Torvalds
  Cc: Tobias Diedrich, Andrew Morton, Adrian Bunk, Andi Kleen,
	Linux Kernel Mailing List

-----Original Message-----
From: ebiederm@xmission.com [mailto:ebiederm@xmission.com] 
Sent: Monday, January 08, 2007 8:11 AM
To: Linus Torvalds
Cc: Tobias Diedrich; Lu, Yinghai; Andrew Morton; Adrian Bunk; Andi
Kleen; Linux Kernel Mailing List
Subject: [PATCH 4/4] x86_64 ioapic: Improve the heuristics for when
check_timer fails.

>I have tested this on an Nvidia board that reports that apic 0 pin 2
>works when it does not and this code successfully programs apic 0 pin 0
>into ExtINT mode.

For some CK804 boards, BIOS forget set to 8254 timer to apic0/pin2, and
still leave it at apic0/pin0. but mptable and acpi said 8254 timer is to
apic0/pin2. At such case we should try apic0/pin0 with INT mode instead
of ExtINT mode.

YH





^ permalink raw reply	[flat|nested] 23+ messages in thread
* RE: [PATCH 4/4] x86_64 ioapic: Improve the heuristics for when check_timer fails.
@ 2007-01-08 17:41 Lu, Yinghai
  2007-01-08 20:39 ` Eric W. Biederman
  0 siblings, 1 reply; 23+ messages in thread
From: Lu, Yinghai @ 2007-01-08 17:41 UTC (permalink / raw)
  To: ebiederm, Linus Torvalds
  Cc: Tobias Diedrich, Andrew Morton, Adrian Bunk, Andi Kleen,
	Linux Kernel Mailing List

-----Original Message-----
From: ebiederm@xmission.com [mailto:ebiederm@xmission.com] 
Sent: Monday, January 08, 2007 8:11 AM
To: Linus Torvalds
Cc: Tobias Diedrich; Lu, Yinghai; Andrew Morton; Adrian Bunk; Andi
Kleen; Linux Kernel Mailing List
Subject: [PATCH 4/4] x86_64 ioapic: Improve the heuristics for when
check_timer fails.


>+static int check_timer_pin(int apic, int pin)
>+{
>+	int irq, idx;
>+	/* 
>+	 * Test the architecture default i8254 timer pin
>+	 * of apic 0 pin 2.
>+	 */

Comments need to be updated.

>+
>+
>+	/* If the apic pin pair is in use by another irq fail */
>+	irq = irq_from_pin(apic, pin);
>+	if ((irq != -1) && (irq != 0)) {
>+		apic_printk(APIC_VERBOSE,KERN_INFO "...apic %d pin % in
use by irq %d\n",
>+			apic, pin, irq);
>+		return 0; 
>+	}
>+
>+	/* Add an entry in mp_irqs for irq 0 */
>+	idx = update_irq0_entry(apic, pin);
>+
>+	/* Add an entry in irq_to_pin */
>+	add_pin_to_irq(0, apic, pin);
>+
>+	/* Now setup the irq */
>+	setup_IO_APIC_irq(apic, pin, idx, 0);
>+
>+	/* And finally check to see if the irq works */
>+	return do_check_timer_pin(apic, pin);
>+}
>+

Did you miss to call irq_from_pin before add_pin_to_irq? You defined
irq_from_pin in PATCH 2/4.

YH



^ permalink raw reply	[flat|nested] 23+ messages in thread
* RE: [PATCH 4/4] x86_64 ioapic: Improve the heuristics for when check_timer fails.
@ 2007-01-08 20:53 Lu, Yinghai
  2007-01-08 21:33 ` Eric W. Biederman
  0 siblings, 1 reply; 23+ messages in thread
From: Lu, Yinghai @ 2007-01-08 20:53 UTC (permalink / raw)
  To: ebiederm
  Cc: Linus Torvalds, Tobias Diedrich, Andrew Morton, Adrian Bunk,
	Andi Kleen, Linux Kernel Mailing List

-----Original Message-----
From: ebiederm@xmission.com [mailto:ebiederm@xmission.com] 
Sent: Monday, January 08, 2007 12:47 PM
To: Lu, Yinghai
Cc: Linus Torvalds; Tobias Diedrich; Andrew Morton; Adrian Bunk; Andi
Kleen; Linux Kernel Mailing List
Subject: Re: [PATCH 4/4] x86_64 ioapic: Improve the heuristics for when
check_timer fails.


>So that doesn't invalidate the generic test.  I'm going to go dig
>out what little information I have and see if I can stair at the
>register definition.

Someone said we can that info about that reg in Kernel. And only
firmware can use that.

YH



^ permalink raw reply	[flat|nested] 23+ messages in thread
* RE: [PATCH 4/4] x86_64 ioapic: Improve the heuristics for when check_timer fails.
@ 2007-01-09 22:15 Lu, Yinghai
  2007-01-10 10:30 ` Tobias Diedrich
  0 siblings, 1 reply; 23+ messages in thread
From: Lu, Yinghai @ 2007-01-09 22:15 UTC (permalink / raw)
  To: Tobias Diedrich, Eric W. Biederman
  Cc: Linus Torvalds, Andrew Morton, Adrian Bunk, Andi Kleen,
	Linux Kernel Mailing List

-----Original Message-----
From: Tobias Diedrich [mailto:ranma+kernel@tdiedrich.de] 
Sent: Tuesday, January 09, 2007 2:01 PM
To: Eric W. Biederman
Cc: Linus Torvalds; Lu, Yinghai; Andrew Morton; Adrian Bunk; Andi Kleen;
Linux Kernel Mailing List
Subject: Re: [PATCH 4/4] x86_64 ioapic: Improve the heuristics for when
check_timer fails.


>Works fine with BIOS 0402.

>x86_64_io_apic_fix_eric_20060108

>..TIMER: vector=0x20 apic1=0 pin1=0 apic2=-1 pin2=-1
>..TIMER trying IO-APIC=0 PIN=0<3> .. failed
>...apic 0 pin  2n use by irq 2
>..MP-BIOS bug: 8254 timer not connected to IO-APIC
>...trying to set up timer (IRQ0) through the 8259A ...
>...ExtINT trying IO-APIC=0 PIN=0 .. success
>Using local APIC timer interrupts.

Tobias,

Can you post whole log for my patch?

I assume 8254 on apic0/pin2 with INT should work.

YH

--- dmesg-20070108-2.6.20-rc4-bios-0402	2007-01-08 01:51:57.000000000
+0100
+++ dmesg-20070108-2.6.20-rc4-bios-0609	2007-01-08 01:52:05.000000000
+0100

- IO-APIC (apicid-pin) 2-16, 2-17, 2-18, 2-19, 2-20, 2-21, 2-22, 2-23
not connected.
-..TIMER: vector=0x20 apic1=0 pin1=0 apic2=-1 pin2=-1
-..TIMER: trying IO-APIC=0 PIN=0 with 8259 IRQ0 disabled<3> .. failed
-..TIMER: trying IO-APIC=0 PIN=2 fallback with 8259 IRQ0
disabled<6>Using local APIC timer interrupts.
-result 12559465
+ IO-APIC (apicid-pin) 2-0, 2-16, 2-17, 2-18, 2-19, 2-20, 2-21, 2-22,
2-23 not connected.
+..TIMER: vector=0x20 apic1=0 pin1=2 apic2=-1 pin2=-1
+..TIMER: trying IO-APIC=0 PIN=2 with 8259 IRQ0 disabled<6>Using local
APIC timer interrupts.
+result 12559463



^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2007-01-10 10:31 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <5986589C150B2F49A46483AC44C7BCA490733F@ssvlexmb2.amd.com>
2007-01-03  6:23 ` 2.6.20-rc3: known unfixed regressions - x86_64 boot failure: "IO-APIC + timer doesn't work" Yinghai Lu
2007-01-08  0:55   ` Tobias Diedrich
2007-01-08  1:09     ` Linus Torvalds
2007-01-08 15:49       ` [PATCH 1/4] x86_64 io_apic: Implement remove_pin_to_irq Eric W. Biederman
2007-01-08 15:53         ` PATCH 2/4] x86_64 io_apic: Implement irq_from_pin Eric W. Biederman
2007-01-08 15:56           ` [PATCH 3/4] x86_64 io_apic: Implment update_irq0_entry Eric W. Biederman
2007-01-08 16:11             ` [PATCH 4/4] x86_64 ioapic: Improve the heuristics for when check_timer fails Eric W. Biederman
2007-01-08 20:21               ` Adrian Bunk
2007-01-08 21:45                 ` Eric W. Biederman
2007-01-08 22:33                   ` Adrian Bunk
2007-01-08 22:57                     ` Linus Torvalds
2007-01-08 23:14                     ` [discuss] " Andi Kleen
2007-01-08 23:21                       ` Adrian Bunk
2007-01-08 23:18                     ` Eric W. Biederman
2007-01-09 22:00               ` Tobias Diedrich
2007-01-08 17:16 Lu, Yinghai
2007-01-08 20:46 ` Eric W. Biederman
  -- strict thread matches above, loose matches on Subject: below --
2007-01-08 17:41 Lu, Yinghai
2007-01-08 20:39 ` Eric W. Biederman
2007-01-08 20:53 Lu, Yinghai
2007-01-08 21:33 ` Eric W. Biederman
2007-01-09 22:15 Lu, Yinghai
2007-01-10 10:30 ` Tobias Diedrich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox