public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] 2.6.0-test4 Fix mpparse properly
@ 2003-09-07 20:30 Andrew de Quincey
       [not found] ` <200309072130.40200.adq_dvb-fmPXVN3awWJAJAzL26g0SA@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: Andrew de Quincey @ 2003-09-07 20:30 UTC (permalink / raw)
  To: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
  Cc: linux-acpi-ral2JQCrhuEAvxtiuMwx3w

According to Alan Cox, the so-called erroneous code in mpparse.c should be there, but only for 
ES7000 platforms.


--- linux-2.6.0-test4.null_crs/arch/i386/kernel/mpparse.c	2003-09-06 00:23:10.000000000 +0100
+++ linux-2.6.0-test4.es7000fix/arch/i386/kernel/mpparse.c	2003-09-07 15:53:41.369717552 +0100
@@ -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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] 2.6.0-test4 Fix mpparse properly
       [not found] ` <200309072130.40200.adq_dvb-fmPXVN3awWJAJAzL26g0SA@public.gmane.org>
@ 2003-09-08  2:25   ` Andi Kleen
       [not found]     ` <20030908042548.3bbfcf7d.ak-l3A5Bk7waGM@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: Andi Kleen @ 2003-09-08  2:25 UTC (permalink / raw)
  To: Andrew de Quincey
  Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
	linux-acpi-ral2JQCrhuEAvxtiuMwx3w

On Sun, 7 Sep 2003 21:30:40 +0100
Andrew de Quincey <adq_dvb-fmPXVN3awWJAJAzL26g0SA@public.gmane.org> wrote:


> 
> --- linux-2.6.0-test4.null_crs/arch/i386/kernel/mpparse.c	2003-09-06 00:23:10.000000000 +0100
> +++ linux-2.6.0-test4.es7000fix/arch/i386/kernel/mpparse.c	2003-09-07 15:53:41.369717552 +0100
> @@ -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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] 2.6.0-test4 Fix mpparse properly
       [not found]     ` <20030908042548.3bbfcf7d.ak-l3A5Bk7waGM@public.gmane.org>
@ 2003-09-08 10:02       ` Andrew de Quincey
       [not found]         ` <20030908144934.GE5826@wotan.suse.de>
  0 siblings, 1 reply; 7+ messages in thread
From: Andrew de Quincey @ 2003-09-08 10:02 UTC (permalink / raw)
  To: Andi Kleen
  Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
	linux-acpi-ral2JQCrhuEAvxtiuMwx3w

On Monday 08 Sep 2003 3:25 am, Andi Kleen wrote:
> On Sun, 7 Sep 2003 21:30:40 +0100
>
> Andrew de Quincey <adq_dvb-fmPXVN3awWJAJAzL26g0SA@public.gmane.org> wrote:
> > --- linux-2.6.0-test4.null_crs/arch/i386/kernel/mpparse.c	2003-09-06
> > 00:23:10.000000000 +0100 +++
> > linux-2.6.0-test4.es7000fix/arch/i386/kernel/mpparse.c	2003-09-07
> > 15:53:41.369717552 +0100 @@ -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).

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] 2.6.0-test4 Fix mpparse properly
       [not found]           ` <20030908144934.GE5826-B4tOwbsTzaBolqkO4TVVkw@public.gmane.org>
@ 2003-09-08 15:07             ` Andrew de Quincey
       [not found]               ` <200309081607.59047.adq_dvb-fmPXVN3awWJAJAzL26g0SA@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: Andrew de Quincey @ 2003-09-08 15:07 UTC (permalink / raw)
  To: Andi Kleen
  Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
	linux-acpi-ral2JQCrhuEAvxtiuMwx3w

On Monday 08 Sep 2003 3:49 pm, Andi Kleen wrote:
> On Mon, Sep 08, 2003 at 11:02:46AM +0100, Andrew de Quincey wrote:
> > On Monday 08 Sep 2003 3:25 am, Andi Kleen wrote:
> > > On Sun, 7 Sep 2003 21:30:40 +0100
> > >
> > > Andrew de Quincey <adq_dvb-fmPXVN3awWJAJAzL26g0SA@public.gmane.org> wrote:
> > > > --- linux-2.6.0-test4.null_crs/arch/i386/kernel/mpparse.c	2003-09-06
> > > > 00:23:10.000000000 +0100 +++
> > > > linux-2.6.0-test4.es7000fix/arch/i386/kernel/mpparse.c	2003-09-07
> > > > 15:53:41.369717552 +0100 @@ -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).
> >
> > 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?
>
> 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.

> 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.

> 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_plat is 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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] 2.6.0-test4 Fix mpparse properly
       [not found]               ` <200309081607.59047.adq_dvb-fmPXVN3awWJAJAzL26g0SA@public.gmane.org>
@ 2003-09-08 15:29                 ` Andi Kleen
       [not found]                   ` <20030908152926.GH5826-B4tOwbsTzaBolqkO4TVVkw@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: Andi Kleen @ 2003-09-08 15:29 UTC (permalink / raw)
  To: Andrew de Quincey
  Cc: Andi Kleen, acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
	linux-acpi-ral2JQCrhuEAvxtiuMwx3w

> 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

> 
> > 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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH] 2.6.0-test4 Fix mpparse properly mark 2
       [not found]                   ` <20030908152926.GH5826-B4tOwbsTzaBolqkO4TVVkw@public.gmane.org>
@ 2003-09-09 13:08                     ` Andrew de Quincey
       [not found]                       ` <200309091408.00619.adq_dvb-fmPXVN3awWJAJAzL26g0SA@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: Andrew de Quincey @ 2003-09-09 13:08 UTC (permalink / raw)
  To: Andi Kleen
  Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
	linux-acpi-ral2JQCrhuEAvxtiuMwx3w

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.



--- linux-2.6.0-test4.null_crs/arch/i386/kernel/mpparse.c	2003-09-06 00:23:10.000000000 +0100
+++ linux-2.6.0-test4.es7000fix/arch/i386/kernel/mpparse.c	2003-09-09 13:58:00.839472992 +0100
@@ -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  
--- linux-2.6.0-test4.null_crs/arch/i386/kernel/dmi_scan.c	2003-08-23 00:54:24.000000000 +0100
+++ linux-2.6.0-test4.es7000fix/arch/i386/kernel/dmi_scan.c	2003-09-09 13:57:22.180350072 +0100
@@ -16,6 +16,7 @@
 
 int is_sony_vaio_laptop;
 int is_unsafe_smbus;
+int es7000_plat = 0;
 
 struct dmi_header
 {
--- linux-2.6.0-test4.null_crs/arch/i386/mach-es7000/es7000.c	2003-08-23 01:00:14.000000000 +0100
+++ linux-2.6.0-test4.es7000fix/arch/i386/mach-es7000/es7000.c	2003-09-09 14:08:00.095372248 +0100
@@ -51,8 +51,6 @@
 int 			mip_port;
 unsigned long		mip_addr, host_addr;
 
-static int		es7000_plat;
-
 /*
  * Parse the OEM Table
  */
--- linux-2.6.0-test4.null_crs/include/asm-i386/system.h	2003-08-23 00:50:53.000000000 +0100
+++ linux-2.6.0-test4.es7000fix/include/asm-i386/system.h	2003-09-09 13:58:29.508114696 +0100
@@ -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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] 2.6.0-test4 Fix mpparse properly mark 2
       [not found]                       ` <200309091408.00619.adq_dvb-fmPXVN3awWJAJAzL26g0SA@public.gmane.org>
@ 2003-09-09 13:42                         ` Andi Kleen
  0 siblings, 0 replies; 7+ messages in thread
From: Andi Kleen @ 2003-09-09 13:42 UTC (permalink / raw)
  To: Andrew de Quincey
  Cc: Andi Kleen, acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
	linux-acpi-ral2JQCrhuEAvxtiuMwx3w

On Tue, Sep 09, 2003 at 02:08:00PM +0100, Andrew de Quincey wrote:
> 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.

Looks good.

-Andi



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2003-09-09 13:42 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-09-07 20:30 [PATCH] 2.6.0-test4 Fix mpparse properly Andrew de Quincey
     [not found] ` <200309072130.40200.adq_dvb-fmPXVN3awWJAJAzL26g0SA@public.gmane.org>
2003-09-08  2:25   ` Andi Kleen
     [not found]     ` <20030908042548.3bbfcf7d.ak-l3A5Bk7waGM@public.gmane.org>
2003-09-08 10:02       ` Andrew de Quincey
     [not found]         ` <20030908144934.GE5826@wotan.suse.de>
     [not found]           ` <20030908144934.GE5826-B4tOwbsTzaBolqkO4TVVkw@public.gmane.org>
2003-09-08 15:07             ` Andrew de Quincey
     [not found]               ` <200309081607.59047.adq_dvb-fmPXVN3awWJAJAzL26g0SA@public.gmane.org>
2003-09-08 15:29                 ` Andi Kleen
     [not found]                   ` <20030908152926.GH5826-B4tOwbsTzaBolqkO4TVVkw@public.gmane.org>
2003-09-09 13:08                     ` [PATCH] 2.6.0-test4 Fix mpparse properly mark 2 Andrew de Quincey
     [not found]                       ` <200309091408.00619.adq_dvb-fmPXVN3awWJAJAzL26g0SA@public.gmane.org>
2003-09-09 13:42                         ` Andi Kleen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox