Tim Deegan
2011-Apr-07 11:25 UTC
[Xen-devel] [PATCH] xen/acpi: disentangle ACPI enumerations
# HG changeset patch # User Tim Deegan <Tim.Deegan@citrix.com> # 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@citrix.com> 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@lists.xensource.com http://lists.xensource.com/xen-devel