[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] Move generate_acpi_checksum() from ia64 code to common.
# HG changeset patch # User kfraser@xxxxxxxxxxxxxxxxxxxxx # Date 1185789567 -3600 # Node ID d9c3836e068409ddb7620f7bd5b4c09f16a55f86 # Parent f42ca20a1bb31942a5ea25d704be4025bfbe6d44 Move generate_acpi_checksum() from ia64 code to common. Signed-off-by: Akio Takebe <takebe_akio@xxxxxxxxxxxxxx> --- tools/libxc/ia64/Makefile | 2 +- tools/libxc/ia64/dom_fw_acpi.c | 13 +++++++++++++ xen/arch/ia64/xen/dom_fw_common.c | 11 ----------- xen/drivers/acpi/tables.c | 11 +++++++++++ xen/include/asm-ia64/dom_fw_common.h | 1 - xen/include/xen/acpi.h | 1 + 6 files changed, 26 insertions(+), 13 deletions(-) diff -r f42ca20a1bb3 -r d9c3836e0684 tools/libxc/ia64/Makefile --- a/tools/libxc/ia64/Makefile Fri Jul 27 09:43:07 2007 +0100 +++ b/tools/libxc/ia64/Makefile Mon Jul 30 10:59:27 2007 +0100 @@ -5,7 +5,7 @@ GUEST_SRCS-y += ia64/xc_ia64_linux_resto GUEST_SRCS-y += ia64/xc_ia64_linux_restore.c GUEST_SRCS-y += ia64/xc_dom_ia64_util.c -DOMFW_SRCS_BASE := dom_fw_common.c dom_fw_domu.c dom_fw_asm.S +DOMFW_SRCS_BASE := dom_fw_common.c dom_fw_domu.c dom_fw_asm.S dom_fw_acpi.c DOMFW_SRCS := $(addprefix ia64/, $(DOMFW_SRCS_BASE)) $(DOMFW_SRCS): ln -sf ../$(XEN_ROOT)/xen/arch/ia64/xen/$(@F) $@ diff -r f42ca20a1bb3 -r d9c3836e0684 tools/libxc/ia64/dom_fw_acpi.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tools/libxc/ia64/dom_fw_acpi.c Mon Jul 30 10:59:27 2007 +0100 @@ -0,0 +1,13 @@ +#include <inttypes.h> +#include <xen/acpi.h> + +uint8_t +generate_acpi_checksum(void *tbl, unsigned long len) +{ + uint8_t *ptr, sum = 0; + + for ( ptr = tbl; len > 0 ; len--, ptr++ ) + sum += *ptr; + + return 0 - sum; +} diff -r f42ca20a1bb3 -r d9c3836e0684 xen/arch/ia64/xen/dom_fw_common.c --- a/xen/arch/ia64/xen/dom_fw_common.c Fri Jul 27 09:43:07 2007 +0100 +++ b/xen/arch/ia64/xen/dom_fw_common.c Mon Jul 30 10:59:27 2007 +0100 @@ -207,17 +207,6 @@ print_md(efi_memory_desc_t *md) printk("(%luKB)\n", size >> 10); } -uint8_t -generate_acpi_checksum(void *tbl, unsigned long len) -{ - uint8_t *ptr, sum = 0; - - for (ptr = tbl; len > 0 ; len--, ptr++) - sum += *ptr; - - return 0 - sum; -} - struct fake_acpi_tables { struct acpi20_table_rsdp rsdp; struct xsdt_descriptor_rev2 xsdt; diff -r f42ca20a1bb3 -r d9c3836e0684 xen/drivers/acpi/tables.c --- a/xen/drivers/acpi/tables.c Fri Jul 27 09:43:07 2007 +0100 +++ b/xen/drivers/acpi/tables.c Mon Jul 30 10:59:27 2007 +0100 @@ -227,6 +227,17 @@ void acpi_table_print_madt_entry(acpi_ta } } +uint8_t +generate_acpi_checksum(void *tbl, unsigned long len) +{ + uint8_t *ptr, sum = 0; + + for (ptr = tbl; len > 0 ; len--, ptr++) + sum += *ptr; + + return 0 - sum; +} + static int acpi_table_compute_checksum(void *table_pointer, unsigned long length) { diff -r f42ca20a1bb3 -r d9c3836e0684 xen/include/asm-ia64/dom_fw_common.h --- a/xen/include/asm-ia64/dom_fw_common.h Fri Jul 27 09:43:07 2007 +0100 +++ b/xen/include/asm-ia64/dom_fw_common.h Mon Jul 30 10:59:27 2007 +0100 @@ -85,7 +85,6 @@ xen_ia64_efi_make_md(efi_memory_desc_t * xen_ia64_efi_make_md(efi_memory_desc_t *md, uint32_t type, uint64_t attr, uint64_t start, uint64_t end); -uint8_t generate_acpi_checksum(void *tbl, unsigned long len); struct fake_acpi_tables; void dom_fw_fake_acpi(domain_t *d, struct fake_acpi_tables *tables); int efi_mdt_cmp(const void *a, const void *b); diff -r f42ca20a1bb3 -r d9c3836e0684 xen/include/xen/acpi.h --- a/xen/include/xen/acpi.h Fri Jul 27 09:43:07 2007 +0100 +++ b/xen/include/xen/acpi.h Mon Jul 30 10:59:27 2007 +0100 @@ -390,6 +390,7 @@ 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 (acpi_table_entry_header *madt); void acpi_table_print_srat_entry (acpi_table_entry_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
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |