[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] xen/acpi: disentangle ACPI enumerations.



# HG changeset patch
# User Tim Deegan <Tim.Deegan@xxxxxxxxxx>
# Date 1302185207 -3600
# Node ID 42aff5c76897ca5ea8692e8644633728611d577e
# Parent  8c119c5b0f95c8b1dbf5928e5fe60b38d5ea7c44
xen/acpi: disentangle ACPI enumerations.

There are two sets of ACPI table enums and structs, and clang
complains about implicit casts between them.  It would be much better
to remove one entire set of ACPI definitions but for now just use the
right enum for each interface.

Signed-off-by: Tim Deegan <Tim.Deegan@xxxxxxxxxx>
Acked-by: Keir Fraser <keir@xxxxxxx>
---


diff -r 8c119c5b0f95 -r 42aff5c76897 xen/arch/x86/acpi/boot.c
--- a/xen/arch/x86/acpi/boot.c  Thu Apr 07 15:06:06 2011 +0100
+++ b/xen/arch/x86/acpi/boot.c  Thu Apr 07 15:06:47 2011 +0100
@@ -431,7 +431,7 @@
         */
 
        count =
-           acpi_table_parse_madt(ACPI_MADT_LAPIC_ADDR_OVR,
+           acpi_table_parse_madt(ACPI_MADT_TYPE_LOCAL_APIC_OVERRIDE,
                                  acpi_parse_lapic_addr_ovr, 0);
        if (count < 0) {
                printk(KERN_ERR PREFIX
@@ -442,10 +442,10 @@
        mp_register_lapic_address(acpi_lapic_addr);
 
        BUILD_BUG_ON(MAX_APICS != MAX_LOCAL_APIC);
-       count = acpi_table_parse_madt(ACPI_MADT_LAPIC, acpi_parse_lapic,
-                                     MAX_APICS);
-       x2count = acpi_table_parse_madt(ACPI_MADT_X2APIC, acpi_parse_x2apic,
-                                     MAX_APICS);
+       count = acpi_table_parse_madt(ACPI_MADT_TYPE_LOCAL_APIC, 
+                                      acpi_parse_lapic, MAX_APICS);
+       x2count = acpi_table_parse_madt(ACPI_MADT_TYPE_LOCAL_X2APIC, 
+                                        acpi_parse_x2apic, MAX_APICS);
        if (!count && !x2count) {
                printk(KERN_ERR PREFIX "No LAPIC entries present\n");
                /* TBD: Cleanup to allow fallback to MPS */
@@ -457,9 +457,10 @@
        }
 
        count =
-           acpi_table_parse_madt(ACPI_MADT_LAPIC_NMI, acpi_parse_lapic_nmi, 0);
+           acpi_table_parse_madt(ACPI_MADT_TYPE_LOCAL_APIC_NMI, 
+                                  acpi_parse_lapic_nmi, 0);
        x2count =
-           acpi_table_parse_madt(ACPI_MADT_X2APIC_NMI,
+           acpi_table_parse_madt(ACPI_MADT_TYPE_LOCAL_X2APIC_NMI,
                                  acpi_parse_x2apic_nmi, 0);
        if (count < 0 || x2count < 0) {
                printk(KERN_ERR PREFIX "Error parsing LAPIC NMI entry\n");
@@ -502,7 +503,7 @@
        }
 
        count =
-           acpi_table_parse_madt(ACPI_MADT_IOAPIC, acpi_parse_ioapic,
+           acpi_table_parse_madt(ACPI_MADT_TYPE_IO_APIC, acpi_parse_ioapic,
                                  MAX_IO_APICS);
        if (!count) {
                printk(KERN_ERR PREFIX "No IOAPIC entries present\n");
@@ -513,8 +514,8 @@
        }
 
        count =
-           acpi_table_parse_madt(ACPI_MADT_INT_SRC_OVR, acpi_parse_int_src_ovr,
-                                 MAX_IRQ_SOURCES);
+           acpi_table_parse_madt(ACPI_MADT_TYPE_INTERRUPT_OVERRIDE,
+                                  acpi_parse_int_src_ovr, MAX_IRQ_SOURCES);
        if (count < 0) {
                printk(KERN_ERR PREFIX
                       "Error parsing interrupt source overrides entry\n");
@@ -526,8 +527,8 @@
        mp_config_acpi_legacy_irqs();
 
        count =
-           acpi_table_parse_madt(ACPI_MADT_NMI_SRC, acpi_parse_nmi_src,
-                                 MAX_IRQ_SOURCES);
+           acpi_table_parse_madt(ACPI_MADT_TYPE_NMI_SOURCE, 
+                                  acpi_parse_nmi_src, MAX_IRQ_SOURCES);
        if (count < 0) {
                printk(KERN_ERR PREFIX "Error parsing NMI SRC entry\n");
                /* TBD: Cleanup to allow fallback to MPS */
diff -r 8c119c5b0f95 -r 42aff5c76897 xen/drivers/acpi/numa.c
--- a/xen/drivers/acpi/numa.c   Thu Apr 07 15:06:06 2011 +0100
+++ b/xen/drivers/acpi/numa.c   Thu Apr 07 15:06:47 2011 +0100
@@ -206,7 +206,7 @@
 {
        /* SRAT: Static Resource Affinity Table */
        if (!acpi_table_parse(ACPI_SIG_SRAT, acpi_parse_srat)) {
-               acpi_table_parse_srat(ACPI_SRAT_TYPE_X2APIC_CPU_AFFINITY,
+               acpi_table_parse_srat(ACPI_SRAT_X2APIC_AFFINITY,
                                           acpi_parse_x2apic_affinity, NR_CPUS);
                acpi_table_parse_srat(ACPI_SRAT_PROCESSOR_AFFINITY,
                                               acpi_parse_processor_affinity,
diff -r 8c119c5b0f95 -r 42aff5c76897 xen/include/xen/acpi.h
--- a/xen/include/xen/acpi.h    Thu Apr 07 15:06:06 2011 +0100
+++ b/xen/include/xen/acpi.h    Thu Apr 07 15:06:47 2011 +0100
@@ -183,6 +183,7 @@
 enum acpi_srat_entry_id {
        ACPI_SRAT_PROCESSOR_AFFINITY = 0,
        ACPI_SRAT_MEMORY_AFFINITY,
+       ACPI_SRAT_X2APIC_AFFINITY,
        ACPI_SRAT_ENTRY_COUNT
 };
 

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.