[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] ia64: Fix build after ACPI header churn.
# HG changeset patch # User Keir Fraser <keir.fraser@xxxxxxxxxx> # Date 1205868489 0 # Node ID df89656a4b949e99c59d684f291212c8e29c9b19 # Parent 6ac99b961bffcdf50131fe4f2be1714f51b44db9 ia64: Fix build after ACPI header churn. Signed-off-by: Alex Williamson <alex.williamson@xxxxxx> Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx> --- xen/arch/ia64/linux-xen/setup.c | 15 +++-- xen/arch/ia64/xen/acpi.c | 35 +++++++------ xen/arch/ia64/xen/dom_fw_common.c | 91 ++++++++++++++++++------------------ xen/arch/ia64/xen/pcdp.c | 19 +++---- xen/include/acpi/platform/aclinux.h | 6 +- 5 files changed, 88 insertions(+), 78 deletions(-) diff -r 6ac99b961bff -r df89656a4b94 xen/arch/ia64/linux-xen/setup.c --- a/xen/arch/ia64/linux-xen/setup.c Tue Mar 18 16:15:24 2008 +0000 +++ b/xen/arch/ia64/linux-xen/setup.c Tue Mar 18 19:28:09 2008 +0000 @@ -358,7 +358,7 @@ acpi_oem_console_setup(void) extern struct ns16550_defaults ns16550_com1; efi_system_table_t *systab; efi_config_table_t *tables; - struct acpi20_table_rsdp *rsdp = NULL; + struct acpi_table_rsdp *rsdp = NULL; struct acpi_table_xsdt *xsdt; struct acpi_table_header *hdr; int i; @@ -378,16 +378,17 @@ acpi_oem_console_setup(void) for (i = 0 ; i < (int)systab->nr_tables && !rsdp ; i++) { if (efi_guidcmp(tables[i].guid, ACPI_20_TABLE_GUID) == 0) rsdp = - (struct acpi20_table_rsdp *)__va(tables[i].table); - } - - if (!rsdp || strncmp(rsdp->signature, RSDP_SIG, sizeof(RSDP_SIG) - 1)) + (struct acpi_table_rsdp *)__va(tables[i].table); + } + + if (!rsdp || + strncmp(rsdp->signature, ACPI_SIG_RSDP, sizeof(ACPI_SIG_RSDP) - 1)) return -ENODEV; - xsdt = (struct acpi_table_xsdt *)__va(rsdp->xsdt_address); + xsdt = (struct acpi_table_xsdt *)__va(rsdp->xsdt_physical_address); hdr = &xsdt->header; - if (strncmp(hdr->signature, XSDT_SIG, sizeof(XSDT_SIG) - 1)) + if (strncmp(hdr->signature, ACPI_SIG_XSDT, sizeof(ACPI_SIG_XSDT) - 1)) return -ENODEV; /* Looking for Fujitsu PRIMEQUEST systems */ diff -r 6ac99b961bff -r df89656a4b94 xen/arch/ia64/xen/acpi.c --- a/xen/arch/ia64/xen/acpi.c Tue Mar 18 16:15:24 2008 +0000 +++ b/xen/arch/ia64/xen/acpi.c Tue Mar 18 19:28:09 2008 +0000 @@ -74,7 +74,7 @@ acpi_get_sysname (void) { /* #ifdef CONFIG_IA64_GENERIC */ unsigned long rsdp_phys; - struct acpi20_table_rsdp *rsdp; + struct acpi_table_rsdp *rsdp; struct acpi_table_xsdt *xsdt; struct acpi_table_header *hdr; @@ -84,15 +84,15 @@ acpi_get_sysname (void) return "dig"; } - rsdp = (struct acpi20_table_rsdp *) __va(rsdp_phys); - if (strncmp(rsdp->signature, RSDP_SIG, sizeof(RSDP_SIG) - 1)) { + rsdp = (struct acpi_table_rsdp *) __va(rsdp_phys); + if (strncmp(rsdp->signature, ACPI_SIG_RSDP, sizeof(ACPI_SIG_RSDP) - 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); + xsdt = (struct acpi_table_xsdt *) __va(rsdp->xsdt_physical_address); hdr = &xsdt->header; - if (strncmp(hdr->signature, XSDT_SIG, sizeof(XSDT_SIG) - 1)) { + if (strncmp(hdr->signature, ACPI_SIG_XSDT, sizeof(ACPI_SIG_XSDT) - 1)) { printk(KERN_ERR "ACPI 2.0 XSDT signature incorrect, default to \"dig\"\n"); return "dig"; } @@ -356,14 +356,14 @@ acpi_parse_madt (unsigned long phys_addr #ifdef CONFIG_ITANIUM has_8259 = 1; /* Firmware on old Itanium systems is broken */ #else - has_8259 = acpi_madt->flags.pcat_compat; + has_8259 = acpi_madt->flags & ACPI_MADT_PCAT_COMPAT; #endif iosapic_system_init(has_8259); /* Get base address of IPI Message Block */ - if (acpi_madt->lapic_address) - ipi_base_addr = (void __iomem *) ioremap(acpi_madt->lapic_address, 0); + if (acpi_madt->address) + ipi_base_addr = (void __iomem *)ioremap(acpi_madt->address, 0); printk(KERN_INFO PREFIX "Local APIC address %p\n", ipi_base_addr); @@ -416,7 +416,7 @@ acpi_numa_slit_init (struct acpi_table_s u32 len; len = sizeof(struct acpi_table_header) + 8 - + slit->localities * slit->localities; + + slit->locality_count * slit->locality_count; if (slit->header.length != len) { printk(KERN_ERR "ACPI 2.0 SLIT: size mismatch: %d expected, %d actual\n", len, slit->header.length); @@ -519,21 +519,24 @@ acpi_numa_arch_fixup (void) for (i = 0; i < srat_num_cpus; i++) node_cpuid[i].nid = pxm_to_nid_map[node_cpuid[i].nid]; - printk(KERN_INFO "Number of logical nodes in system = %d\n", numnodes); - printk(KERN_INFO "Number of memory chunks in system = %d\n", num_node_memblks); - - if (!slit_table) return; + printk(KERN_INFO "Number of logical nodes in system = %d\n", + numnodes); + printk(KERN_INFO "Number of memory chunks in system = %d\n", + num_node_memblks); + + if (!slit_table) + return; memset(numa_slit, -1, sizeof(numa_slit)); - for (i=0; i<slit_table->localities; i++) { + for (i = 0; i < slit_table->locality_count; i++) { if (!pxm_bit_test(i)) continue; node_from = pxm_to_nid_map[i]; - for (j=0; j<slit_table->localities; j++) { + for (j=0; j < slit_table->locality_count; j++) { if (!pxm_bit_test(j)) continue; node_to = pxm_to_nid_map[j]; node_distance(node_from, node_to) = - slit_table->entry[i*slit_table->localities + j]; + slit_table->entry[i * slit_table->locality_count + j]; } } diff -r 6ac99b961bff -r df89656a4b94 xen/arch/ia64/xen/dom_fw_common.c --- a/xen/arch/ia64/xen/dom_fw_common.c Tue Mar 18 16:15:24 2008 +0000 +++ b/xen/arch/ia64/xen/dom_fw_common.c Tue Mar 18 19:28:09 2008 +0000 @@ -208,7 +208,7 @@ print_md(efi_memory_desc_t *md) } struct fake_acpi_tables { - struct acpi20_table_rsdp rsdp; + struct acpi_table_rsdp rsdp; struct acpi_table_xsdt xsdt; uint64_t madt_ptr; struct acpi_table_fadt fadt; @@ -217,9 +217,9 @@ struct fake_acpi_tables { uint8_t aml[8 + 11 * MAX_VIRT_CPUS]; struct acpi_table_madt madt; struct acpi_table_lsapic lsapic[MAX_VIRT_CPUS]; - uint8_t pm1a_evt_blk[4]; - uint8_t pm1a_cnt_blk[1]; - uint8_t pm_tmr_blk[4]; + uint8_t pm1a_event_block[4]; + uint8_t pm1a_control_block[1]; + uint8_t pm_timer_block[4]; }; #define ACPI_TABLE_MPA(field) \ FW_ACPI_BASE_PADDR + offsetof(struct fake_acpi_tables, field); @@ -228,7 +228,7 @@ void void dom_fw_fake_acpi(domain_t *d, struct fake_acpi_tables *tables) { - struct acpi20_table_rsdp *rsdp = &tables->rsdp; + struct acpi_table_rsdp *rsdp = &tables->rsdp; struct acpi_table_xsdt *xsdt = &tables->xsdt; struct acpi_table_fadt *fadt = &tables->fadt; struct acpi_table_facs *facs = &tables->facs; @@ -245,34 +245,37 @@ dom_fw_fake_acpi(domain_t *d, struct fak memset(tables, 0, sizeof(struct fake_acpi_tables)); /* setup XSDT (64bit version of RSDT) */ - memcpy(xsdt->signature, XSDT_SIG, sizeof(xsdt->signature)); + memcpy(xsdt->header.signature, ACPI_SIG_XSDT, + sizeof(xsdt->header.signature)); /* XSDT points to both the FADT and the MADT, so add one entry */ - xsdt->length = sizeof(struct acpi_table_xsdt) + sizeof(uint64_t); - xsdt->revision = 1; - memcpy(xsdt->oem_id, "XEN", 3); - memcpy(xsdt->oem_table_id, "Xen/ia64", 8); - memcpy(xsdt->asl_compiler_id, "XEN", 3); - xsdt->asl_compiler_revision = xen_ia64_version(d); + xsdt->header.length = sizeof(struct acpi_table_xsdt) + sizeof(uint64_t); + xsdt->header.revision = 1; + memcpy(xsdt->header.oem_id, "XEN", 3); + memcpy(xsdt->header.oem_table_id, "Xen/ia64", 8); + memcpy(xsdt->header.asl_compiler_id, "XEN", 3); + xsdt->header.asl_compiler_revision = xen_ia64_version(d); xsdt->table_offset_entry[0] = ACPI_TABLE_MPA(fadt); tables->madt_ptr = ACPI_TABLE_MPA(madt); - xsdt->checksum = generate_acpi_checksum(xsdt, xsdt->length); + xsdt->header.checksum = generate_acpi_checksum(xsdt, + xsdt->header.length); /* setup FADT */ - memcpy(fadt->signature, FADT_SIG, sizeof(fadt->signature)); - fadt->length = sizeof(struct acpi_table_fadt); - fadt->revision = FADT2_REVISION_ID; - memcpy(fadt->oem_id, "XEN", 3); - memcpy(fadt->oem_table_id, "Xen/ia64", 8); - memcpy(fadt->asl_compiler_id, "XEN", 3); - fadt->asl_compiler_revision = xen_ia64_version(d); - - memcpy(facs->signature, FACS_SIG, sizeof(facs->signature)); + memcpy(fadt->header.signature, ACPI_SIG_FADT, + sizeof(fadt->header.signature)); + fadt->header.length = sizeof(struct acpi_table_fadt); + fadt->header.revision = FADT2_REVISION_ID; + memcpy(fadt->header.oem_id, "XEN", 3); + memcpy(fadt->header.oem_table_id, "Xen/ia64", 8); + memcpy(fadt->header.asl_compiler_id, "XEN", 3); + fadt->header.asl_compiler_revision = xen_ia64_version(d); + + memcpy(facs->signature, ACPI_SIG_FACS, sizeof(facs->signature)); facs->version = 1; facs->length = sizeof(struct acpi_table_facs); - fadt->xfirmware_ctrl = ACPI_TABLE_MPA(facs); + fadt->Xfacs = ACPI_TABLE_MPA(facs); fadt->Xdsdt = ACPI_TABLE_MPA(dsdt); /* @@ -280,34 +283,35 @@ dom_fw_fake_acpi(domain_t *d, struct fak * from sanity checks in the ACPI CA. Emulate required ACPI hardware * registers in system memory. */ - fadt->pm1_evt_len = 4; - fadt->xpm1a_evt_blk.address_space_id = ACPI_ADR_SPACE_SYSTEM_MEMORY; - fadt->xpm1a_evt_blk.register_bit_width = 8; - fadt->xpm1a_evt_blk.address = ACPI_TABLE_MPA(pm1a_evt_blk); - fadt->pm1_cnt_len = 1; - fadt->xpm1a_cnt_blk.address_space_id = ACPI_ADR_SPACE_SYSTEM_MEMORY; - fadt->xpm1a_cnt_blk.register_bit_width = 8; - fadt->xpm1a_cnt_blk.address = ACPI_TABLE_MPA(pm1a_cnt_blk); - fadt->pm_tm_len = 4; - fadt->xpm_tmr_blk.address_space_id = ACPI_ADR_SPACE_SYSTEM_MEMORY; - fadt->xpm_tmr_blk.register_bit_width = 8; - fadt->xpm_tmr_blk.address = ACPI_TABLE_MPA(pm_tmr_blk); - - fadt->checksum = generate_acpi_checksum(fadt, fadt->length); + fadt->pm1_event_length = 4; + fadt->xpm1a_event_block.space_id = ACPI_ADR_SPACE_SYSTEM_MEMORY; + fadt->xpm1a_event_block.bit_width = 8; + fadt->xpm1a_event_block.address = ACPI_TABLE_MPA(pm1a_event_block); + fadt->pm1_control_length = 1; + fadt->xpm1a_control_block.space_id = ACPI_ADR_SPACE_SYSTEM_MEMORY; + fadt->xpm1a_control_block.bit_width = 8; + fadt->xpm1a_control_block.address = ACPI_TABLE_MPA(pm1a_control_block); + fadt->pm_timer_length = 4; + fadt->xpm_timer_block.space_id = ACPI_ADR_SPACE_SYSTEM_MEMORY; + 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); /* setup RSDP */ - memcpy(rsdp->signature, RSDP_SIG, strlen(RSDP_SIG)); + memcpy(rsdp->signature, ACPI_SIG_RSDP, strlen(ACPI_SIG_RSDP)); memcpy(rsdp->oem_id, "XEN", 3); rsdp->revision = 2; /* ACPI 2.0 includes XSDT */ - rsdp->length = sizeof(struct acpi20_table_rsdp); - rsdp->xsdt_address = ACPI_TABLE_MPA(xsdt); + 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->ext_checksum = generate_acpi_checksum(rsdp, rsdp->length); + rsdp->extended_checksum = generate_acpi_checksum(rsdp, rsdp->length); /* setup DSDT with trivial namespace. */ - memcpy(dsdt->signature, DSDT_SIG, strlen(DSDT_SIG)); + memcpy(dsdt->signature, ACPI_SIG_DSDT, strlen(ACPI_SIG_DSDT)); dsdt->revision = 1; memcpy(dsdt->oem_id, "XEN", 3); memcpy(dsdt->oem_table_id, "Xen/ia64", 8); @@ -346,7 +350,8 @@ dom_fw_fake_acpi(domain_t *d, struct fak dsdt->checksum = generate_acpi_checksum(dsdt, dsdt->length); /* setup MADT */ - memcpy(madt->header.signature, APIC_SIG, sizeof(madt->header.signature)); + memcpy(madt->header.signature, ACPI_SIG_MADT, + sizeof(madt->header.signature)); madt->header.revision = 2; memcpy(madt->header.oem_id, "XEN", 3); memcpy(madt->header.oem_table_id, "Xen/ia64", 8); diff -r 6ac99b961bff -r df89656a4b94 xen/arch/ia64/xen/pcdp.c --- a/xen/arch/ia64/xen/pcdp.c Tue Mar 18 16:15:24 2008 +0000 +++ b/xen/arch/ia64/xen/pcdp.c Tue Mar 18 19:28:09 2008 +0000 @@ -43,7 +43,7 @@ pcdp_hp_irq_fixup(struct pcdp *pcdp, str { efi_system_table_t *systab; efi_config_table_t *tables; - struct acpi20_table_rsdp *rsdp = NULL; + struct acpi_table_rsdp *rsdp = NULL; struct acpi_table_xsdt *xsdt; struct acpi_table_header *hdr; int i; @@ -66,16 +66,17 @@ pcdp_hp_irq_fixup(struct pcdp *pcdp, str for (i = 0 ; i < (int)systab->nr_tables && !rsdp ; i++) { if (efi_guidcmp(tables[i].guid, ACPI_20_TABLE_GUID) == 0) rsdp = - (struct acpi20_table_rsdp *)__va(tables[i].table); - } - - if (!rsdp || strncmp(rsdp->signature, RSDP_SIG, sizeof(RSDP_SIG) - 1)) - return; - - xsdt = (struct acpi_table_xsdt *)__va(rsdp->xsdt_address); + (struct acpi_table_rsdp *)__va(tables[i].table); + } + + if (!rsdp || + strncmp(rsdp->signature, ACPI_SIG_RSDP, sizeof(ACPI_SIG_RSDP) - 1)) + return; + + xsdt = (struct acpi_table_xsdt *)__va(rsdp->xsdt_physical_address); hdr = &xsdt->header; - if (strncmp(hdr->signature, XSDT_SIG, sizeof(XSDT_SIG) - 1)) + if (strncmp(hdr->signature, ACPI_SIG_XSDT, sizeof(ACPI_SIG_XSDT) - 1)) return; /* Sanity check; are we still looking at HP firmware tables? */ diff -r 6ac99b961bff -r df89656a4b94 xen/include/acpi/platform/aclinux.h --- a/xen/include/acpi/platform/aclinux.h Tue Mar 18 16:15:24 2008 +0000 +++ b/xen/include/acpi/platform/aclinux.h Tue Mar 18 19:28:09 2008 +0000 @@ -47,7 +47,7 @@ #define ACPI_USE_SYSTEM_CLIBRARY #define ACPI_USE_DO_WHILE_0 -#if 1/*def __KERNEL__*/ +#ifdef __XEN__ #include <xen/config.h> #include <xen/string.h> @@ -71,7 +71,7 @@ /* Full namespace pathname length limit - arbitrary */ #define ACPI_PATHNAME_MAX 256 -#else /* !__KERNEL__ */ +#else /* !__XEN__ */ #include <stdarg.h> #include <string.h> @@ -95,7 +95,7 @@ #endif #define ACPI_FLUSH_CPU_CACHE() -#endif /* __KERNEL__ */ +#endif /* __XEN__ */ /* Linux uses GCC */ _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |