From: "Lu, Yinghai" <yinghai.lu@amd.com>
To: ebiederm@xmission.com
Cc: "Linus Torvalds" <torvalds@osdl.org>,
"Tobias Diedrich" <ranma+kernel@tdiedrich.de>,
"Andrew Morton" <akpm@osdl.org>, "Adrian Bunk" <bunk@stusta.de>,
"Andi Kleen" <ak@suse.de>,
"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH 1/4] x86_64 io_apic: Implement remove_pin_to_irq
Date: Mon, 8 Jan 2007 13:46:49 -0800 [thread overview]
Message-ID: <5986589C150B2F49A46483AC44C7BCA490736D@ssvlexmb2.amd.com> (raw)
-----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
next reply other threads:[~2007-01-08 21:50 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-08 21:46 Lu, Yinghai [this message]
2007-01-08 22:50 ` [PATCH] x86_64 ioapic: check_timer_pin Don't add_pin_to_irq if it is already there Eric W. Biederman
-- strict thread matches above, loose matches on Subject: below --
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
[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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5986589C150B2F49A46483AC44C7BCA490736D@ssvlexmb2.amd.com \
--to=yinghai.lu@amd.com \
--cc=ak@suse.de \
--cc=akpm@osdl.org \
--cc=bunk@stusta.de \
--cc=ebiederm@xmission.com \
--cc=linux-kernel@vger.kernel.org \
--cc=ranma+kernel@tdiedrich.de \
--cc=torvalds@osdl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®