From: ebiederm@xmission.com (Eric W. Biederman)
To: Linus Torvalds <torvalds@osdl.org>
Cc: Tobias Diedrich <ranma+kernel@tdiedrich.de>,
Yinghai Lu <yinghai.lu@amd.com>, 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: [PATCH 3/4] x86_64 io_apic: Implment update_irq0_entry
Date: Mon, 08 Jan 2007 08:56:23 -0700 [thread overview]
Message-ID: <m1d55pikbc.fsf_-_@ebiederm.dsl.xmission.com> (raw)
In-Reply-To: <m1hcv1ikfj.fsf_-_@ebiederm.dsl.xmission.com> (Eric W. Biederman's message of "Mon, 08 Jan 2007 08:53:52 -0700")
To guess different irq routing strategies for irq 0 we
need the ability to update our data structures to reflect
our guess.
update_irq0_entry updates the mp routing table information
to reflect our current guess as to the routing of the timer
irq.
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
---
arch/x86_64/kernel/io_apic.c | 31 +++++++++++++++++++++++++++++++
1 files changed, 31 insertions(+), 0 deletions(-)
diff --git a/arch/x86_64/kernel/io_apic.c b/arch/x86_64/kernel/io_apic.c
index 5ad210f..1e68377 100644
--- a/arch/x86_64/kernel/io_apic.c
+++ b/arch/x86_64/kernel/io_apic.c
@@ -446,6 +446,37 @@ static int __init find_isa_irq_apic(int irq, int type)
return -1;
}
+static int update_irq0_entry(int apic, int pin)
+{
+ int irq = 0;
+ int idx;
+ int isa_bus;
+
+ /* Figure out the isa bus, by convention it is bus 0,
+ * but be prepared for someone being creative.
+ */
+ for (isa_bus = 0; isa_bus < MAX_MP_BUSSES; isa_bus++)
+ if (test_bit(isa_bus, mp_bus_not_pci))
+ break;
+ if (isa_bus >= MAX_MP_BUSSES)
+ isa_bus = 0;
+
+ idx = find_irq_entry(apic, pin, mp_INT);
+ if (idx == -1) {
+ idx = mp_irq_entries;
+ if (++mp_irq_entries >= MAX_IRQ_SOURCES)
+ panic("MAX # of irq sources exceeded!!!\n");
+ }
+ mp_irqs[idx].mpc_type = MP_INTSRC;
+ mp_irqs[idx].mpc_irqtype = mp_INT;
+ mp_irqs[idx].mpc_irqflag = 0; /* Use bus defaults */
+ mp_irqs[idx].mpc_srcbus = isa_bus;
+ mp_irqs[idx].mpc_srcbusirq = irq;
+ mp_irqs[idx].mpc_dstapic = mp_ioapics[apic].mpc_apicid;
+ mp_irqs[idx].mpc_dstirq = pin;
+ return idx;
+}
+
/*
* Find a specific PCI IRQ entry.
* Not an __init, possibly needed by modules
--
1.4.4.1.g278f
next prev parent reply other threads:[~2007-01-08 15:56 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
[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 ` Eric W. Biederman [this message]
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
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=m1d55pikbc.fsf_-_@ebiederm.dsl.xmission.com \
--to=ebiederm@xmission.com \
--cc=ak@suse.de \
--cc=akpm@osdl.org \
--cc=bunk@stusta.de \
--cc=linux-kernel@vger.kernel.org \
--cc=ranma+kernel@tdiedrich.de \
--cc=torvalds@osdl.org \
--cc=yinghai.lu@amd.com \
/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