[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] es7000: Remove the bulk of the ES7000 specific code from Xen.



# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Date 1186128269 -3600
# Node ID a451b0ab40d9679d9b81b868f909f9e459961fec
# Parent  9f939ff527ee9b1172e8cc904dc9f79e7ee31594
es7000: Remove the bulk of the ES7000 specific code from Xen.

On the Unisys ES7000-One, Xen now uses the bigsmp APIC driver. This patch
has been tested on the ES7000 and a commodity box.

Signed-off-by: Raj Subrahmanian <raj.subrahmanian@xxxxxxxxxx>
---
 xen/arch/x86/genapic/es7000.c                  |   27 ----
 xen/arch/x86/genapic/es7000plat.c              |  141 -------------------------
 xen/include/asm-x86/mach-es7000/mach_mpparse.h |   45 -------
 xen/arch/x86/genapic/Makefile                  |    2 
 xen/arch/x86/genapic/bigsmp.c                  |   10 +
 xen/arch/x86/genapic/probe.c                   |    2 
 6 files changed, 7 insertions(+), 220 deletions(-)

diff -r 9f939ff527ee -r a451b0ab40d9 xen/arch/x86/genapic/Makefile
--- a/xen/arch/x86/genapic/Makefile     Thu Aug 02 16:03:35 2007 +0100
+++ b/xen/arch/x86/genapic/Makefile     Fri Aug 03 09:04:29 2007 +0100
@@ -1,7 +1,5 @@ obj-y += bigsmp.o
 obj-y += bigsmp.o
 obj-y += default.o
 obj-y += delivery.o
-obj-y += es7000.o
-obj-y += es7000plat.o
 obj-y += probe.o
 obj-y += summit.o
diff -r 9f939ff527ee -r a451b0ab40d9 xen/arch/x86/genapic/bigsmp.c
--- a/xen/arch/x86/genapic/bigsmp.c     Thu Aug 02 16:03:35 2007 +0100
+++ b/xen/arch/x86/genapic/bigsmp.c     Fri Aug 03 09:04:29 2007 +0100
@@ -13,7 +13,7 @@
 
 static int dmi_bigsmp; /* can be set by dmi scanners */
 
