* [PATCH][2.4.23-pre3] repair mpparse for default MP systems
@ 2003-09-11 22:21 Mikael Pettersson
2003-09-12 3:16 ` Mathieu Desnoyers
0 siblings, 1 reply; 4+ messages in thread
From: Mikael Pettersson @ 2003-09-11 22:21 UTC (permalink / raw)
To: mathieu.desnoyers; +Cc: linux-kernel, macro
Mathieu,
This patch for 2.4.23-pre3 should fix the problems your dual
P5 with default MP config has been having since 2.4.21-pre2.
Please let us know if it works or not.
/Mikael
--- linux-2.4.23-pre3/arch/i386/kernel/mpparse.c.~1~ 2003-09-11 19:49:56.000000000 +0200
+++ linux-2.4.23-pre3/arch/i386/kernel/mpparse.c 2003-09-11 23:31:32.000000000 +0200
@@ -683,6 +683,24 @@
struct mpc_config_lintsrc lintsrc;
int linttypes[2] = { mp_ExtINT, mp_NMI };
int i;
+ struct {
+ int mp_bus_id_to_type[MAX_MP_BUSSES];
+ int mp_bus_id_to_node[MAX_MP_BUSSES];
+ int mp_bus_id_to_local[MAX_MP_BUSSES];
+ int mp_bus_id_to_pci_bus[MAX_MP_BUSSES];
+ struct mpc_config_intsrc mp_irqs[MAX_IRQ_SOURCES];
+ } *bus_data;
+
+ bus_data = alloc_bootmem(sizeof(*bus_data));
+ if (!bus_data)
+ panic("SMP mptable: out of memory!\n");
+ mp_bus_id_to_type = bus_data->mp_bus_id_to_type;
+ mp_bus_id_to_node = bus_data->mp_bus_id_to_node;
+ mp_bus_id_to_local = bus_data->mp_bus_id_to_local;
+ mp_bus_id_to_pci_bus = bus_data->mp_bus_id_to_pci_bus;
+ mp_irqs = bus_data->mp_irqs;
+ for (i = 0; i < MAX_MP_BUSSES; ++i)
+ mp_bus_id_to_pci_bus[i] = -1;
/*
* local APIC has default address
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH][2.4.23-pre3] repair mpparse for default MP systems
2003-09-11 22:21 [PATCH][2.4.23-pre3] repair mpparse for default MP systems Mikael Pettersson
@ 2003-09-12 3:16 ` Mathieu Desnoyers
2003-09-12 9:31 ` Mikael Pettersson
0 siblings, 1 reply; 4+ messages in thread
From: Mathieu Desnoyers @ 2003-09-12 3:16 UTC (permalink / raw)
To: Mikael Pettersson; +Cc: mathieu.desnoyers, linux-kernel, macro
* Mikael Pettersson (mikpe@csd.uu.se) wrote:
> Mathieu,
>
> This patch for 2.4.23-pre3 should fix the problems your dual
> P5 with default MP config has been having since 2.4.21-pre2.
> Please let us know if it works or not.
>
> /Mikael
>
Yes, I just tested this patch, and everything seems to work fine. Thank
you. :)
The only point I see, which is not triggered on my machine (because of
the absence of ACPI) is this one :
There is also an initialization of this mp_irqs variable in
mp_config_acpi_legacy_irqs from mpparse.c. It only seems to be called
from within acpi_boot_init in acpi.c. So I wonder if it's possible that
we do use default configuration and then also go into
mp_config_acpi_legacy_irqs during the acpi init, thus reserving the
memory twice and forgetting the old pointer, which could lead to an
erratic result.
If it's possible, then there is still a problem in there.
OpenPGP public key: http://krystal.dyndns.org:8080/key/compudj.gpg
Key fingerprint: 8CD5 52C3 8E3C 4140 715F BA06 3F25 A8FE 3BAE 9A68
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH][2.4.23-pre3] repair mpparse for default MP systems
2003-09-12 3:16 ` Mathieu Desnoyers
@ 2003-09-12 9:31 ` Mikael Pettersson
2003-09-12 11:58 ` Maciej W. Rozycki
0 siblings, 1 reply; 4+ messages in thread
From: Mikael Pettersson @ 2003-09-12 9:31 UTC (permalink / raw)
To: Mathieu Desnoyers; +Cc: linux-kernel, macro
Mathieu Desnoyers writes:
> * Mikael Pettersson (mikpe@csd.uu.se) wrote:
> > Mathieu,
> >
> > This patch for 2.4.23-pre3 should fix the problems your dual
> > P5 with default MP config has been having since 2.4.21-pre2.
> > Please let us know if it works or not.
> >
> > /Mikael
> >
>
> Yes, I just tested this patch, and everything seems to work fine. Thank
> you. :)
>
> The only point I see, which is not triggered on my machine (because of
> the absence of ACPI) is this one :
>
> There is also an initialization of this mp_irqs variable in
> mp_config_acpi_legacy_irqs from mpparse.c. It only seems to be called
> from within acpi_boot_init in acpi.c. So I wonder if it's possible that
> we do use default configuration and then also go into
> mp_config_acpi_legacy_irqs during the acpi init, thus reserving the
> memory twice and forgetting the old pointer, which could lead to an
> erratic result.
>
> If it's possible, then there is still a problem in there.
I looked through acpi/mpparse/setup and I don't think there is
a problem. acpi does mp_config_acpi_legacy_irqs if it found its
tables, but this is done before get_smp_config, and get_smp_config
bails out early if ACPI already has done the deed. If it were a
problem, it would affect _all_ MP configs not just yours.
I'll submit the patch to Marcelo then, with appropriate explaination.
(No forward port to 2.6 is needed, since the arrays-to-pointers
change hasn't been done there (yet).)
/Mikael
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH][2.4.23-pre3] repair mpparse for default MP systems
2003-09-12 9:31 ` Mikael Pettersson
@ 2003-09-12 11:58 ` Maciej W. Rozycki
0 siblings, 0 replies; 4+ messages in thread
From: Maciej W. Rozycki @ 2003-09-12 11:58 UTC (permalink / raw)
To: Mikael Pettersson; +Cc: Mathieu Desnoyers, linux-kernel
On Fri, 12 Sep 2003, Mikael Pettersson wrote:
> I'll submit the patch to Marcelo then, with appropriate explaination.
Thanks a lot for your work -- the changes look just fine.
--
+ Maciej W. Rozycki, Technical University of Gdansk, Poland +
+--------------------------------------------------------------+
+ e-mail: macro@ds2.pg.gda.pl, PGP key available +
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2003-09-12 11:59 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-09-11 22:21 [PATCH][2.4.23-pre3] repair mpparse for default MP systems Mikael Pettersson
2003-09-12 3:16 ` Mathieu Desnoyers
2003-09-12 9:31 ` Mikael Pettersson
2003-09-12 11:58 ` Maciej W. Rozycki
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox