WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] Merge

ChangeSet 1.1472.2.3, 2005/05/20 10:23:51-07:00, adsharma@xxxxxxxxxxxxxxxxxxxxxx

        Merge



 arch/ia64/acpi.c            |  979 +++++++++++++++++++++-----------------------
 arch/ia64/dom_fw.c          |   69 +++
 arch/ia64/domain.c          |   18 
 arch/ia64/process.c         |    2 
 arch/ia64/tools/mkbuildtree |   12 
 arch/ia64/vcpu.c            |   13 
 arch/ia64/xenmisc.c         |   22 
 arch/ia64/xensetup.c        |    7 
 include/asm-ia64/config.h   |   11 
 include/xen/sched.h         |  105 +++-
 10 files changed, 677 insertions(+), 561 deletions(-)


diff -Nru a/xen/arch/ia64/acpi.c b/xen/arch/ia64/acpi.c
--- a/xen/arch/ia64/acpi.c      2005-05-23 12:04:09 -04:00
+++ b/xen/arch/ia64/acpi.c      2005-05-23 12:04:09 -04:00
@@ -1,9 +1,16 @@
 /*
  *  acpi.c - Architecture-Specific Low-Level ACPI Support
  *
- *  Copyright (C) 2001, 2002 Paul Diefenbaugh <paul.s.diefenbaugh@xxxxxxxxx>
- *  Copyright (C) 2001 Jun Nakajima <jun.nakajima@xxxxxxxxx>
- *  Copyright (C) 2001 Patrick Mochel <mochel@xxxxxxxx>
+ *  Copyright (C) 1999 VA Linux Systems
+ *  Copyright (C) 1999,2000 Walt Drummond <drummond@xxxxxxxxxxx>
+ *  Copyright (C) 2000, 2002-2003 Hewlett-Packard Co.
+ *     David Mosberger-Tang <davidm@xxxxxxxxxx>
+ *  Copyright (C) 2000 Intel Corp.
+ *  Copyright (C) 2000,2001 J.I. Lee <jung-ik.lee@xxxxxxxxx>
+ *  Copyright (C) 2001 Paul Diefenbaugh <paul.s.diefenbaugh@xxxxxxxxx>
+ *  Copyright (C) 2001 Jenna Hall <jenna.s.hall@xxxxxxxxx>
+ *  Copyright (C) 2001 Takayoshi Kochi <t-kochi@xxxxxxxxxxxxx>
+ *  Copyright (C) 2002 Erich Focht <efocht@xxxxxxxxxx>
  *
  * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  *
@@ -19,667 +26,651 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  *
  * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  */
 
-#include <xen/config.h>
-#include <xen/kernel.h>
-#include <xen/init.h>
-#include <xen/types.h>
-/*#include <xen/stddef.h>*/
-#include <xen/slab.h>
-//#include <xen/pci.h>
-/*#include <xen/bootmem.h>*/
-#include <xen/irq.h>
-#include <xen/acpi.h>
-//#include <asm/mpspec.h>
+#include <linux/config.h>
+#include <linux/module.h>
+#include <linux/init.h>
+#include <linux/kernel.h>
+#include <linux/sched.h>
+#include <linux/smp.h>
+#include <linux/string.h>
+#include <linux/types.h>
+#include <linux/irq.h>
+#include <linux/acpi.h>
+#include <linux/efi.h>
+#include <linux/mmzone.h>
 #include <asm/io.h>
-//#include <asm/apic.h>
-//#include <asm/apicdef.h>
+//#include <asm/iosapic.h>
+#include <asm/machvec.h>
 #include <asm/page.h>
-/*#include <asm/pgtable.h>*/
-#include <asm/pgalloc.h>
-//#include <asm/io_apic.h>
-#include <asm/acpi.h>
-/*#include <asm/save_state.h>*/
-//#include <asm/smpboot.h>
-
+#include <asm/system.h>
+#include <asm/numa.h>
+#include <asm/sal.h>
+//#include <asm/cyclone.h>
+
+#define BAD_MADT_ENTRY(entry, end) (                                        \
+               (!entry) || (unsigned long)entry + sizeof(*entry) > end ||  \
+               ((acpi_table_entry_header *)entry)->length != sizeof(*entry))
 
 #define PREFIX                 "ACPI: "
 
-int acpi_lapic = 0;
-int acpi_ioapic = 0;
-
-/* --------------------------------------------------------------------------
-                              Boot-time Configuration
-   -------------------------------------------------------------------------- 
*/
+void (*pm_idle) (void);
+EXPORT_SYMBOL(pm_idle);
+void (*pm_power_off) (void);
+
+unsigned char acpi_kbd_controller_present = 1;
+unsigned char acpi_legacy_devices;
+
+const char *
+acpi_get_sysname (void)
+{
+#ifdef CONFIG_IA64_GENERIC
+       unsigned long rsdp_phys;
+       struct acpi20_table_rsdp *rsdp;
+       struct acpi_table_xsdt *xsdt;
+       struct acpi_table_header *hdr;
+
+       rsdp_phys = acpi_find_rsdp();
+       if (!rsdp_phys) {
+               printk(KERN_ERR "ACPI 2.0 RSDP not found, default to 
\"dig\"\n");
+               return "dig";
+       }
+
+       rsdp = (struct acpi20_table_rsdp *) __va(rsdp_phys);
+       if (strncmp(rsdp->signature, RSDP_SIG, sizeof(RSDP_SIG) - 1)) {
+               printk(KERN_ERR "ACPI 2.0 RSDP signature incorrect, default to 
\"dig\"\n");
+               return "dig";
+       }
+
+       xsdt = (struct acpi_table_xsdt *) __va(rsdp->xsdt_address);
+       hdr = &xsdt->header;
+       if (strncmp(hdr->signature, XSDT_SIG, sizeof(XSDT_SIG) - 1)) {
+               printk(KERN_ERR "ACPI 2.0 XSDT signature incorrect, default to 
\"dig\"\n");
+               return "dig";
+       }
+
+       if (!strcmp(hdr->oem_id, "HP")) {
+               return "hpzx1";
+       }
+       else if (!strcmp(hdr->oem_id, "SGI")) {
+               return "sn2";
+       }
+
+       return "dig";
+#else
+# if defined (CONFIG_IA64_HP_SIM)
+       return "hpsim";
+# elif defined (CONFIG_IA64_HP_ZX1)
+       return "hpzx1";
+# elif defined (CONFIG_IA64_SGI_SN2)
+       return "sn2";
+# elif defined (CONFIG_IA64_DIG)
+       return "dig";
+# else
+#      error Unknown platform.  Fix acpi.c.
+# endif
+#endif
+}
 
 #ifdef CONFIG_ACPI_BOOT
-//int acpi_noirq __initdata = 0;  /* skip ACPI IRQ initialization */
-int acpi_ht __initdata = 1;     /* enable HT */
 
-enum acpi_irq_model_id         acpi_irq_model;
+#define ACPI_MAX_PLATFORM_INTERRUPTS   256
+
+#if 0
+/* Array to record platform interrupt vectors for generic interrupt routing. */
+int platform_intr_list[ACPI_MAX_PLATFORM_INTERRUPTS] = {
+       [0 ... ACPI_MAX_PLATFORM_INTERRUPTS - 1] = -1
+};
 
+enum acpi_irq_model_id acpi_irq_model = ACPI_IRQ_MODEL_IOSAPIC;
 
 /*
- * Temporarily use the virtual area starting from FIX_IO_APIC_BASE_END,
- * to map the target physical address. The problem is that set_fixmap()
- * provides a single page, and it is possible that the page is not
- * sufficient.
- * By using this area, we can map up to MAX_IO_APICS pages temporarily,
- * i.e. until the next __va_range() call.
- *
- * Important Safety Note:  The fixed I/O APIC page numbers are *subtracted*
- * from the fixed base.  That's why we start at FIX_IO_APIC_BASE_END and
- * count idx down while incrementing the phys address.
+ * Interrupt routing API for device drivers.  Provides interrupt vector for
+ * a generic platform event.  Currently only CPEI is implemented.
  */
-char *__acpi_map_table(unsigned long phys, unsigned long size)
+int
+acpi_request_vector (u32 int_type)
 {
-       unsigned long base, offset, mapped_size;
-       int idx;
-
-       if (phys + size < 8*1024*1024) 
-               return __va(phys); 
+       int vector = -1;
 
-       offset = phys & (PAGE_SIZE - 1);
-       mapped_size = PAGE_SIZE - offset;
-#ifndef XEN
-// where is FIX_ACPI_*? hack for now, FIXME later
-       set_fixmap(FIX_ACPI_END, phys);
-       base = fix_to_virt(FIX_ACPI_END);
-
-       /*
-        * Most cases can be covered by the below.
-        */
-       idx = FIX_ACPI_END;
-       while (mapped_size < size) {
-               if (--idx < FIX_ACPI_BEGIN)
-                       return 0;       /* cannot handle this */
-               phys += PAGE_SIZE;
-               set_fixmap(idx, phys);
-               mapped_size += PAGE_SIZE;
-       }
+       if (int_type < ACPI_MAX_PLATFORM_INTERRUPTS) {
+               /* corrected platform error interrupt */
+               vector = platform_intr_list[int_type];
+       } else
+               printk(KERN_ERR "acpi_request_vector(): invalid interrupt 
type\n");
+       return vector;
+}
 #endif
-
-       return ((unsigned char *) base + offset);
+char *
+__acpi_map_table (unsigned long phys_addr, unsigned long size)
+{
+       return __va(phys_addr);
 }
 
+/* --------------------------------------------------------------------------
+                            Boot-time Table Parsing
+   -------------------------------------------------------------------------- 
*/
 
-#ifdef CONFIG_X86_LOCAL_APIC
-
-static u64 acpi_lapic_addr __initdata = APIC_DEFAULT_PHYS_BASE;
-
+static int                     total_cpus __initdata;
+static int                     available_cpus __initdata;
+struct acpi_table_madt *       acpi_madt __initdata;
+static u8                      has_8259;
 
+#if 0
 static int __init
-acpi_parse_madt (
-       unsigned long           phys_addr,
-       unsigned long           size)
+acpi_parse_lapic_addr_ovr (
+       acpi_table_entry_header *header, const unsigned long end)
 {
-       struct acpi_table_madt  *madt = NULL;
+       struct acpi_table_lapic_addr_ovr *lapic;
 
-       if (!phys_addr || !size)
-               return -EINVAL;
-
-       madt = (struct acpi_table_madt *) __acpi_map_table(phys_addr, size);
-       if (!madt) {
-               printk(KERN_WARNING PREFIX "Unable to map MADT\n");
-               return -ENODEV;
-       }

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

<Prev in Thread] Current Thread [Next in Thread>