From: "Jörg Prante" <joergprante-UIqTAjE4tzc5WgrkcBd8vg@public.gmane.org>
To: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Cc: Margit Schubert-While <margitsw-zqRNUXuvxA0b1SvskN2V4Q@public.gmane.org>
Subject: [PATCH] fix for 2.4.21-pre2 and acpi-20021212
Date: Fri, 3 Jan 2003 20:48:53 +0100 [thread overview]
Message-ID: <200301032048.53199.joergprante@netcologne.de> (raw)
[-- Attachment #1: Type: text/plain, Size: 416 bytes --]
Hi,
this patch is needed for acpi-20021212 with 2.4.21-pre2 on a Pentium 4 with
ACPI IO-APIC. The dynamic MP busses and IRQ_SOURCES in 2.4.21-pre2 introduced
a conflict that will rise NULL pointer dereferences when combined with the
ACPI patch. I don't have the hardware to test it, but Margit Schubert-While
reported a successful boot.
http://infolinux.de/jp/087_acpi-mpparse-fix
Cheers,
Jörg
[-- Attachment #2: 087_acpi-mpparse-fix --]
[-- Type: text/x-diff, Size: 2842 bytes --]
--- linux-2.4.21-pre2-jp15/arch/i386/kernel/mpparse.c.orig 2003-01-02 21:13:16.000000000 +0100
+++ linux-2.4.21-pre2-jp15/arch/i386/kernel/mpparse.c 2003-01-03 18:14:10.000000000 +0100
@@ -1132,10 +1132,28 @@
void __init mp_config_acpi_legacy_irqs (void)
{
- struct mpc_config_intsrc intsrc;
int i = 0;
int ioapic = -1;
+ /*
+ * Initialize mp_irqs for IRQ configuration.
+ */
+ unsigned char *bus_data;
+ int count;
+
+ count = (MAX_MP_BUSSES * sizeof(int)) * 4;
+ count += (MAX_IRQ_SOURCES * sizeof(int)) * 4;
+ bus_data = alloc_bootmem(count);
+ if (!bus_data) {
+ panic("Fatal: can't allocate bus memory for ACPI legacy IRQ!");
+ }
+ mp_bus_id_to_type = (int *)&bus_data[0];
+ mp_bus_id_to_node = (int *)&bus_data[(MAX_MP_BUSSES * sizeof(int))];
+ mp_bus_id_to_local = (int *)&bus_data[(MAX_MP_BUSSES * sizeof(int)) * 2];
+ mp_bus_id_to_pci_bus = (int *)&bus_data[(MAX_MP_BUSSES * sizeof(int)) * 3];
+ mp_irqs = (struct mpc_config_intsrc *)&bus_data[(MAX_MP_BUSSES * sizeof(int)) * 4];
+ memset(mp_bus_id_to_pci_bus, -1, MAX_MP_BUSSES);
+
/*
* Fabricate the legacy ISA bus (bus #31).
*/
@@ -1149,11 +1167,6 @@
if (ioapic < 0)
return;
- intsrc.mpc_type = MP_INTSRC;
- intsrc.mpc_irqflag = 0; /* Conforming */
- intsrc.mpc_srcbus = MP_ISA_BUS;
- intsrc.mpc_dstapic = mp_ioapics[ioapic].mpc_apicid;
-
/*
* Use the default configuration for the IRQs 0-15. These may be
* overriden by (MADT) interrupt source override entries.
@@ -1162,17 +1175,24 @@
if (i == 2) continue; /* Don't connect IRQ2 */
- intsrc.mpc_irqtype = i ? mp_INT : mp_ExtINT; /* 8259A to #0 */
- intsrc.mpc_srcbusirq = i; /* Identity mapped */
- intsrc.mpc_dstirq = i;
+ mp_irqs[mp_irq_entries].mpc_type = MP_INTSRC;
+ mp_irqs[mp_irq_entries].mpc_irqflag = 0; /* Conforming */
+ mp_irqs[mp_irq_entries].mpc_srcbus = MP_ISA_BUS;
+ mp_irqs[mp_irq_entries].mpc_dstapic = mp_ioapics[ioapic].mpc_apicid;
+ mp_irqs[mp_irq_entries].mpc_irqtype = i ? mp_INT : mp_ExtINT; /* 8259A to #0 */
+ mp_irqs[mp_irq_entries].mpc_srcbusirq = i; /* Identity mapped */
+ mp_irqs[mp_irq_entries].mpc_dstirq = i;
Dprintk("Int: type %d, pol %d, trig %d, bus %d, irq %d, "
- "%d-%d\n", intsrc.mpc_irqtype, intsrc.mpc_irqflag & 3,
- (intsrc.mpc_irqflag >> 2) & 3, intsrc.mpc_srcbus,
- intsrc.mpc_srcbusirq, intsrc.mpc_dstapic,
- intsrc.mpc_dstirq);
+ "%d-%d\n",
+ mp_irqs[mp_irq_entries].mpc_irqtype,
+ mp_irqs[mp_irq_entries].mpc_irqflag & 3,
+ (mp_irqs[mp_irq_entries].mpc_irqflag >> 2) & 3,
+ mp_irqs[mp_irq_entries].mpc_srcbus,
+ mp_irqs[mp_irq_entries].mpc_srcbusirq,
+ mp_irqs[mp_irq_entries].mpc_dstapic,
+ mp_irqs[mp_irq_entries].mpc_dstirq);
- mp_irqs[mp_irq_entries] = intsrc;
if (++mp_irq_entries == MAX_IRQ_SOURCES)
panic("Max # of irq sources exceeded!\n");
}
next reply other threads:[~2003-01-03 19:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-01-03 19:48 Jörg Prante [this message]
-- strict thread matches above, loose matches on Subject: below --
2003-01-03 19:58 [PATCH] fix for 2.4.21-pre2 and acpi-20021212 Grover, Andrew
[not found] <F760B14C9561B941B89469F59BA3A847137F23@orsmsx401.jf.intel. com>
2003-01-03 21:42 ` Margit Schubert-While
[not found] ` <4.3.2.7.2.20030103222354.00ae1aa0-KvFWrsCPMkLbFfAX06+HdQ@public.gmane.org>
2003-01-06 17:52 ` Ducrot Bruno
[not found] ` <20030106175205.GC374-j6u/t2rXLliUoIHC/UFpr9i2O/JbrIOy@public.gmane.org>
2003-01-07 17:42 ` Pavel Machek
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=200301032048.53199.joergprante@netcologne.de \
--to=joergprante-uiqtaje4tzc5wgrkcbd8vg@public.gmane.org \
--cc=acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
--cc=margitsw-zqRNUXuvxA0b1SvskN2V4Q@public.gmane.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