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] [xen-unstable] [IA64] compilation fix caused by 17814:9a

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [IA64] compilation fix caused by 17814:9af7a535225f
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 13 Jun 2008 14:10:12 -0700
Delivery-date: Fri, 13 Jun 2008 14:10:22 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1213281729 -3600
# Node ID 0089fe3d209d13d752215b0214c9a7c9f5ee4fad
# Parent  e5c9c8e6e726d64a11721f9c68999203fcc1e3bf
[IA64] compilation fix caused by 17814:9af7a535225f

ia64 compliation fix caused by 17814:9af7a535225f.
- generate_acpi_checksum() is replaced by acpi_tb_checksum()
- move dump_execution_state() definitions from asm-ia64/xenprocessor.h
  to asm-ia64/bug.h

Signed-off-by: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
---
 tools/libxc/ia64/dom_fw_acpi.c      |   29 +++++++++++++++++++++++------
 xen/arch/ia64/xen/dom_fw_common.c   |   21 +++++++++++----------
 xen/arch/ia64/xen/dom_fw_dom0.c     |   25 +++++++++----------------
 xen/include/asm-ia64/bug.h          |    2 ++
 xen/include/asm-ia64/xenprocessor.h |    2 --
 xen/include/xen/acpi.h              |    1 -
 6 files changed, 45 insertions(+), 35 deletions(-)

diff -r e5c9c8e6e726 -r 0089fe3d209d tools/libxc/ia64/dom_fw_acpi.c
--- a/tools/libxc/ia64/dom_fw_acpi.c    Thu Jun 12 15:41:15 2008 +0100
+++ b/tools/libxc/ia64/dom_fw_acpi.c    Thu Jun 12 15:42:09 2008 +0100
@@ -1,14 +1,31 @@
 #include <inttypes.h>
 #include "xc_dom_ia64_util.h"
 #include <xen/acpi.h>
+#include <acpi/actables.h>
 
-uint8_t
-generate_acpi_checksum(void *tbl, unsigned long len)
+/* stolen from xen/drivers/acpi/tables/tbutils.c */
+
+/*******************************************************************************
+ *
+ * FUNCTION:    acpi_tb_checksum
+ *
+ * PARAMETERS:  Buffer          - Pointer to memory region to be checked
+ *              Length          - Length of this memory region
+ *
+ * RETURN:      Checksum (u8)
+ *
+ * DESCRIPTION: Calculates circular checksum of memory region.
+ *
+ 
******************************************************************************/
+
+u8 acpi_tb_checksum(u8 * buffer, acpi_native_uint length)
 {
-    uint8_t *ptr, sum = 0;
+       u8 sum = 0;
+       u8 *end = buffer + length;
 
-    for ( ptr = tbl; len > 0 ; len--, ptr++ )
-        sum += *ptr;
+       while (buffer < end) {
+               sum = (u8) (sum + *(buffer++));
+       }
 
-    return 0 - sum;
+       return sum;
 }
diff -r e5c9c8e6e726 -r 0089fe3d209d xen/arch/ia64/xen/dom_fw_common.c
--- a/xen/arch/ia64/xen/dom_fw_common.c Thu Jun 12 15:41:15 2008 +0100
+++ b/xen/arch/ia64/xen/dom_fw_common.c Thu Jun 12 15:42:09 2008 +0100
@@ -31,6 +31,7 @@
 #endif /* __XEN__ */
 
 #include <xen/acpi.h>
+#include <acpi/actables.h>
 #include <asm/dom_fw.h>
 #include <asm/dom_fw_domu.h>
 
