ia64/xen-unstable

changeset 15669:d9c3836e0684

Move generate_acpi_checksum() from ia64 code to common.
Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
author kfraser@localhost.localdomain
date Mon Jul 30 10:59:27 2007 +0100 (2007-07-30)
parents f42ca20a1bb3
children c0fbee66aff6
files tools/libxc/ia64/Makefile tools/libxc/ia64/dom_fw_acpi.c xen/arch/ia64/xen/dom_fw_common.c xen/drivers/acpi/tables.c xen/include/asm-ia64/dom_fw_common.h xen/include/xen/acpi.h
line diff
     1.1 --- a/tools/libxc/ia64/Makefile	Fri Jul 27 09:43:07 2007 +0100
     1.2 +++ b/tools/libxc/ia64/Makefile	Mon Jul 30 10:59:27 2007 +0100
     1.3 @@ -5,7 +5,7 @@ GUEST_SRCS-y += ia64/xc_ia64_linux_save.
     1.4  GUEST_SRCS-y += ia64/xc_ia64_linux_restore.c
     1.5  
     1.6  GUEST_SRCS-y += ia64/xc_dom_ia64_util.c
     1.7 -DOMFW_SRCS_BASE := dom_fw_common.c dom_fw_domu.c dom_fw_asm.S
     1.8 +DOMFW_SRCS_BASE := dom_fw_common.c dom_fw_domu.c dom_fw_asm.S dom_fw_acpi.c
     1.9  DOMFW_SRCS := $(addprefix ia64/, $(DOMFW_SRCS_BASE))
    1.10  $(DOMFW_SRCS):
    1.11  	ln -sf ../$(XEN_ROOT)/xen/arch/ia64/xen/$(@F) $@
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/tools/libxc/ia64/dom_fw_acpi.c	Mon Jul 30 10:59:27 2007 +0100
     2.3 @@ -0,0 +1,13 @@
     2.4 +#include <inttypes.h>
     2.5 +#include <xen/acpi.h>
     2.6 +
     2.7 +uint8_t
     2.8 +generate_acpi_checksum(void *tbl, unsigned long len)
     2.9 +{
    2.10 +    uint8_t *ptr, sum = 0;
    2.11 +
    2.12 +    for ( ptr = tbl; len > 0 ; len--, ptr++ )
    2.13 +        sum += *ptr;
    2.14 +
    2.15 +    return 0 - sum;
    2.16 +}
     3.1 --- a/xen/arch/ia64/xen/dom_fw_common.c	Fri Jul 27 09:43:07 2007 +0100
     3.2 +++ b/xen/arch/ia64/xen/dom_fw_common.c	Mon Jul 30 10:59:27 2007 +0100
     3.3 @@ -207,17 +207,6 @@ print_md(efi_memory_desc_t *md)
     3.4  		printk("(%luKB)\n", size >> 10);
     3.5  }
     3.6  
     3.7 -uint8_t
     3.8 -generate_acpi_checksum(void *tbl, unsigned long len)
     3.9 -{
    3.10 -	uint8_t *ptr, sum = 0;
    3.11 -
    3.12 -	for (ptr = tbl; len > 0 ; len--, ptr++)
    3.13 -		sum += *ptr;
    3.14 -
    3.15 -	return 0 - sum;
    3.16 -}
    3.17 -
    3.18  struct fake_acpi_tables {
    3.19  	struct acpi20_table_rsdp rsdp;
    3.20  	struct xsdt_descriptor_rev2 xsdt;
     4.1 --- a/xen/drivers/acpi/tables.c	Fri Jul 27 09:43:07 2007 +0100
     4.2 +++ b/xen/drivers/acpi/tables.c	Mon Jul 30 10:59:27 2007 +0100
     4.3 @@ -227,6 +227,17 @@ void acpi_table_print_madt_entry(acpi_ta
     4.4  	}
     4.5  }
     4.6  
     4.7 +uint8_t
     4.8 +generate_acpi_checksum(void *tbl, unsigned long len)
     4.9 +{
    4.10 +	uint8_t *ptr, sum = 0;
    4.11 +
    4.12 +	for (ptr = tbl; len > 0 ; len--, ptr++)
    4.13 +		sum += *ptr;
    4.14 +
    4.15 +	return 0 - sum;
    4.16 +}
    4.17 +
    4.18  static int
    4.19  acpi_table_compute_checksum(void *table_pointer, unsigned long length)
    4.20  {
     5.1 --- a/xen/include/asm-ia64/dom_fw_common.h	Fri Jul 27 09:43:07 2007 +0100
     5.2 +++ b/xen/include/asm-ia64/dom_fw_common.h	Mon Jul 30 10:59:27 2007 +0100
     5.3 @@ -85,7 +85,6 @@ void
     5.4  xen_ia64_efi_make_md(efi_memory_desc_t *md,
     5.5                       uint32_t type, uint64_t attr, 
     5.6                       uint64_t start, uint64_t end);
     5.7 -uint8_t generate_acpi_checksum(void *tbl, unsigned long len);
     5.8  struct fake_acpi_tables;
     5.9  void dom_fw_fake_acpi(domain_t *d, struct fake_acpi_tables *tables);
    5.10  int efi_mdt_cmp(const void *a, const void *b); 
     6.1 --- a/xen/include/xen/acpi.h	Fri Jul 27 09:43:07 2007 +0100
     6.2 +++ b/xen/include/xen/acpi.h	Mon Jul 30 10:59:27 2007 +0100
     6.3 @@ -390,6 +390,7 @@ int acpi_table_parse_srat (enum acpi_sra
     6.4  void acpi_table_print (struct acpi_table_header *header, unsigned long phys_addr);
     6.5  void acpi_table_print_madt_entry (acpi_table_entry_header *madt);
     6.6  void acpi_table_print_srat_entry (acpi_table_entry_header *srat);
     6.7 +uint8_t generate_acpi_checksum(void *tbl, unsigned long len);
     6.8  
     6.9  /* the following four functions are architecture-dependent */
    6.10  void acpi_numa_slit_init (struct acpi_table_slit *slit);