[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <m1d55pikbc.fsf_-_@ebiederm.dsl.xmission.com>
Date: Mon, 08 Jan 2007 08:56:23 -0700
From: ebiederm@...ssion.com (Eric W. Biederman)
To: Linus Torvalds <torvalds@...l.org>
Cc: Tobias Diedrich <ranma+kernel@...edrich.de>,
Yinghai Lu <yinghai.lu@....com>, Andrew Morton <akpm@...l.org>,
Adrian Bunk <bunk@...sta.de>, Andi Kleen <ak@...e.de>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: [PATCH 3/4] x86_64 io_apic: Implment update_irq0_entry
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@...ssion.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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists