* [patch 1/1] ES7000 platform update (i386)
@ 2005-10-02 23:07 Natalie.Protasevich
2005-10-03 18:38 ` Zwane Mwaikambo
0 siblings, 1 reply; 6+ messages in thread
From: Natalie.Protasevich @ 2005-10-02 23:07 UTC (permalink / raw)
To: akpm; +Cc: ak, linux-kernel, Natalie.Protasevich
This is platform code update for ES7000:
disables IRQ overrides for the recent ES7000 (Rascal/Zorro),
cleans up the compile warning.
The patch only affects the ES7000 subach.
Signed-off-by: <Natalie.Protasevich@unisys.com>
---
arch/i386/mach-es7000/es7000.h | 2 +-
arch/i386/mach-es7000/es7000plat.c | 5 ++++-
include/asm-i386/mach-es7000/mach_mpparse.h | 2 +-
3 files changed, 6 insertions(+), 3 deletions(-)
diff -puN arch/i386/mach-es7000/es7000.h~es7000_plat_update arch/i386/mach-es7000/es7000.h
--- linux-2.6.14-rc2-mm2/arch/i386/mach-es7000/es7000.h~es7000_plat_update 2005-10-02 15:06:09.523620888 -0700
+++ linux-2.6.14-rc2-mm2-root/arch/i386/mach-es7000/es7000.h 2005-10-02 15:10:22.708130992 -0700
@@ -106,6 +106,6 @@ struct mip_reg {
extern int parse_unisys_oem (char *oemptr);
extern int find_unisys_acpi_oem_table(unsigned long *oem_addr);
-extern void setup_unisys ();
+extern void setup_unisys(void);
extern int es7000_start_cpu(int cpu, unsigned long eip);
extern void es7000_sw_apic(void);
diff -puN arch/i386/mach-es7000/es7000plat.c~es7000_plat_update arch/i386/mach-es7000/es7000plat.c
--- linux-2.6.14-rc2-mm2/arch/i386/mach-es7000/es7000plat.c~es7000_plat_update 2005-10-02 15:06:09.558615568 -0700
+++ linux-2.6.14-rc2-mm2-root/arch/i386/mach-es7000/es7000plat.c 2005-10-02 15:11:18.916586008 -0700
@@ -62,6 +62,9 @@ static unsigned int base;
static int
es7000_rename_gsi(int ioapic, int gsi)
{
+ if (es7000_plat == 2)
+ return gsi;
+
if (!base) {
int i;
for (i = 0; i < nr_ioapics; i++)
@@ -76,7 +79,7 @@ es7000_rename_gsi(int ioapic, int gsi)
#endif /* (CONFIG_X86_IO_APIC) && (CONFIG_ACPI) */
void __init
-setup_unisys ()
+setup_unisys(void)
{
/*
* Determine the generation of the ES7000 currently running.
diff -puN include/asm-i386/mach-es7000/mach_mpparse.h~es7000_plat_update include/asm-i386/mach-es7000/mach_mpparse.h
--- linux-2.6.14-rc2-mm2/include/asm-i386/mach-es7000/mach_mpparse.h~es7000_plat_update 2005-10-02 15:06:09.594610096 -0700
+++ linux-2.6.14-rc2-mm2-root/include/asm-i386/mach-es7000/mach_mpparse.h 2005-10-02 15:11:41.029224376 -0700
@@ -16,7 +16,7 @@ static inline void mpc_oem_pci_bus(struc
extern int parse_unisys_oem (char *oemptr);
extern int find_unisys_acpi_oem_table(unsigned long *oem_addr);
-extern void setup_unisys();
+extern void setup_unisys(void);
static inline int mps_oem_check(struct mp_config_table *mpc, char *oem,
char *productid)
_
^ permalink raw reply [flat|nested] 6+ messages in thread* RE: [patch 1/1] ES7000 platform update (i386)
@ 2005-10-03 18:34 Protasevich, Natalie
0 siblings, 0 replies; 6+ messages in thread
From: Protasevich, Natalie @ 2005-10-03 18:34 UTC (permalink / raw)
To: Zwane Mwaikambo; +Cc: akpm, ak, linux-kernel
> From: Zwane Mwaikambo [mailto:zwane@arm.linux.org.uk]
> Sent: Monday, October 03, 2005 12:38 PM
> To: Protasevich, Natalie
> Cc: akpm@osdl.org; ak@suse.de; linux-kernel@vger.kernel.org
> Subject: Re: [patch 1/1] ES7000 platform update (i386)
>
> Hello Natalie,
>
> On Sun, 2 Oct 2005 Natalie.Protasevich@unisys.com wrote:
>
> > @@ -62,6 +62,9 @@ static unsigned int base; static int
> > es7000_rename_gsi(int ioapic, int gsi) {
> > + if (es7000_plat == 2)
> > + return gsi;
>
> Could you #define that number to something so you can
> immediately tell its Rascal/Zorro?
>
> Thanks,
> Zwane
>
Sure, good idea :) I will do that.
Thanks,
--Natalie
^ permalink raw reply [flat|nested] 6+ messages in thread* [patch 1/1] ES7000 platform update (i386)
@ 2005-10-03 0:01 Natalie.Protasevich
2005-10-04 2:28 ` Zwane Mwaikambo
0 siblings, 1 reply; 6+ messages in thread
From: Natalie.Protasevich @ 2005-10-03 0:01 UTC (permalink / raw)
To: akpm; +Cc: zwane, ak, linux-kernel, Natalie.Protasevich
This is platform code update for ES7000:
disables IRQ overrides for the recent ES7000 (Rascal/Zorro),
cleans up the compile warning.
The patch only affects the ES7000 subarch.
Signed-off-by: <Natalie.Protasevich@unisys.com>
---
arch/i386/mach-es7000/es7000.h | 11 ++++++++++-
arch/i386/mach-es7000/es7000plat.c | 11 +++++++----
include/asm-i386/mach-es7000/mach_mpparse.h | 2 +-
3 files changed, 18 insertions(+), 6 deletions(-)
diff -puN arch/i386/mach-es7000/es7000.h~es7000_plat_update arch/i386/mach-es7000/es7000.h
--- linux-2.6.14-rc2-mm2/arch/i386/mach-es7000/es7000.h~es7000_plat_update 2005-10-02 15:06:09.523620888 -0700
+++ linux-2.6.14-rc2-mm2-root/arch/i386/mach-es7000/es7000.h 2005-10-02 16:43:47.857018840 -0700
@@ -24,6 +24,15 @@
* http://www.unisys.com
*/
+/*
+ * ES7000 chipsets
+ */
+
+#define NON_UNISYS 0
+#define ES7000_CLASSIC 1
+#define ES7000_ZORRO 2
+
+
#define MIP_REG 1
#define MIP_PSAI_REG 4
@@ -106,6 +115,6 @@ struct mip_reg {
extern int parse_unisys_oem (char *oemptr);
extern int find_unisys_acpi_oem_table(unsigned long *oem_addr);
-extern void setup_unisys ();
+extern void setup_unisys(void);
extern int es7000_start_cpu(int cpu, unsigned long eip);
extern void es7000_sw_apic(void);
diff -puN arch/i386/mach-es7000/es7000plat.c~es7000_plat_update arch/i386/mach-es7000/es7000plat.c
--- linux-2.6.14-rc2-mm2/arch/i386/mach-es7000/es7000plat.c~es7000_plat_update 2005-10-02 15:06:09.558615568 -0700
+++ linux-2.6.14-rc2-mm2-root/arch/i386/mach-es7000/es7000plat.c 2005-10-02 16:45:32.410124352 -0700
@@ -62,6 +62,9 @@ static unsigned int base;
static int
es7000_rename_gsi(int ioapic, int gsi)
{
+ if (es7000_plat == ES7000_ZORRO)
+ return gsi;
+
if (!base) {
int i;
for (i = 0; i < nr_ioapics; i++)
@@ -76,7 +79,7 @@ es7000_rename_gsi(int ioapic, int gsi)
#endif /* (CONFIG_X86_IO_APIC) && (CONFIG_ACPI) */
void __init
-setup_unisys ()
+setup_unisys(void)
{
/*
* Determine the generation of the ES7000 currently running.
@@ -86,9 +89,9 @@ setup_unisys ()
*
*/
if (!(boot_cpu_data.x86 <= 15 && boot_cpu_data.x86_model <= 2))
- es7000_plat = 2;
+ es7000_plat = ES7000_ZORRO;
else
- es7000_plat = 1;
+ es7000_plat = ES7000_CLASSIC;
ioapic_renumber_irq = es7000_rename_gsi;
}
@@ -151,7 +154,7 @@ parse_unisys_oem (char *oemptr)
}
if (success < 2) {
- es7000_plat = 0;
+ es7000_plat = NON_UNISYS;
} else
setup_unisys();
return es7000_plat;
diff -puN include/asm-i386/mach-es7000/mach_mpparse.h~es7000_plat_update include/asm-i386/mach-es7000/mach_mpparse.h
--- linux-2.6.14-rc2-mm2/include/asm-i386/mach-es7000/mach_mpparse.h~es7000_plat_update 2005-10-02 15:06:09.594610096 -0700
+++ linux-2.6.14-rc2-mm2-root/include/asm-i386/mach-es7000/mach_mpparse.h 2005-10-02 15:11:41.029224376 -0700
@@ -16,7 +16,7 @@ static inline void mpc_oem_pci_bus(struc
extern int parse_unisys_oem (char *oemptr);
extern int find_unisys_acpi_oem_table(unsigned long *oem_addr);
-extern void setup_unisys();
+extern void setup_unisys(void);
static inline int mps_oem_check(struct mp_config_table *mpc, char *oem,
char *productid)
_
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [patch 1/1] ES7000 platform update (i386)
2005-10-03 0:01 Natalie.Protasevich
@ 2005-10-04 2:28 ` Zwane Mwaikambo
0 siblings, 0 replies; 6+ messages in thread
From: Zwane Mwaikambo @ 2005-10-04 2:28 UTC (permalink / raw)
To: Natalie.Protasevich; +Cc: akpm, ak, linux-kernel
On Sun, 2 Oct 2005 Natalie.Protasevich@unisys.com wrote:
>
> This is platform code update for ES7000:
> disables IRQ overrides for the recent ES7000 (Rascal/Zorro),
> cleans up the compile warning.
> The patch only affects the ES7000 subarch.
>
> Signed-off-by: <Natalie.Protasevich@unisys.com>
Thanks Natalie.
Acked-by: Zwane Mwaikambo <zwane@arm.linux.org.uk>
> ---
>
> arch/i386/mach-es7000/es7000.h | 11 ++++++++++-
> arch/i386/mach-es7000/es7000plat.c | 11 +++++++----
> include/asm-i386/mach-es7000/mach_mpparse.h | 2 +-
> 3 files changed, 18 insertions(+), 6 deletions(-)
>
> diff -puN arch/i386/mach-es7000/es7000.h~es7000_plat_update arch/i386/mach-es7000/es7000.h
> --- linux-2.6.14-rc2-mm2/arch/i386/mach-es7000/es7000.h~es7000_plat_update 2005-10-02 15:06:09.523620888 -0700
> +++ linux-2.6.14-rc2-mm2-root/arch/i386/mach-es7000/es7000.h 2005-10-02 16:43:47.857018840 -0700
> @@ -24,6 +24,15 @@
> * http://www.unisys.com
> */
>
> +/*
> + * ES7000 chipsets
> + */
> +
> +#define NON_UNISYS 0
> +#define ES7000_CLASSIC 1
> +#define ES7000_ZORRO 2
> +
> +
> #define MIP_REG 1
> #define MIP_PSAI_REG 4
>
> @@ -106,6 +115,6 @@ struct mip_reg {
>
> extern int parse_unisys_oem (char *oemptr);
> extern int find_unisys_acpi_oem_table(unsigned long *oem_addr);
> -extern void setup_unisys ();
> +extern void setup_unisys(void);
> extern int es7000_start_cpu(int cpu, unsigned long eip);
> extern void es7000_sw_apic(void);
> diff -puN arch/i386/mach-es7000/es7000plat.c~es7000_plat_update arch/i386/mach-es7000/es7000plat.c
> --- linux-2.6.14-rc2-mm2/arch/i386/mach-es7000/es7000plat.c~es7000_plat_update 2005-10-02 15:06:09.558615568 -0700
> +++ linux-2.6.14-rc2-mm2-root/arch/i386/mach-es7000/es7000plat.c 2005-10-02 16:45:32.410124352 -0700
> @@ -62,6 +62,9 @@ static unsigned int base;
> static int
> es7000_rename_gsi(int ioapic, int gsi)
> {
> + if (es7000_plat == ES7000_ZORRO)
> + return gsi;
> +
> if (!base) {
> int i;
> for (i = 0; i < nr_ioapics; i++)
> @@ -76,7 +79,7 @@ es7000_rename_gsi(int ioapic, int gsi)
> #endif /* (CONFIG_X86_IO_APIC) && (CONFIG_ACPI) */
>
> void __init
> -setup_unisys ()
> +setup_unisys(void)
> {
> /*
> * Determine the generation of the ES7000 currently running.
> @@ -86,9 +89,9 @@ setup_unisys ()
> *
> */
> if (!(boot_cpu_data.x86 <= 15 && boot_cpu_data.x86_model <= 2))
> - es7000_plat = 2;
> + es7000_plat = ES7000_ZORRO;
> else
> - es7000_plat = 1;
> + es7000_plat = ES7000_CLASSIC;
> ioapic_renumber_irq = es7000_rename_gsi;
> }
>
> @@ -151,7 +154,7 @@ parse_unisys_oem (char *oemptr)
> }
>
> if (success < 2) {
> - es7000_plat = 0;
> + es7000_plat = NON_UNISYS;
> } else
> setup_unisys();
> return es7000_plat;
> diff -puN include/asm-i386/mach-es7000/mach_mpparse.h~es7000_plat_update include/asm-i386/mach-es7000/mach_mpparse.h
> --- linux-2.6.14-rc2-mm2/include/asm-i386/mach-es7000/mach_mpparse.h~es7000_plat_update 2005-10-02 15:06:09.594610096 -0700
> +++ linux-2.6.14-rc2-mm2-root/include/asm-i386/mach-es7000/mach_mpparse.h 2005-10-02 15:11:41.029224376 -0700
> @@ -16,7 +16,7 @@ static inline void mpc_oem_pci_bus(struc
>
> extern int parse_unisys_oem (char *oemptr);
> extern int find_unisys_acpi_oem_table(unsigned long *oem_addr);
> -extern void setup_unisys();
> +extern void setup_unisys(void);
>
> static inline int mps_oem_check(struct mp_config_table *mpc, char *oem,
> char *productid)
> _
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [patch 1/1] ES7000 platform update (i386)
@ 2005-08-24 11:00 Natalie.Protasevich
0 siblings, 0 replies; 6+ messages in thread
From: Natalie.Protasevich @ 2005-08-24 11:00 UTC (permalink / raw)
To: akpm; +Cc: ak, linux-kernel, Natalie.Protasevich
This is subarch update for ES7000. I've modified platform check code and
removed unnecessary OEM table parsing for newer systems that don't use
OEM information during boot. Parsing the table in fact is causing problems,
and the platform doesn't get recognized.
The patch only affects the ES7000 subach.
Signed-off-by: <Natalie.Protasevich@unisys.com>
---
arch/i386/mach-es7000/es7000.h | 5 +--
arch/i386/mach-es7000/es7000plat.c | 45 +++++++++++++---------------
include/asm-i386/mach-es7000/mach_mpparse.h | 30 ++++++++++++++----
3 files changed, 49 insertions(+), 31 deletions(-)
diff -puN arch/i386/mach-es7000/es7000.h~es7000_plat_update arch/i386/mach-es7000/es7000.h
--- linux-2.6.13-rc6/arch/i386/mach-es7000/es7000.h~es7000_plat_update 2005-08-23 21:01:22.621684672 -0700
+++ linux-2.6.13-rc6-root/arch/i386/mach-es7000/es7000.h 2005-08-23 23:49:47.225551392 -0700
@@ -104,7 +104,8 @@ struct mip_reg {
#define MIP_SW_APIC 0x1020b
#define MIP_FUNC(VALUE) (VALUE & 0xff)
-extern int parse_unisys_oem (char *oemptr, int oem_entries);
-extern int find_unisys_acpi_oem_table(unsigned long *oem_addr, int *length);
+extern int parse_unisys_oem (char *oemptr);
+extern int find_unisys_acpi_oem_table(unsigned long *oem_addr);
+extern void setup_unisys ();
extern int es7000_start_cpu(int cpu, unsigned long eip);
extern void es7000_sw_apic(void);
diff -puN arch/i386/mach-es7000/es7000plat.c~es7000_plat_update arch/i386/mach-es7000/es7000plat.c
--- linux-2.6.13-rc6/arch/i386/mach-es7000/es7000plat.c~es7000_plat_update 2005-08-23 21:01:22.656679352 -0700
+++ linux-2.6.13-rc6-root/arch/i386/mach-es7000/es7000plat.c 2005-08-23 21:04:15.662378488 -0700
@@ -75,12 +75,29 @@ es7000_rename_gsi(int ioapic, int gsi)
#endif // (CONFIG_X86_IO_APIC) && (CONFIG_ACPI_INTERPRETER || CONFIG_ACPI_BOOT)
+void __init
+setup_unisys ()
+{
+ /*
+ * Determine the generation of the ES7000 currently running.
+ *
+ * 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;
+}
+
/*
* Parse the OEM Table
*/
int __init
-parse_unisys_oem (char *oemptr, int oem_entries)
+parse_unisys_oem (char *oemptr)
{
int i;
int success = 0;
@@ -95,7 +112,7 @@ parse_unisys_oem (char *oemptr, int oem_
tp += 8;
- for (i=0; i <= oem_entries; i++) {
+ for (i=0; i <= 6; i++) {
type = *tp++;
size = *tp++;
tp -= 2;
@@ -130,34 +147,18 @@ parse_unisys_oem (char *oemptr, int oem_
default:
break;
}
- if (i == 6) break;
tp += size;
}
if (success < 2) {
es7000_plat = 0;
- } else {
- printk("\nEnabling ES7000 specific features...\n");
- /*
- * 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;
- }
+ } else
+ setup_unisys();
return es7000_plat;
}
int __init
-find_unisys_acpi_oem_table(unsigned long *oem_addr, int *length)
+find_unisys_acpi_oem_table(unsigned long *oem_addr)
{
struct acpi_table_rsdp *rsdp = NULL;
unsigned long rsdp_phys = 0;
@@ -201,13 +202,11 @@ find_unisys_acpi_oem_table(unsigned long
acpi_table_print(header, sdt.entry[i].pa);
t = (struct oem_table *) __acpi_map_table(sdt.entry[i].pa, header->length);
addr = (void *) __acpi_map_table(t->OEMTableAddr, t->OEMTableSize);
- *length = header->length;
*oem_addr = (unsigned long) addr;
return 0;
}
}
}
- Dprintk("ES7000: did not find Unisys ACPI OEM table!\n");
return -1;
}
diff -puN include/asm-i386/mach-es7000/mach_mpparse.h~es7000_plat_update include/asm-i386/mach-es7000/mach_mpparse.h
--- linux-2.6.13-rc6/include/asm-i386/mach-es7000/mach_mpparse.h~es7000_plat_update 2005-08-23 21:01:22.692673880 -0700
+++ linux-2.6.13-rc6-root/include/asm-i386/mach-es7000/mach_mpparse.h 2005-08-23 23:50:06.168671600 -0700
@@ -1,6 +1,8 @@
#ifndef __ASM_MACH_MPPARSE_H
#define __ASM_MACH_MPPARSE_H
+#include <linux/acpi.h>
+
static inline void mpc_oem_bus_info(struct mpc_config_bus *m, char *name,
struct mpc_config_translation *translation)
{
@@ -12,8 +14,9 @@ static inline void mpc_oem_pci_bus(struc
{
}
-extern int parse_unisys_oem (char *oemptr, int oem_entries);
-extern int find_unisys_acpi_oem_table(unsigned long *oem_addr, int *length);
+extern int parse_unisys_oem (char *oemptr);
+extern int find_unisys_acpi_oem_table(unsigned long *oem_addr);
+extern void setup_unisys();
static inline int mps_oem_check(struct mp_config_table *mpc, char *oem,
char *productid)
@@ -22,18 +25,33 @@ static inline int mps_oem_check(struct m
struct mp_config_oemtable *oem_table =
(struct mp_config_oemtable *)mpc->mpc_oemptr;
if (!strncmp(oem, "UNISYS", 6))
- return parse_unisys_oem((char *)oem_table, oem_table->oem_length);
+ return parse_unisys_oem((char *)oem_table);
}
return 0;
}
+static inline int es7000_check_dsdt()
+{
+ struct acpi_table_header *header = NULL;
+ if(!acpi_get_table_header_early(ACPI_DSDT, &header))
+ acpi_table_print(header, 0);
+ if (!strncmp(header->oem_id, "UNISYS", 6))
+ return 1;
+ return 0;
+}
+
/* Hook from generic ACPI tables.c */
static inline int acpi_madt_oem_check(char *oem_id, char *oem_table_id)
{
unsigned long oem_addr;
- int oem_entries;
- if (!find_unisys_acpi_oem_table(&oem_addr, &oem_entries))
- return parse_unisys_oem((char *)oem_addr, oem_entries);
+ if (!find_unisys_acpi_oem_table(&oem_addr)) {
+ if (es7000_check_dsdt())
+ return parse_unisys_oem((char *)oem_addr);
+ else {
+ setup_unisys();
+ return 1;
+ }
+ }
return 0;
}
_
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2005-10-04 2:22 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-02 23:07 [patch 1/1] ES7000 platform update (i386) Natalie.Protasevich
2005-10-03 18:38 ` Zwane Mwaikambo
-- strict thread matches above, loose matches on Subject: below --
2005-10-03 18:34 Protasevich, Natalie
2005-10-03 0:01 Natalie.Protasevich
2005-10-04 2:28 ` Zwane Mwaikambo
2005-08-24 11:00 Natalie.Protasevich
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox