mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
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@citrix.com> Acked-by: Keir Fraser <keir@xen.org>
This commit is contained in:
1 parent
679a2b9021
commit
756f04dbee
3 files changed
+15
-13
No files matched your search
+13
-12
@@ -431,7 +431,7 @@ static int __init acpi_parse_madt_lapic_entries(void)
|
||||
*/
|
||||
|
||||
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_entries(void)
|
||||
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_entries(void)
|
||||
}
|
||||
|
||||
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_entries(void)
|
||||
}
|
||||
|
||||
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_entries(void)
|
||||
}
|
||||
|
||||
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_entries(void)
|
||||
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 */
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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
|
||||
};
|
||||
|
||||
|
||||