-static __init int hp_ht_bigsmp(struct dmi_system_id *d)
+static __init int force_bigsmp(struct dmi_system_id *d)
 {
        printk(KERN_NOTICE "%s detected: force use of apic=bigsmp\n", d->ident);
        dmi_bigsmp = 1;
@@ -22,15 +22,19 @@ static __init int hp_ht_bigsmp(struct dm
 
 
 static struct dmi_system_id __initdata bigsmp_dmi_table[] = {
-       { hp_ht_bigsmp, "HP ProLiant DL760 G2", {
+       { force_bigsmp, "HP ProLiant DL760 G2", {
                DMI_MATCH(DMI_BIOS_VENDOR, "HP"),
                DMI_MATCH(DMI_BIOS_VERSION, "P44-"),
        }},
 
-       { hp_ht_bigsmp, "HP ProLiant DL740", {
+       { force_bigsmp, "HP ProLiant DL740", {
                DMI_MATCH(DMI_BIOS_VENDOR, "HP"),
                DMI_MATCH(DMI_BIOS_VERSION, "P47-"),
         }},
+       { force_bigsmp, "UNISYS ES7000-ONE", {
+               DMI_MATCH(DMI_PRODUCT_NAME, "ES7000-ONE")
+        }},
+       
         { }
 };
 
diff -r 9f939ff527ee -r a451b0ab40d9 xen/arch/x86/genapic/es7000.c
--- a/xen/arch/x86/genapic/es7000.c     Thu Aug 02 16:03:35 2007 +0100
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-/*
- * APIC driver for the Unisys ES7000 chipset.
- */
-#include <xen/config.h>
-#include <xen/cpumask.h>
-#include <asm/current.h>
-#include <asm/mpspec.h>
-#include <asm/genapic.h>
-#include <asm/fixmap.h>
-#include <asm/apicdef.h>
-#include <asm/atomic.h>
-#include <xen/kernel.h>
-#include <xen/string.h>
-#include <xen/smp.h>
-#include <xen/init.h>
-#include <asm/mach-es7000/mach_mpparse.h>
-
-static __init int probe_es7000(void)
-{
-       /* probed later in mptable/ACPI hooks */
-       return 0;
-}
-
-struct genapic apic_es7000 = {
-       APIC_INIT("es7000", probe_es7000),
-       GENAPIC_PHYS
-};
diff -r 9f939ff527ee -r a451b0ab40d9 xen/arch/x86/genapic/es7000plat.c
--- a/xen/arch/x86/genapic/es7000plat.c Thu Aug 02 16:03:35 2007 +0100
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,141 +0,0 @@
-/*
- * Written by: Garry Forsgren, Unisys Corporation
- *             Natalie Protasevich, Unisys Corporation
- * Modified by: Raj Subrahmanian <raj.subrahmanian@xxxxxxxxxx> Unisys Corp.
- * This file contains the code to configure and interface
- * with Unisys ES7000 series hardware system manager.
- *
- * Copyright (c) 2003 Unisys Corporation.  All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Unisys Corporation, Township Line & Union Meeting
- * Roads-A, Unisys Way, Blue Bell, Pennsylvania, 19424, or:
- *
- * http://www.unisys.com
- */
-
-#include <xen/config.h>
-#include <xen/types.h>
-#include <xen/kernel.h>
-#include <xen/smp.h>
-#include <xen/string.h>
-#include <xen/spinlock.h>
-#include <xen/errno.h>
-#include <xen/init.h>
-#include <xen/acpi.h>
-#include <asm/io.h>
-#include <asm/smp.h>
-#include <asm/apicdef.h>
-
-#define        MIP_REG                 1
-#define        MIP_PSAI_REG            4
-
-struct acpi_table_sdt {
-       unsigned long pa;
-       unsigned long count;
-       struct {
-               unsigned long pa;
-               enum acpi_table_id id;
-               unsigned long size;
-       }       entry[50];
-};
-
-struct oem_table {
-       struct acpi_table_header Header;
-       u32 OEMTableAddr;
-       u32 OEMTableSize;
-};
-
-int __init
-parse_unisys_oem(char *oemptr)
-{
-       int                     i;
-       int                     success = 0;
-       unsigned char           type, size;
-       char                    *tp = NULL;
-
-       tp = oemptr;
-
-       tp += 8;
-
-       for (i=0; i <= 6; i++) {
-               type = *tp++;
-               size = *tp++;
-               tp -= 2;
-               switch (type) {
-               case MIP_REG:
-               case MIP_PSAI_REG:
-                       success++;
-                       break;
-               default:
-                       break;
-               }
-               tp += size;
-       }
-
-       return (success >= 2);
-}
-
-int __init
-find_unisys_acpi_oem_table(unsigned long *oem_addr)
-{
-       struct acpi_table_rsdp          *rsdp = NULL;
-       unsigned long                   rsdp_phys = 0;
-       struct acpi_table_header        *header = NULL;
-       int                             i;
-       struct acpi_table_sdt           sdt = { 0 }; /* initialise sdt.count */
-
-       rsdp_phys = acpi_find_rsdp();
-       rsdp = __va(rsdp_phys);
-       if (rsdp->rsdt_address) {
-               struct acpi_table_rsdt  *mapped_rsdt = NULL;
-               sdt.pa = rsdp->rsdt_address;
-
-               header = (struct acpi_table_header *)
-                       __acpi_map_table(sdt.pa, sizeof(struct 
acpi_table_header));
-               if (!header)
-                       return -ENODEV;
-
-               sdt.count = (header->length - sizeof(struct acpi_table_header)) 
>> 3;
-               mapped_rsdt = (struct acpi_table_rsdt *)
-                       __acpi_map_table(sdt.pa, header->length);
-               if (!mapped_rsdt)
-                       return -ENODEV;
-
-               header = &mapped_rsdt->header;
-
-               for (i = 0; i < sdt.count; i++)
-                       sdt.entry[i].pa = (unsigned long) mapped_rsdt->entry[i];
-       };
-       for (i = 0; i < sdt.count; i++) {
-
-               header = (struct acpi_table_header *)
-                       __acpi_map_table(sdt.entry[i].pa,
-                               sizeof(struct acpi_table_header));
-               if (!header)
-                       continue;
-               if (!strncmp((char *) &header->signature, "OEM1", 4)) {
-                       if (!strncmp((char *) &header->oem_id, "UNISYS", 6)) {
-                               void *addr;
-                               struct oem_table *t;
-                               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);
-                               *oem_addr = (unsigned long) addr;
-                               return 0;
-                       }
-               }
-       }
-       return -1;
-}
diff -r 9f939ff527ee -r a451b0ab40d9 xen/arch/x86/genapic/probe.c
--- a/xen/arch/x86/genapic/probe.c      Thu Aug 02 16:03:35 2007 +0100
+++ b/xen/arch/x86/genapic/probe.c      Fri Aug 03 09:04:29 2007 +0100
@@ -16,7 +16,6 @@
 
 extern struct genapic apic_summit;
 extern struct genapic apic_bigsmp;
-extern struct genapic apic_es7000;
 extern struct genapic apic_default;
 
 struct genapic *genapic;
@@ -24,7 +23,6 @@ struct genapic *apic_probe[] __initdata 
 struct genapic *apic_probe[] __initdata = { 
        &apic_summit,
        &apic_bigsmp, 
-       &apic_es7000,
        &apic_default,  /* must be last */
        NULL,
 };
diff -r 9f939ff527ee -r a451b0ab40d9 
xen/include/asm-x86/mach-es7000/mach_mpparse.h
--- a/xen/include/asm-x86/mach-es7000/mach_mpparse.h    Thu Aug 02 16:03:35 
2007 +0100
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,45 +0,0 @@
-#ifndef __ASM_MACH_MPPARSE_H
-#define __ASM_MACH_MPPARSE_H
-
-#include <xen/acpi.h>
-
-extern int parse_unisys_oem(char *oemptr);
-extern int find_unisys_acpi_oem_table(unsigned long *oem_addr);
-
-static inline int mps_oem_check(struct mp_config_table *mpc, char *oem,
-               char *productid)
-{
-       if (mpc->mpc_oemptr) {
-               struct mp_config_oemtable *oem_table = 
-                       (struct mp_config_oemtable *)(long)mpc->mpc_oemptr;
-               if (!strncmp(oem, "UNISYS", 6))
-                       return parse_unisys_oem((char *)oem_table);
-       }
-       return 0;
-}
-
-static inline int es7000_check_dsdt(void)
-{
-       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;
-       if (!find_unisys_acpi_oem_table(&oem_addr)) {
-               if (es7000_check_dsdt())
-                       return parse_unisys_oem((char *)oem_addr);
-               else
-                       return 1;
-       }
-       return 0;
-}
-
-
-#endif /* __ASM_MACH_MPPARSE_H */

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.