Skip to contentSkip to conversation

Update ACPI headers to Linux 2.6.24.

PATCH Alex Williamson 1 participant 1 message Mar 18, 2008 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 11 lines · Xen staging patchbot-unstable

# HG changeset patch
# User Keir Fraser <[email protected]> # 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

---

tools/libxc/ia64/dom_fw_acpi.c +1 -0
diff -r 6ac99b961bff tools/libxc/ia64/dom_fw_acpi.c
@@ -1,4 +1,5 @@
 #include <inttypes.h>
+#include "xc_dom_ia64_util.h"
 #include <xen/acpi.h>
 
 uint8_t
tools/libxc/ia64/xc_dom_ia64_util.h +4 -0
diff -r 6ac99b961bff tools/libxc/ia64/xc_dom_ia64_util.h
@@ -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 */
xen/arch/ia64/linux-xen/setup.c +6 -5
diff -r 6ac99b961bff xen/arch/ia64/linux-xen/setup.c
@@ -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 */
xen/arch/ia64/xen/acpi.c +18 -15
diff -r 6ac99b961bff xen/arch/ia64/xen/acpi.c
@@ -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];
 		}
 	}
 
xen/arch/ia64/xen/dom_fw_common.c +46 -41

144 lines not on this page · raw message

xen/arch/ia64/xen/pcdp.c +6 -5
diff -r 6ac99b961bff xen/arch/ia64/xen/pcdp.c
@@ -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? */