mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* RE: [PATCH 1/4] x86_64 io_apic: Implement remove_pin_to_irq
@ 2007-01-08 21:09 Lu, Yinghai
  2007-01-08 21:30 ` Eric W. Biederman
  0 siblings, 1 reply; 4+ messages in thread
From: Lu, Yinghai @ 2007-01-08 21:09 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 7:50 AM
To: Linus Torvalds
Cc: Tobias Diedrich; Lu, Yinghai; Andrew Morton; Adrian Bunk; Andi
Kleen; Linux Kernel Mailing List
Subject: [PATCH 1/4] x86_64 io_apic: Implement remove_pin_to_irq

+static void remove_pin_to_irq(unsigned int irq, int apic, int pin)
+{
+	struct irq_pin_list *entry = irq_2_pin + irq;

You may need to update add_pin_to_irq to avoid multi entries for irq 0.

YH



^ permalink raw reply	[flat|nested] 4+ messages in thread
* RE: [PATCH 1/4] x86_64 io_apic: Implement remove_pin_to_irq
@ 2007-01-08 21:46 Lu, Yinghai
  0 siblings, 0 replies; 4+ messages in thread
From: Lu, Yinghai @ 2007-01-08 21:46 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 1:31 PM
To: Lu, Yinghai
Cc: Linus Torvalds; Tobias Diedrich; Andrew Morton; Adrian Bunk; Andi
Kleen; Linux Kernel Mailing List
Subject: Re: [PATCH 1/4] x86_64 io_apic: Implement remove_pin_to_irq

>Any updates to add_pin_to_irq are wrong.  It works fine.  If there
>is something wrong we need to fix remove_pin_to_irq.

>What is the problem you see?  Sorry I'm dense at the moment.

+static int check_timer_pin(int apic, int pin) {
+	int irq, idx;
+	/* 
+	 * Test the architecture default i8254 timer pin
+	 * of apic 0 pin 2.
+	 */
+
+
+	/* 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);
+}
+

In the check_timer_pin, irq_from_pin could return 0, it mean some entry
is for IRQ0 already.
The add_pin_to_irq could add another same entry for it again.

YH



^ permalink raw reply	[flat|nested] 4+ messages in thread
[parent not found: <5986589C150B2F49A46483AC44C7BCA490733F@ssvlexmb2.amd.com>]

end of thread, other threads:[~2007-01-08 21:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-01-08 21:09 [PATCH 1/4] x86_64 io_apic: Implement remove_pin_to_irq Lu, Yinghai
2007-01-08 21:30 ` Eric W. Biederman
  -- strict thread matches above, loose matches on Subject: below --
2007-01-08 21:46 Lu, Yinghai
     [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

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

Powered by JetHome