WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] xen/acpi: disentangle ACPI enumerations

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] xen/acpi: disentangle ACPI enumerations
From: Tim Deegan <Tim.Deegan@xxxxxxxxxx>
Date: Thu, 7 Apr 2011 12:25:45 +0100
Delivery-date: Thu, 07 Apr 2011 04:28:14 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mercurial-patchbomb/1.6.4
# HG changeset patch
# User Tim Deegan <Tim.Deegan@xxxxxxxxxx>
# Date 1302175137 -3600
# Node ID a70a04e1447fedc781cfedcbea5fbeffc97690de
# Parent  5898b3639245bf924b9b7921a3c37f6480fc73f4
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.

Singned-off-by: Tim Deegan <Tim.Deegan@xxxxxxxxxx>

diff -r 5898b3639245 -r a70a04e1447f xen/arch/x86/acpi/boot.c
--- a/xen/arch/x86/acpi/boot.c  Thu Apr 07 12:18:00 2011 +0100
+++ b/xen/arch/x86/acpi/boot.c  Thu Apr 07 12:18:57 2011 +0100
@@ -431,7 +431,7 @@ static int __init acpi_parse_madt_lapic_
         */
 
        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 @@ static int __init acpi_parse_madt_lapic_
        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 @@ static int __init acpi_parse_madt_lapic_
        }
 
        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 @@ static int __init acpi_parse_madt_ioapic
        }
 
        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 @@ static int __init acpi_parse_madt_ioapic
        }
 
        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 @@ static int __init acpi_parse_madt_ioapic
        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 5898b3639245 -r a70a04e1447f xen/drivers/acpi/numa.c
--- a/xen/drivers/acpi/numa.c   Thu Apr 07 12:18:00 2011 +0100
+++ b/xen/drivers/acpi/numa.c   Thu Apr 07 12:18:57 2011 +0100
@@ -206,7 +206,7 @@ int __init acpi_numa_init(void)
 {
        /* 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 5898b3639245 -r a70a04e1447f xen/include/xen/acpi.h
--- a/xen/include/xen/acpi.h    Thu Apr 07 12:18:00 2011 +0100
+++ b/xen/include/xen/acpi.h    Thu Apr 07 12:18:57 2011 +0100
@@ -183,6 +183,7 @@ struct acpi_table_sbf
 enum acpi_srat_entry_id {
        ACPI_SRAT_PROCESSOR_AFFINITY = 0,
        ACPI_SRAT_MEMORY_AFFINITY,
+       ACPI_SRAT_X2APIC_AFFINITY,
        ACPI_SRAT_ENTRY_COUNT
 };
 

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] xen/acpi: disentangle ACPI enumerations, Tim Deegan <=