On Tue, 2008-03-18 at 14:56 +0000, Xen staging patchbot-unstable wrote:
> # HG changeset patch
> # User Keir Fraser <keir.fraser@xxxxxxxxxx>
> # Date 1205852136 0
> # Node ID 13cba2e78a65f636f3b0aeb0af5a3cfd291f7c04
> # Parent 5cbfc6c24d3201ec93b722bc91350be38991c177
> Update ACPI headers to Linux 2.6.24.
> Signed-off-by: Keir Fraser
> ---
> xen/include/acpi/actbl2.h | 232 -----
> xen/arch/ia64/xen/acpi.c | 12
> xen/arch/ia64/xen/dom_fw_common.c | 18
...
This causes quite a lot of churn for ia64; perhaps commit logs for
these types of things could indicate the motivation for the update. In
any case, here's a patch that gets ia64 building again. Thanks,
Alex
Signed-off-by: Alex Williamson <alex.williamson@xxxxxx>
---
diff -r 6ac99b961bff tools/libxc/ia64/dom_fw_acpi.c
--- a/tools/libxc/ia64/dom_fw_acpi.c Tue Mar 18 16:15:24 2008 +0000
+++ b/tools/libxc/ia64/dom_fw_acpi.c Tue Mar 18 12:25:26 2008 -0600
@@ -1,4 +1,5 @@
#include <inttypes.h>
+#include "xc_dom_ia64_util.h"
#include <xen/acpi.h>
uint8_t
diff -r 6ac99b961bff tools/libxc/ia64/xc_dom_ia64_util.h
--- a/tools/libxc/ia64/xc_dom_ia64_util.h Tue Mar 18 16:15:24 2008 +0000
+++ b/tools/libxc/ia64/xc_dom_ia64_util.h Tue Mar 18 12:25:26 2008 -0600
@@ -23,4 +23,8 @@ extern int shared_info_ia64(struct xc_do
#define FW_MEM_BASE 0xff000000UL
#define FW_MEM_SIZE 0x01000000UL
+#ifdef __XEN_TOOLS__
+/* Necessary for including the acpi header chain when not in kernel context */
+typedef struct { } spinlock_t;
+#endif
#endif /* XC_IA64_DOM_IA64_UTIL_H */
diff -r 6ac99b961bff 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 12:25:26 2008 -0600
@@ -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);
+ (struct acpi_table_rsdp *)__va(tables[i].table);
}
- if (!rsdp || strncmp(rsdp->signature, RSDP_SIG, sizeof(RSDP_SIG) - 1))
+ 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 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 12:25:26 2008 -0600
@@ -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);
+ 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;
+ 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 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 12:25:26 2008 -0600
@@ -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(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, FACS_SIG, sizeof(facs->signature));
+ 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->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->checksum = generate_acpi_checksum(fadt, fadt->length);
+ 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 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 12:25:26 2008 -0600
@@ -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);
+ (struct acpi_table_rsdp *)__va(tables[i].table);
}
- if (!rsdp || strncmp(rsdp->signature, RSDP_SIG, sizeof(RSDP_SIG) - 1))
+ if (!rsdp ||
+ strncmp(rsdp->signature, ACPI_SIG_RSDP, sizeof(ACPI_SIG_RSDP) - 1))
return;
- 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;
/* Sanity check; are we still looking at HP firmware tables? */
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|