2.6.0-test4 Fix mpparse properly
PATCH 1/1 2.6.0-test4 Fix mpparse properly
According to Alan Cox, the so-called erroneous code in mpparse.c should be there, but only for ES7000 platforms.
arch/i386/kernel/mpparse.c +2 -0
@@ -1129,8 +1129,10 @@continue ; ioapic_pin = irq - mp_ioapic_routing[ioapic].irq_start; +#ifdef CONFIG_X86_ES7000 if (!ioapic && (irq <16 )) irq +=16 ; +#endif /* * Avoid pin reprogramming. PRTs typically include entries
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
A message that is not in the archive (sent off-list or not yet received): 200309072130.40200.adq_dvb-fmPXVN3awWJAJAzL26g0SA@public.gmane.org
arch/i386/kernel/mpparse.c line 1135
Quoted 11 lines · On Sun, 7 Sep 2003 21:30:40 +0100 Andrew de Quincey…
arch/i386/kernel/mpparse.c +2
-0@@ -1129,8 +1129,10 @@continue ; ioapic_pin = irq - mp_ioapic_routing[ioapic].irq_start; +#ifdef CONFIG_X86_ES7000 if (!ioapic && (irq <16 )) irq +=16 ; +#endif
That won't work for an "generic" subarch kernel that supports the ES7000 and other boxes too. You should test es7000_plat instead (that's currently a static in the es7000 code, needs to be unstatic'ed).
At least one 2.4 distribution kernel does it this way.
-Andi
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 10 lines · Andi Kleen
On Sun, 7 Sep 2003 21:30:40 +0100
Quoted 7 lines · Andrew de Quincey
---
linux-2.6.0-test4.null_crs/arch/i386/kernel/mpparse.c2003-09-06
00:23:10.000000000 +0100 +++linux-2.6.0-test4.es7000fix/arch/i386/kernel/mpparse.c2003-09-07
15:53:41.369717552 +0100 @@ -1129,8 +1129,10 @@arch/i386/kernel/mpparse.c +0
-0continue ; ioapic_pin = irq - mp_ioapic_routing[ioapic].irq_start;
Quoted 8 lines
arch/i386/kernel/mpparse.c line 1135
Quoted 4 lines
arch/i386/kernel/mpparse.c +2
-0+#ifdef CONFIG_X86_ES7000 if (!ioapic && (irq <16 )) irq +=16 ; +#endif That won't work for an "generic" subarch kernel that supports the ES7000 and other boxes too. You should test
es7000_platinstead (that's currently a static in the es7000 code, needs to be unstatic'ed).
Hmm, yeah, thats a good point. However, I don't think checking for es7000_plat will work. The file defining it is only included if es7000 is targetted as a platform directly. Theres no code which checks for an es7000 platform by looking at the hardware or anything; it just sets the variable if the es7000 architecture is targetted...
Any ideas?
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 27 lines · Andi Kleen
Quoted 26 lines · Andrew de Quincey
Quoted 10 lines · Andi Kleen
On Sun, 7 Sep 2003 21:30:40 +0100
Quoted 7 lines · Andrew de Quincey
---
linux-2.6.0-test4.null_crs/arch/i386/kernel/mpparse.c2003-09-06
00:23:10.000000000 +0100 +++linux-2.6.0-test4.es7000fix/arch/i386/kernel/mpparse.c2003-09-07
15:53:41.369717552 +0100 @@ -1129,8 +1129,10 @@(quoted diff) +0
-0continue; ioapic_pin = irq - mp_ioapic_routing[ioapic].irq_start;Quoted 8 lines
Review
Quoted 4 lines
(quoted diff) +2
-0+#ifdef CONFIG_X86_ES7000 if (!ioapic && (irq < 16)) irq += 16; +#endifThat won't work for an "generic" subarch kernel that supports the ES7000 and other boxes too. You should test
es7000_platinstead (that's currently a static in the es7000 code, needs to be unstatic'ed).Hmm, yeah, thats a good point. However, I don't think checking for
es7000_platwill work. The file defining it is only included if es7000 is targetted as a platform directly. Theres no code which checks for an es7000 platform by looking at the hardware or anything; it just sets the variable if the es7000 architecture is targetted...
Quoted 4 lines
Quoted 1 line
Any ideas?
In the 2.4 UL kernel there was an automatic check using an MP table. So it's certainly possible.
Are MP tables being replaced by ACPI? I dont think my (nforce2) board has MP tables at all, relying entirely on ACPI for APIC/IO-APIC config.
Quoted 2 lines
But I guess for 2.6 it is reasonable if it only works when apic=es7000 is specified.
Hmm, not keen on that.. don't like it if it means it'll probably fail to start on the ES7000 unless that parameter is specified.
Quoted 7 lines
Actually I notice now that nobody hooked up the ES7000 into the generic arch yet so it won't work even with that. Still it would be better if the variable was tested, then whoever hooks it up later cannot fail into the trap of forgetting it.
Only trap is that
es7000_platis currently in an es7000 specific file only. It should be probably in an general file to avoid an #ifdef maze.
Yeah. OK, for the moment, I'll move the variable somewhere sensible and test it. Whoever hooks up the ES7000 can set it appropriately.. perhaps using DMI to test the machine type.
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
A message that is not in the archive (sent off-list or not yet received): 200309081607.59047.adq_dvb-fmPXVN3awWJAJAzL26g0SA@public.gmane.org
Quoted 2 lines
Are MP tables being replaced by ACPI? I dont think my (nforce2) board has MP tables at all, relying entirely on ACPI for APIC/IO-APIC config.
At least the ES7000 has mptables/$PIR
Quoted 6 lines
Quoted 3 lines
But I guess for 2.6 it is reasonable if it only works when apic=es7000 is specified.
Hmm, not keen on that.. don't like it if it means it'll probably fail to start on the ES7000 unless that parameter is specified.
Currently it will fail to start with a normal kernel because it will only work with its subarchitecture compiled in.
Once someone converts it to use the generic architecture it needs some kind of probe hook and then that hook can set es7000_plat. The 2.4 patch just checks for the Unisys OEM table.
-Andi
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 1/1 2.6.0-test4 Fix mpparse properly mark 2
How about this patch? I've opted to put the es7000_fix variable in dmi_scan.c for the moment 'cos there are already another couple of architecture-switching variables defined in there.
Whoever hooks up the es7000 code can move it to a more appropriate place if they don't use DMI for the detection.
arch/i386/kernel/mpparse.c +5 -3
@@ -1128,9 +1128,11 @@if (ioapic <0 )continue ; ioapic_pin = irq - mp_ioapic_routing[ioapic].irq_start; - -if (!ioapic && (irq <16 )) - irq +=16 ; + +if (es7000_plat) { +if (!ioapic && (irq <16 )) + irq +=16 ; + }/* * Avoid pin reprogramming. PRTs typically include entries
arch/i386/kernel/dmi_scan.c +1 -0
@@ -16,6 +16,7 @@int is_sony_vaio_laptop;int is_unsafe_smbus; +int es7000_plat =0 ;struct dmi_header {
arch/i386/mach-es7000/es7000.c +0 -2
@@ -51,8 +51,6 @@int mip_port;unsigned long mip_addr, host_addr; -static int es7000_plat; -/* * Parse the OEM Table */
include/asm-i386/system.h +1 -0
@@ -470,6 +470,7 @@extern unsigned long dmi_broken;extern int is_sony_vaio_laptop; +extern int es7000_plat;#define BROKEN_ACPI_Sx 0x0001#define BROKEN_INIT_AFTER_S1 0x0002
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
A message that is not in the archive (sent off-list or not yet received): 200309091408.00619.adq_dvb-fmPXVN3awWJAJAzL26g0SA@public.gmane.org
Re: [PATCH] 2.6.0-test4 Fix mpparse properly mark 2
Quoted 6 lines · Andrew de Quincey
How about this patch? I've opted to put the
es7000_fixvariable indmi_scan.cfor the moment 'cos there are already another couple of architecture-switching variables defined in there.Whoever hooks up the es7000 code can move it to a more appropriate place if they don't use DMI for the detection.
Looks good.
-Andi
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf