* [PATCH] ES7000 Legacy Mappings Update
@ 2005-03-14 18:35 Jason Davis
2005-03-15 2:05 ` Andrew Morton
0 siblings, 1 reply; 6+ messages in thread
From: Jason Davis @ 2005-03-14 18:35 UTC (permalink / raw)
To: linux-kernel; +Cc: Andrew Morton, Natalie Protasevich, Jason Davis
Hi -
This update only affects Unisys' ES7000 machines. The patch reflects a change needed to determine which generation of ES7000 is currently running. The next generation of ES7000s will have conventional legacy support so the patch accommodates for this. This patch has been tested and verified on both an authentic 5xx ES7000 box and the next generation ES7000 box.
Thanks,
Jason Davis
diff -Naurp linux-2.6.11.3/arch/i386/kernel/mpparse.c linux-2.6.11.3-legacy/arch/i386/kernel/mpparse.c
--- linux-2.6.11.3/arch/i386/kernel/mpparse.c 2005-03-13 01:44:19.000000000 -0500
+++ linux-2.6.11.3-legacy/arch/i386/kernel/mpparse.c 2005-03-14 11:52:44.000000000 -0500
@@ -996,9 +996,9 @@ void __init mp_config_acpi_legacy_irqs (
Dprintk("Bus #%d is ISA\n", MP_ISA_BUS);
/*
- * ES7000 has no legacy identity mappings
+ * Older generations of ES7000 have no legacy identity mappings
*/
- if (es7000_plat)
+ if (es7000_plat && es7000_plat < 2)
return;
/*
diff -Naurp linux-2.6.11.3/arch/i386/mach-es7000/es7000plat.c linux-2.6.11.3-legacy/arch/i386/mach-es7000/es7000plat.c
--- linux-2.6.11.3/arch/i386/mach-es7000/es7000plat.c 2005-03-13 01:44:41.000000000 -0500
+++ linux-2.6.11.3-legacy/arch/i386/mach-es7000/es7000plat.c 2005-03-14 11:52:44.000000000 -0500
@@ -138,7 +138,14 @@ parse_unisys_oem (char *oemptr, int oem_
es7000_plat = 0;
} else {
printk("\nEnabling ES7000 specific features...\n");
- es7000_plat = 1;
+ /*
+ * Check to see if this is a x86_64 ES7000 machine.
+ */
+ if (!(boot_cpu_data.x86 <= 15 && boot_cpu_data.x86_model <= 2))
+ es7000_plat = 2;
+ else
+ es7000_plat = 1;
+
ioapic_renumber_irq = es7000_rename_gsi;
}
return es7000_plat;
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] ES7000 Legacy Mappings Update
2005-03-14 18:35 [PATCH] ES7000 Legacy Mappings Update Jason Davis
@ 2005-03-15 2:05 ` Andrew Morton
2005-03-15 6:40 ` Andrey Panin
2005-03-15 15:27 ` Jason Davis
0 siblings, 2 replies; 6+ messages in thread
From: Andrew Morton @ 2005-03-15 2:05 UTC (permalink / raw)
To: Jason Davis; +Cc: linux-kernel, natalie.protasevich, jason.davis
You triggered my trivia twitch.
Jason Davis <jason@rightthere.net> wrote:
>
> - * ES7000 has no legacy identity mappings
> + * Older generations of ES7000 have no legacy identity mappings
> */
> - if (es7000_plat)
> + if (es7000_plat && es7000_plat < 2)
> return;
Why not
if (es7000_plat == 1)
?
> /*
> diff -Naurp linux-2.6.11.3/arch/i386/mach-es7000/es7000plat.c linux-2.6.11.3-legacy/arch/i386/mach-es7000/es7000plat.c
> --- linux-2.6.11.3/arch/i386/mach-es7000/es7000plat.c 2005-03-13 01:44:41.000000000 -0500
> +++ linux-2.6.11.3-legacy/arch/i386/mach-es7000/es7000plat.c 2005-03-14 11:52:44.000000000 -0500
> @@ -138,7 +138,14 @@ parse_unisys_oem (char *oemptr, int oem_
> es7000_plat = 0;
> } else {
> printk("\nEnabling ES7000 specific features...\n");
> - es7000_plat = 1;
> + /*
> + * Check to see if this is a x86_64 ES7000 machine.
> + */
> + if (!(boot_cpu_data.x86 <= 15 && boot_cpu_data.x86_model <= 2))
> + es7000_plat = 2;
> + else
> + es7000_plat = 1;
> +
Perhaps some nice enumerated identifiers here, rather than magic numbers?
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] ES7000 Legacy Mappings Update
2005-03-15 2:05 ` Andrew Morton
@ 2005-03-15 6:40 ` Andrey Panin
2005-03-15 15:27 ` Jason Davis
1 sibling, 0 replies; 6+ messages in thread
From: Andrey Panin @ 2005-03-15 6:40 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-kernel, natalie.protasevich, jason.davis
[-- Attachment #1: Type: text/plain, Size: 1436 bytes --]
On 073, 03 14, 2005 at 06:05:54PM -0800, Andrew Morton wrote:
>
> You triggered my trivia twitch.
>
> Jason Davis <jason@rightthere.net> wrote:
> >
> > - * ES7000 has no legacy identity mappings
> > + * Older generations of ES7000 have no legacy identity mappings
> > */
> > - if (es7000_plat)
> > + if (es7000_plat && es7000_plat < 2)
> > return;
>
> Why not
>
> if (es7000_plat == 1)
>
> ?
>
> > /*
> > diff -Naurp linux-2.6.11.3/arch/i386/mach-es7000/es7000plat.c linux-2.6.11.3-legacy/arch/i386/mach-es7000/es7000plat.c
> > --- linux-2.6.11.3/arch/i386/mach-es7000/es7000plat.c 2005-03-13 01:44:41.000000000 -0500
> > +++ linux-2.6.11.3-legacy/arch/i386/mach-es7000/es7000plat.c 2005-03-14 11:52:44.000000000 -0500
> > @@ -138,7 +138,14 @@ parse_unisys_oem (char *oemptr, int oem_
> > es7000_plat = 0;
> > } else {
> > printk("\nEnabling ES7000 specific features...\n");
> > - es7000_plat = 1;
> > + /*
> > + * Check to see if this is a x86_64 ES7000 machine.
> > + */
> > + if (!(boot_cpu_data.x86 <= 15 && boot_cpu_data.x86_model <= 2))
> > + es7000_plat = 2;
> > + else
> > + es7000_plat = 1;
> > +
>
> Perhaps some nice enumerated identifiers here, rather than magic numbers?
While you are looking at this code can you take a look at the attached
trivial patch ?
--
Andrey Panin | Linux and UNIX system administrator
pazke@donpac.ru | PGP key: wwwkeys.pgp.net
[-- Attachment #2: patch-dmi-2-es7000 --]
[-- Type: text/plain, Size: 1069 bytes --]
This patch moves es7000_plat global variable out of DMI code.
Signed-off-by: Andrey Panin <pazke@donpac.ru>
arch/i386/kernel/dmi_scan.c | 2 --
arch/i386/kernel/mpparse.c | 1 +
2 files changed, 1 insertion(+), 2 deletions(-)
diff -urdpNX /usr/share/dontdiff linux-2.6.11.vanilla/arch/i386/kernel/dmi_scan.c linux-2.6.11/arch/i386/kernel/dmi_scan.c
--- linux-2.6.11.vanilla/arch/i386/kernel/dmi_scan.c 2005-03-08 18:02:00.000000000 +0300
+++ linux-2.6.11/arch/i386/kernel/dmi_scan.c 2005-03-08 18:04:38.000000000 +0300
@@ -12,8 +12,6 @@
#include <linux/bootmem.h>
-int es7000_plat = 0;
-
struct dmi_header
{
u8 type;
diff -urdpNX /usr/share/dontdiff linux-2.6.11.vanilla/arch/i386/kernel/mpparse.c linux-2.6.11/arch/i386/kernel/mpparse.c
--- linux-2.6.11.vanilla/arch/i386/kernel/mpparse.c 2005-03-02 10:37:53.000000000 +0300
+++ linux-2.6.11/arch/i386/kernel/mpparse.c 2005-03-08 18:05:28.000000000 +0300
@@ -982,6 +982,7 @@ void __init mp_override_legacy_irq (
return;
}
+int es7000_plat;
void __init mp_config_acpi_legacy_irqs (void)
{
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] ES7000 Legacy Mappings Update
2005-03-15 2:05 ` Andrew Morton
2005-03-15 6:40 ` Andrey Panin
@ 2005-03-15 15:27 ` Jason Davis
2005-03-15 19:37 ` Andrew Morton
1 sibling, 1 reply; 6+ messages in thread
From: Jason Davis @ 2005-03-15 15:27 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-kernel, natalie.protasevich, jason.davis
See below.
On Mon, 14 Mar 2005, Andrew Morton wrote:
>
>You triggered my trivia twitch.
>
>Jason Davis <jason@rightthere.net> wrote:
>>
>> - * ES7000 has no legacy identity mappings
>> + * Older generations of ES7000 have no legacy identity mappings
>> */
>> - if (es7000_plat)
>> + if (es7000_plat && es7000_plat < 2)
>> return;
>
>Why not
>
> if (es7000_plat == 1)
>
>?
>
Looks like I never learned to apply the concept of reducing fractions :). Thanks for catching this.
>> /*
>> diff -Naurp linux-2.6.11.3/arch/i386/mach-es7000/es7000plat.c linux-2.6.11.3-legacy/arch/i386/mach-es7000/es7000plat.c
>> --- linux-2.6.11.3/arch/i386/mach-es7000/es7000plat.c 2005-03-13 01:44:41.000000000 -0500
>> +++ linux-2.6.11.3-legacy/arch/i386/mach-es7000/es7000plat.c 2005-03-14 11:52:44.000000000 -0500
>> @@ -138,7 +138,14 @@ parse_unisys_oem (char *oemptr, int oem_
>> es7000_plat = 0;
>> } else {
>> printk("\nEnabling ES7000 specific features...\n");
>> - es7000_plat = 1;
>> + /*
>> + * Check to see if this is a x86_64 ES7000 machine.
>> + */
>> + if (!(boot_cpu_data.x86 <= 15 && boot_cpu_data.x86_model <= 2))
>> + es7000_plat = 2;
>> + else
>> + es7000_plat = 1;
>> +
>
>Perhaps some nice enumerated identifiers here, rather than magic numbers?
Initially, I was going to take this approach but that would require some specific platform defines to be thrown into a global header file (mpparse.c would need to see them as well). I didn't think it would be appropriate to mix code like that. I'll be glad to revise the patch to include enumerated identifiers but would it be more acceptable to comment on the semantics of the es7000_plat var in the platform specific "es7000plat.c" file?
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] ES7000 Legacy Mappings Update
2005-03-15 15:27 ` Jason Davis
@ 2005-03-15 19:37 ` Andrew Morton
2005-03-18 17:20 ` Jason Davis
0 siblings, 1 reply; 6+ messages in thread
From: Andrew Morton @ 2005-03-15 19:37 UTC (permalink / raw)
To: Jason Davis; +Cc: linux-kernel, natalie.protasevich, jason.davis
Jason Davis <jason@rightthere.net> wrote:
>
> I'll be glad to revise the patch to include enumerated identifiers but would it be more acceptable to comment on the semantics of the es7000_plat var in the platform specific "es7000plat.c" file?
I suppose that would suit. It's not a huge issue..
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] ES7000 Legacy Mappings Update
2005-03-15 19:37 ` Andrew Morton
@ 2005-03-18 17:20 ` Jason Davis
0 siblings, 0 replies; 6+ messages in thread
From: Jason Davis @ 2005-03-18 17:20 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-kernel, natalie.protasevich, jason.davis
Below is an update to the ES7000 Legacy Mappings patch.
---------------------------------------------------------------------
This update only affects Unisys' ES7000 machines. The patch reflects a change needed to determine which generation of ES7000 is currently running. The next generation of ES7000s will have conventional legacy support so the patch accommodates for this. This patch has been tested and verified on both an authentic 5xx ES7000 box and the next generation ES7000 box.
Signed-off-by: Natalie Protasevich <natalie.protasevich@unisys.com>
Signed-off-by: Jason Davis <jason.davis@unisys.com>
diff -Nuarp linux-2.6.11.3/arch/i386/kernel/mpparse.c linux-2.6.11.3-legacy/arch/i386/kernel/mpparse.c
--- linux-2.6.11.3/arch/i386/kernel/mpparse.c 2005-03-13 01:44:19.000000000 -0500
+++ linux-2.6.11.3-legacy/arch/i386/kernel/mpparse.c 2005-03-18 11:19:10.000000000 -0500
@@ -996,9 +996,9 @@ void __init mp_config_acpi_legacy_irqs (
Dprintk("Bus #%d is ISA\n", MP_ISA_BUS);
/*
- * ES7000 has no legacy identity mappings
+ * Older generations of ES7000 have no legacy identity mappings
*/
- if (es7000_plat)
+ if (es7000_plat == 1)
return;
/*
diff -Nuarp linux-2.6.11.3/arch/i386/mach-es7000/es7000plat.c linux-2.6.11.3-legacy/arch/i386/mach-es7000/es7000plat.c
--- linux-2.6.11.3/arch/i386/mach-es7000/es7000plat.c 2005-03-13 01:44:41.000000000 -0500
+++ linux-2.6.11.3-legacy/arch/i386/mach-es7000/es7000plat.c 2005-03-18 11:00:03.000000000 -0500
@@ -138,7 +138,19 @@ parse_unisys_oem (char *oemptr, int oem_
es7000_plat = 0;
} else {
printk("\nEnabling ES7000 specific features...\n");
- es7000_plat = 1;
+ /*
+ * Determine the generation of the ES7000 currently running.
+ *
+ * es7000_plat = 0 if the machine is NOT a Unisys ES7000 box
+ * es7000_plat = 1 if the machine is a 5xx ES7000 box
+ * es7000_plat = 2 if the machine is a x86_64 ES7000 box
+ *
+ */
+ if (!(boot_cpu_data.x86 <= 15 && boot_cpu_data.x86_model <= 2))
+ es7000_plat = 2;
+ else
+ es7000_plat = 1;
+
ioapic_renumber_irq = es7000_rename_gsi;
}
return es7000_plat;
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2005-03-18 17:21 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-14 18:35 [PATCH] ES7000 Legacy Mappings Update Jason Davis
2005-03-15 2:05 ` Andrew Morton
2005-03-15 6:40 ` Andrey Panin
2005-03-15 15:27 ` Jason Davis
2005-03-15 19:37 ` Andrew Morton
2005-03-18 17:20 ` Jason Davis
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.