@@ -258,8 +259,8 @@ dom_fw_fake_acpi(domain_t *d, struct fak
        xsdt->table_offset_entry[0] = ACPI_TABLE_MPA(fadt);
        tables->madt_ptr = ACPI_TABLE_MPA(madt);
 
-       xsdt->header.checksum = generate_acpi_checksum(xsdt,
-                                                      xsdt->header.length);
+       xsdt->header.checksum = -acpi_tb_checksum((u8*)xsdt,
+                                                 xsdt->header.length);
 
        /* setup FADT */
        memcpy(fadt->header.signature, ACPI_SIG_FADT,
@@ -296,8 +297,8 @@ dom_fw_fake_acpi(domain_t *d, struct fak
        fadt->xpm_timer_block.bit_width = 8;
        fadt->xpm_timer_block.address = ACPI_TABLE_MPA(pm_timer_block);
 
-       fadt->header.checksum = generate_acpi_checksum(fadt,
-                                                      fadt->header.length);
+       fadt->header.checksum = -acpi_tb_checksum((u8*)fadt,
+                                                 fadt->header.length);
 
        /* setup RSDP */
        memcpy(rsdp->signature, ACPI_SIG_RSDP, strlen(ACPI_SIG_RSDP));
@@ -306,9 +307,9 @@ dom_fw_fake_acpi(domain_t *d, struct fak
        rsdp->length = sizeof(struct acpi_table_rsdp);
        rsdp->xsdt_physical_address = ACPI_TABLE_MPA(xsdt);
 
-       rsdp->checksum = generate_acpi_checksum(rsdp,
-                                               ACPI_RSDP_CHECKSUM_LENGTH);
-       rsdp->extended_checksum = generate_acpi_checksum(rsdp, rsdp->length);
+       rsdp->checksum = -acpi_tb_checksum((u8*)rsdp,
+                                          ACPI_RSDP_CHECKSUM_LENGTH);
+       rsdp->extended_checksum = -acpi_tb_checksum((u8*)rsdp, rsdp->length);
 
        /* setup DSDT with trivial namespace. */ 
        memcpy(dsdt->signature, ACPI_SIG_DSDT, strlen(ACPI_SIG_DSDT));
@@ -347,7 +348,7 @@ dom_fw_fake_acpi(domain_t *d, struct fak
        tables->aml[1] = 0x40 + ((aml_len - 1) & 0x0f);
        tables->aml[2] = (aml_len - 1) >> 4;
        dsdt->length = sizeof(struct acpi_table_header) + aml_len;
-       dsdt->checksum = generate_acpi_checksum(dsdt, dsdt->length);
+       dsdt->checksum = -acpi_tb_checksum((u8*)dsdt, dsdt->length);
 
        /* setup MADT */
        memcpy(madt->header.signature, ACPI_SIG_MADT,
@@ -373,8 +374,8 @@ dom_fw_fake_acpi(domain_t *d, struct fak
        }
        madt->header.length = sizeof(struct acpi_table_madt) +
                              nbr_cpus * sizeof(struct acpi_table_lsapic);
-       madt->header.checksum = generate_acpi_checksum(madt,
-                                                      madt->header.length);
+       madt->header.checksum = -acpi_tb_checksum((u8*)madt,
+                                                 madt->header.length);
        return;
 }
 
diff -r e5c9c8e6e726 -r 0089fe3d209d xen/arch/ia64/xen/dom_fw_dom0.c
--- a/xen/arch/ia64/xen/dom_fw_dom0.c   Thu Jun 12 15:41:15 2008 +0100
+++ b/xen/arch/ia64/xen/dom_fw_dom0.c   Thu Jun 12 15:42:09 2008 +0100
@@ -25,10 +25,11 @@
  */
 
 #include <xen/config.h>
-#include <xen/acpi.h>
 #include <xen/errno.h>
 #include <xen/sched.h>
 #include <xen/list.h>
+#include <xen/acpi.h>
+#include <acpi/actables.h>
 
 #include <asm/dom_fw.h>
 #include <asm/dom_fw_common.h>
@@ -102,7 +103,8 @@ acpi_update_madt_checksum(struct acpi_ta
 
        acpi_madt = (struct acpi_table_madt *)table;
        acpi_madt->header.checksum = 0;
-       acpi_madt->header.checksum = generate_acpi_checksum(acpi_madt, size);
+       acpi_madt->header.checksum = -acpi_tb_checksum((u8*)acpi_madt,
+                                                      table->length);
 
        return 0;
 }
@@ -154,7 +156,9 @@ static int __init __acpi_table_disable(s
        memcpy(header->oem_table_id, "Xen     ", 8);
        memcpy(header->signature, "OEMx", 4);
        header->checksum = 0;
-       header->checksum = generate_acpi_checksum(header, header->length);
+       header->checksum = -acpi_tb_checksum((u8*)header, header->length);
+
+       printk("Successfully Disabling %s\n", header->signature);
        return 0;
 }
 
@@ -166,7 +170,6 @@ static void __init acpi_table_disable(ch
 /* base is physical address of acpi table */
 static void __init touch_acpi_table(void)
 {
-       int result;
        lsapic_nbr = 0;
 
        /*
@@ -196,18 +199,8 @@ static void __init touch_acpi_table(void
        acpi_table_parse(ACPI_SIG_SRAT, acpi_backup_table);
        acpi_table_parse(ACPI_SIG_SLIT, acpi_backup_table);
 
-       result = acpi_table_disable(ACPI_SIG_SRAT);
-       if ( result == 0 )
-               printk("Success Disabling SRAT\n");
-       else if ( result != -ENOENT )
-               printk("ERROR: Failed Disabling SRAT\n");
-
-       result = acpi_table_disable(ACPI_SIG_SLIT);
-       if ( result == 0 )
-               printk("Success Disabling SLIT\n");
-       else if ( result != -ENOENT )
-               printk("ERROR: Failed Disabling SLIT\n");
-
+       acpi_table_disable(ACPI_SIG_SRAT);
+       acpi_table_disable(ACPI_SIG_SLIT);
        return;
 }
 
diff -r e5c9c8e6e726 -r 0089fe3d209d xen/include/asm-ia64/bug.h
--- a/xen/include/asm-ia64/bug.h        Thu Jun 12 15:41:15 2008 +0100
+++ b/xen/include/asm-ia64/bug.h        Thu Jun 12 15:42:09 2008 +0100
@@ -4,4 +4,6 @@
 #define BUG() __bug(__FILE__, __LINE__)
 #define WARN() __warn(__FILE__, __LINE__)
 
+#define dump_execution_state() printk("FIXME: implement ia64 
dump_execution_state()\n");
+
 #endif /* __IA64_BUG_H__ */
diff -r e5c9c8e6e726 -r 0089fe3d209d xen/include/asm-ia64/xenprocessor.h
--- a/xen/include/asm-ia64/xenprocessor.h       Thu Jun 12 15:41:15 2008 +0100
+++ b/xen/include/asm-ia64/xenprocessor.h       Thu Jun 12 15:42:09 2008 +0100
@@ -250,6 +250,4 @@ typedef union {
        };
 } ia64_pkr_t;
 
-#define dump_execution_state() printk("FIXME: implement ia64 
dump_execution_state()\n");
-
 #endif // _ASM_IA64_XENPROCESSOR_H
diff -r e5c9c8e6e726 -r 0089fe3d209d xen/include/xen/acpi.h
--- a/xen/include/xen/acpi.h    Thu Jun 12 15:41:15 2008 +0100
+++ b/xen/include/xen/acpi.h    Thu Jun 12 15:42:09 2008 +0100
@@ -295,7 +295,6 @@ void acpi_table_print (struct acpi_table
 void acpi_table_print (struct acpi_table_header *header, unsigned long 
phys_addr);
 void acpi_table_print_madt_entry (struct acpi_subtable_header *madt);
 void acpi_table_print_srat_entry (struct acpi_subtable_header *srat);
-uint8_t generate_acpi_checksum(void *tbl, unsigned long len);
 
 /* the following four functions are architecture-dependent */
 void acpi_numa_slit_init (struct acpi_table_slit *slit);

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [IA64] compilation fix caused by 17814:9af7a535225f, Xen patchbot-unstable <=