From: Yinghai Lu <yinghai@kernel.org>
To: Len Brown <lenb@kernel.org>, Ingo Molnar <mingo@elte.hu>,
Thomas Gleixner <tglx@linutronix.de>,
"H. Peter Anvin" <hpa@zytor.com>,
Jesse Barnes <jbarnes@virtuousgeek.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Bjorn Helgaas <bjorn.helgaas@hp.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
ACPI Devel Maling List <linux-acpi@vger.kernel.org>,
linux-pci@vger.kernel.org
Subject: [PATCH] x86/acpi: remove compress irq trick for 32bit
Date: Sun, 26 Apr 2009 14:53:15 -0700 [thread overview]
Message-ID: <49F4D7CB.4040406@kernel.org> (raw)
In-Reply-To: <alpine.LFD.2.00.0904230039420.21119@localhost.localdomain>
We already have per cpu vector for 32bit, and don't need this trick any more.
on 3 ioapic system (24 per ioapic) before patch got
ACPI: PCI Interrupt Link [ILSB] enabled at IRQ 71
IOAPIC[2]: Set routing entry (10-23 -> 0xa9 -> IRQ 64 Mode:1 Active:1)
pci 0000:80:01.1: PCI INT A -> Link[ILSB] -> GSI 71 (level, low) -> IRQ 64
ACPI: PCI Interrupt Link [LE5B] enabled at IRQ 67
IOAPIC[2]: Set routing entry (10-19 -> 0xb1 -> IRQ 65 Mode:1 Active:1)
pci 0000:83:00.0: PCI INT B -> Link[LE5B] -> GSI 67 (level, low) -> IRQ 65
ACPI: PCI Interrupt Link [LE5A] enabled at IRQ 66
IOAPIC[2]: Set routing entry (10-18 -> 0xb9 -> IRQ 66 Mode:1 Active:1)
pci 0000:83:00.1: PCI INT A -> Link[LE5A] -> GSI 66 (level, low) -> IRQ 66
ACPI: PCI Interrupt Link [LE5D] enabled at IRQ 65
IOAPIC[2]: Set routing entry (10-17 -> 0xc1 -> IRQ 67 Mode:1 Active:1)
pci 0000:84:00.0: PCI INT B -> Link[LE5D] -> GSI 65 (level, low) -> IRQ 67
ACPI: PCI Interrupt Link [LE5C] enabled at IRQ 64
IOAPIC[2]: Set routing entry (10-16 -> 0xc9 -> IRQ 68 Mode:1 Active:1)
pci 0000:84:00.1: PCI INT A -> Link[LE5C] -> GSI 64 (level, low) -> IRQ 68
pci 0000:87:00.0: PCI INT B -> Link[LE5A] -> GSI 66 (level, low) -> IRQ 66
pci 0000:87:00.1: PCI INT A -> Link[LE5D] -> GSI 65 (level, low) -> IRQ 67
pci 0000:88:00.0: PCI INT B -> Link[LE5C] -> GSI 64 (level, low) -> IRQ 68
pci 0000:88:00.1: PCI INT A -> Link[LE5B] -> GSI 67 (level, low) -> IRQ 65
pci 0000:8b:00.0: PCI INT B -> Link[LE5A] -> GSI 66 (level, low) -> IRQ 66
pci 0000:8b:00.1: PCI INT A -> Link[LE5D] -> GSI 65 (level, low) -> IRQ 67
pci 0000:8c:00.0: PCI INT B -> Link[LE5C] -> GSI 64 (level, low) -> IRQ 68
pci 0000:8c:00.1: PCI INT A -> Link[LE5B] -> GSI 67 (level, low) -> IRQ 65
after patch will get
ACPI: PCI Interrupt Link [ILSB] enabled at IRQ 71
IOAPIC[2]: Set routing entry (10-23 -> 0xa9 -> IRQ 71 Mode:1 Active:1)
pci 0000:80:01.1: PCI INT A -> Link[ILSB] -> GSI 71 (level, low) -> IRQ 71
ACPI: PCI Interrupt Link [LE5B] enabled at IRQ 67
IOAPIC[2]: Set routing entry (10-19 -> 0xb1 -> IRQ 67 Mode:1 Active:1)
pci 0000:83:00.0: PCI INT B -> Link[LE5B] -> GSI 67 (level, low) -> IRQ 67
ACPI: PCI Interrupt Link [LE5A] enabled at IRQ 66
IOAPIC[2]: Set routing entry (10-18 -> 0xb9 -> IRQ 66 Mode:1 Active:1)
pci 0000:83:00.1: PCI INT A -> Link[LE5A] -> GSI 66 (level, low) -> IRQ 66
ACPI: PCI Interrupt Link [LE5D] enabled at IRQ 65
IOAPIC[2]: Set routing entry (10-17 -> 0xc1 -> IRQ 65 Mode:1 Active:1)
pci 0000:84:00.0: PCI INT B -> Link[LE5D] -> GSI 65 (level, low) -> IRQ 65
ACPI: PCI Interrupt Link [LE5C] enabled at IRQ 64
IOAPIC[2]: Set routing entry (10-16 -> 0xc9 -> IRQ 64 Mode:1 Active:1)
pci 0000:84:00.1: PCI INT A -> Link[LE5C] -> GSI 64 (level, low) -> IRQ 64
pci 0000:87:00.0: PCI INT B -> Link[LE5A] -> GSI 66 (level, low) -> IRQ 66
pci 0000:87:00.1: PCI INT A -> Link[LE5D] -> GSI 65 (level, low) -> IRQ 65
pci 0000:88:00.0: PCI INT B -> Link[LE5C] -> GSI 64 (level, low) -> IRQ 64
pci 0000:88:00.1: PCI INT A -> Link[LE5B] -> GSI 67 (level, low) -> IRQ 67
pci 0000:8b:00.0: PCI INT B -> Link[LE5A] -> GSI 66 (level, low) -> IRQ 66
pci 0000:8b:00.1: PCI INT A -> Link[LE5D] -> GSI 65 (level, low) -> IRQ 65
pci 0000:8c:00.0: PCI INT B -> Link[LE5C] -> GSI 64 (level, low) -> IRQ 64
pci 0000:8c:00.1: PCI INT A -> Link[LE5B] -> GSI 67 (level, low) -> IRQ 67
[ Impact: make irq = gsi on 32bit system with more ioapics ]
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
---
arch/x86/kernel/acpi/boot.c | 65 ++++----------------------------------------
1 file changed, 7 insertions(+), 58 deletions(-)
Index: linux-2.6/arch/x86/kernel/acpi/boot.c
===================================================================
--- linux-2.6.orig/arch/x86/kernel/acpi/boot.c
+++ linux-2.6/arch/x86/kernel/acpi/boot.c
@@ -1162,22 +1162,9 @@ int mp_register_gsi(struct device *dev,
{
int ioapic;
int ioapic_pin;
-#ifdef CONFIG_X86_32
-#define MAX_GSI_NUM 4096
-#define IRQ_COMPRESSION_START 64
-
- static int pci_irq = IRQ_COMPRESSION_START;
- /*
- * Mapping between Global System Interrupts, which
- * represent all possible interrupts, and IRQs
- * assigned to actual devices.
- */
- static int gsi_to_irq[MAX_GSI_NUM];
-#else
if (acpi_irq_model != ACPI_IRQ_MODEL_IOAPIC)
return gsi;
-#endif
/* Don't set up the ACPI SCI because it's already set up */
if (acpi_gbl_FADT.sci_interrupt == gsi)
@@ -1196,66 +1183,28 @@ int mp_register_gsi(struct device *dev,
gsi = ioapic_renumber_irq(ioapic, gsi);
#endif
- /*
- * Avoid pin reprogramming. PRTs typically include entries
- * with redundant pin->gsi mappings (but unique PCI devices);
- * we only program the IOAPIC on the first.
- */
if (ioapic_pin > MP_MAX_IOAPIC_PIN) {
printk(KERN_ERR "Invalid reference to IOAPIC pin "
"%d-%d\n", mp_ioapic_routing[ioapic].apic_id,
ioapic_pin);
return gsi;
}
+
+ /*
+ * Avoid pin reprogramming. PRTs typically include entries
+ * with redundant pin->gsi mappings (but unique PCI devices);
+ * we only program the IOAPIC on the first.
+ */
if (test_bit(ioapic_pin, mp_ioapic_routing[ioapic].pin_programmed)) {
pr_debug("Pin %d-%d already programmed\n",
mp_ioapic_routing[ioapic].apic_id, ioapic_pin);
-#ifdef CONFIG_X86_32
- return (gsi < IRQ_COMPRESSION_START ? gsi : gsi_to_irq[gsi]);
-#else
return gsi;
-#endif
}
-
set_bit(ioapic_pin, mp_ioapic_routing[ioapic].pin_programmed);
-#ifdef CONFIG_X86_32
- /*
- * For GSI >= 64, use IRQ compression
- */
- if ((gsi >= IRQ_COMPRESSION_START)
- && (triggering == ACPI_LEVEL_SENSITIVE)) {
- /*
- * For PCI devices assign IRQs in order, avoiding gaps
- * due to unused I/O APIC pins.
- */
- int irq = gsi;
- if (gsi < MAX_GSI_NUM) {
- /*
- * Retain the VIA chipset work-around (gsi > 15), but
- * avoid a problem where the 8254 timer (IRQ0) is setup
- * via an override (so it's not on pin 0 of the ioapic),
- * and at the same time, the pin 0 interrupt is a PCI
- * type. The gsi > 15 test could cause these two pins
- * to be shared as IRQ0, and they are not shareable.
- * So test for this condition, and if necessary, avoid
- * the pin collision.
- */
- gsi = pci_irq++;
- /*
- * Don't assign IRQ used by ACPI SCI
- */
- if (gsi == acpi_gbl_FADT.sci_interrupt)
- gsi = pci_irq++;
- gsi_to_irq[irq] = gsi;
- } else {
- printk(KERN_ERR "GSI %u is too high\n", gsi);
- return gsi;
- }
- }
-#endif
io_apic_set_pci_routing(dev, ioapic, ioapic_pin, gsi,
triggering == ACPI_EDGE_SENSITIVE ? 0 : 1,
polarity == ACPI_ACTIVE_HIGH ? 0 : 1);
+
return gsi;
}
next prev parent reply other threads:[~2009-04-26 21:55 UTC|newest]
Thread overview: 76+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-16 1:39 [PATCH 1/8] x86/irq: remove NUMA_MIGRATIE_IRQ_DESC Yinghai Lu
2009-04-16 1:40 ` [PATCH 2/8] irq: correct CPUMASKS_OFFSTACK typo -v3 Yinghai Lu
2009-04-16 1:41 ` [PATCH 3/8] irq: make set_affinity to return status -v2 Yinghai Lu
2009-04-16 9:08 ` Ingo Molnar
2009-04-16 9:17 ` Joe Perches
2009-04-16 9:25 ` Ingo Molnar
2009-04-16 1:41 ` [PATCH 4/8] irq: only update affinity in chip set_affinity() -v3 Yinghai Lu
2009-04-16 23:25 ` Suresh Siddha
2009-04-17 1:58 ` Yinghai Lu
2009-04-16 1:42 ` [PATCH 5/8] irq: change irq_desc_alloc to take node instead cpu Yinghai Lu
2009-04-16 9:10 ` Ingo Molnar
2009-04-16 1:43 ` [PATCH 6/8] irq: make io_apic_set_pci_routing to take device Yinghai Lu
2009-04-16 9:16 ` Ingo Molnar
2009-04-16 1:44 ` [PATCH 7/8] x86/irq: make MSI irq_desc numa aware Yinghai Lu
2009-04-16 9:18 ` Ingo Molnar
2009-04-16 1:44 ` [PATCH 8/8] irq: make ht " Yinghai Lu
2009-04-16 9:21 ` Ingo Molnar
2009-04-16 23:34 ` Suresh Siddha
2009-04-16 9:03 ` [PATCH 1/8] x86/irq: remove NUMA_MIGRATIE_IRQ_DESC Ingo Molnar
2009-04-17 4:17 ` [PATCH 1/9] x86/irq: remove NUMA_MIGRATE_IRQ_DESC Yinghai Lu
2009-04-17 4:18 ` [PATCH 2/9] irq: correct CPUMASKS_OFFSTACK typo -v4 Yinghai Lu
2009-04-28 0:58 ` [PATCH 2/9] x86/irq: remove NUMA_MIGRATE_IRQ_DESC -v2 Yinghai Lu
2009-05-01 17:06 ` [tip:irq/numa] x86/irq: remove leftover code from NUMA_MIGRATE_IRQ_DESC tip-bot for Yinghai Lu
2009-04-17 4:19 ` [PATCH 3/9] irq: make set_affinity to return status -v2 Yinghai Lu
2009-04-28 0:59 ` Yinghai Lu
2009-05-01 17:06 ` [tip:irq/numa] irq: change ->set_affinity() to return status tip-bot for Yinghai Lu
2009-05-06 6:55 ` [tip:irq/numa] irq: change ->set_affinity() to return status, fix tip-bot for Ingo Molnar
2009-04-17 4:20 ` [PATCH 4/9] irq: only update affinity if set_affinity() sucessfully -v4 Yinghai Lu
2009-04-28 0:59 ` Yinghai Lu
2009-05-01 17:07 ` [tip:irq/numa] irq: only update affinity if ->set_affinity() is sucessfull tip-bot for Yinghai Lu
2009-04-17 4:21 ` [PATCH 5/9] x86/irq: change irq_desc_alloc to take node instead cpu Yinghai Lu
2009-04-28 1:00 ` [PATCH 5/9] x86/irq: change irq_desc_alloc to take node instead cpu -v2 Yinghai Lu
2009-05-01 17:07 ` [tip:irq/numa] x86/irq: change irq_desc_alloc() to take node instead of cpu tip-bot for Yinghai Lu
2009-04-17 4:23 ` [PATCH 6/9] irq: make io_apic_set_pci_routing to take device Yinghai Lu
2009-04-23 4:42 ` Len Brown
2009-04-26 21:53 ` Yinghai Lu [this message]
2009-04-26 21:55 ` [PATCH] x86/acpi: calling mp_config_acpi_gsi in mp_register_gsi Yinghai Lu
2009-04-26 23:25 ` Yinghai Lu
2009-04-27 1:12 ` [PATCH] x86/acpi: calling mp_config_acpi_gsi in mp_register_gsi -v2 Yinghai Lu
2009-04-27 3:30 ` [PATCH] x86/acpi: remove compress irq trick for 32bit Ingo Molnar
2009-05-14 15:41 ` Len Brown
2009-05-15 13:06 ` Ingo Molnar
2009-04-28 1:01 ` [PATCH 6/9] irq: make io_apic_set_pci_routing to take device Yinghai Lu
2009-05-01 17:07 ` [tip:irq/numa] irq: change ACPI GSI APIs to also take a device argument tip-bot for Yinghai Lu
2009-04-17 4:24 ` [PATCH 7/9] irq: make io_apic_set_pci_routing to use device Yinghai Lu
2009-04-28 1:01 ` Yinghai Lu
2009-05-01 17:07 ` [tip:irq/numa] irq: change io_apic_set_pci_routing() to use device parameter tip-bot for Yinghai Lu
2009-04-17 4:25 ` [PATCH 8/9] x86/irq: make MSI irq_desc numa aware Yinghai Lu
2009-04-27 3:26 ` [PATCH 8/9] x86/irq: make MSI irq_desc numa aware -v2 Yinghai Lu
2009-04-28 1:02 ` [PATCH 8/9] x86/irq: make MSI irq_desc numa aware -v3 Yinghai Lu
2009-04-28 10:14 ` Ingo Molnar
2009-04-28 14:17 ` Yinghai Lu
2009-04-28 14:32 ` Ingo Molnar
2009-04-28 19:07 ` Yinghai Lu
2009-04-29 12:00 ` Ingo Molnar
2009-04-29 16:27 ` [PATCH] x86/irq: using move_irq_desc Yinghai Lu
2009-04-29 20:41 ` Ingo Molnar
2009-04-29 21:23 ` Ingo Molnar
2009-04-29 21:55 ` Yinghai Lu
2009-04-29 23:25 ` Yinghai Lu
2009-04-30 7:29 ` Ingo Molnar
2009-04-30 8:17 ` [PATCH] x86/irq: using move_irq_desc -v3 Yinghai Lu
2009-05-01 17:08 ` [tip:irq/numa] x86/irq: use move_irq_desc() in create_irq_nr() tip-bot for Yinghai Lu
2009-04-28 21:41 ` [PATCH] x86/irq: use move_irq_desc only when CONFIG_NUMA_IRQ_DESC is set Yinghai Lu
2009-05-01 17:07 ` [tip:irq/numa] x86/irq: change MSI irq_desc to be more numa aware tip-bot for Yinghai Lu
2009-04-17 4:25 ` [PATCH 9/9] irq: make ht irq_desc " Yinghai Lu
2009-04-28 1:02 ` Yinghai Lu
2009-04-28 10:19 ` Ingo Molnar
2009-04-28 16:28 ` Jesse Barnes
2009-04-28 16:28 ` Jesse Barnes
2009-05-01 17:07 ` [tip:irq/numa] irq: make ht irq_desc more " tip-bot for Yinghai Lu
2009-04-17 13:49 ` [PATCH 1/9] x86/irq: remove NUMA_MIGRATE_IRQ_DESC Ingo Molnar
2009-04-28 0:57 ` [PATCH 1/9] irq: correct CPUMASKS_OFFSTACK typo -v5 Yinghai Lu
2009-05-01 17:06 ` [tip:irq/numa] irq, cpumask: correct CPUMASKS_OFFSTACK typo and fix fallout tip-bot for Yinghai Lu
2009-04-17 1:00 ` [tip:irq/urgent] x86/irq: mark NUMA_MIGRATIE_IRQ_DESC broken tip-bot for Yinghai Lu
2009-04-17 1:21 ` [tip:irq/urgent] x86/irq: mark NUMA_MIGRATE_IRQ_DESC broken tip-bot for Yinghai Lu
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=49F4D7CB.4040406@kernel.org \
--to=yinghai@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=bjorn.helgaas@hp.com \
--cc=hpa@zytor.com \
--cc=jbarnes@virtuousgeek.org \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=tglx@linutronix.de \
/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;
as well as URLs for NNTP newsgroup(s).