To try different irq routing combinations so we can make an informed
guess as to how to route irqs when the BIOS gets it wrong we need
the ability to modify our irq routing data structures.
This adds remove_pin_to_irq which removes the mapping from and apic pin
to an irq.
Signed-off-by: Eric W. Biederman <[email protected]>
---
arch/x86_64/kernel/io_apic.c | 23 +++++++++++++++++++++++
1 files changed, 23 insertions(+), 0 deletions(-)
diff --git a/arch/x86_64/kernel/io_apic.c b/arch/x86_64/kernel/io_apic.c
index 2a1dcd5..7365f5f 100644
--- a/arch/x86_64/kernel/io_apic.c
+++ b/arch/x86_64/kernel/io_apic.c
@@ -286,6 +286,29 @@ static void add_pin_to_irq(unsigned int irq, int apic, int pin)
entry->pin = pin;
}
+static void remove_pin_to_irq(unsigned int irq, int apic, int pin)
+{
+ struct irq_pin_list *entry = irq_2_pin + irq;
+
+ BUG_ON(irq >= NR_IRQS);
+
+ while (entry->next && ((entry->apic != apic) || (entry->pin != pin)))
+ entry = irq_2_pin + entry->next;
+
+ if (entry->pin == apic && entry->pin == pin) {
+ if (entry->next) {
+ struct irq_pin_list *next = irq_2_pin + entry->next;
+ *entry = *next;
+ next->pin = -1;
+ next->apic = -1;
+ next->next = 0;
+ } else {
+ entry->pin = -1;
+ entry->apic = -1;
+ }
+ }
+}
+
#define DO_ACTION(name,R,ACTION, FINAL) \
\
--
1.4.4.1.g278f
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]