Skip to contentSkip to conversation

x86/ACPI: fix error indication from acpi_parse_madt_lapic_entries()

PATCH In review Jan Beulich 2 participants 2 messages Sep 18, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86/ACPI: fix error indication from acpi_parse_madt_lapic_entries()

If the legacy APIC invocation of acpi_table_parse_madt() succeeds but the x2APIC counterpart fails, this is regarded as failure by the function, yet its return value would indicate success.

xen/arch/x86/acpi/boot.c +2 -2
@@ -452,7 +452,7 @@ static int __init acpi_parse_madt_lapic_
 	} else if (count < 0 || x2count < 0) {
 		printk(KERN_ERR PREFIX "Error parsing LAPIC entry\n");
 		/* TBD: Cleanup to allow fallback to MPS */
-		return count;
+		return count < 0 ? count : x2count;
 	}
 
 	count =
@@ -464,7 +464,7 @@ static int __init acpi_parse_madt_lapic_
 	if (count < 0 || x2count < 0) {
 		printk(KERN_ERR PREFIX "Error parsing LAPIC NMI entry\n");
 		/* TBD: Cleanup to allow fallback to MPS */
-		return count;
+		return count < 0 ? count : x2count;
 	}
 	return 0;
 }
Acked-by on v1 1/1
#1 lore raw
Quoted 5 lines · Jan Beulich

If the legacy APIC invocation of acpi_table_parse_madt() succeeds but the x2APIC counterpart fails, this is regarded as failure by the function, yet its return value would indicate success.

Quoted 28 lines
xen/arch/x86/acpi/boot.c +1 -1
@@ -452,7 +452,7 @@ static int __init acpi_parse_madt_lapic_
 } else if (count < 0 || x2count < 0) {
 printk(KERN_ERR PREFIX "Error parsing LAPIC entry\n");
 /* TBD: Cleanup to allow fallback to MPS */
-  return count;
+  return count < 0 ? count : x2count;
 }
 

count =

xen/arch/x86/acpi/boot.c +1 -1
@@ -464,7 +464,7 @@ static int __init acpi_parse_madt_lapic_
 if (count < 0 || x2count < 0) {
 printk(KERN_ERR PREFIX "Error parsing LAPIC NMI entry\n");
 /* TBD: Cleanup to allow fallback to MPS */
-  return count;
+  return count < 0 ? count : x2count;
 }
 return 0;
 }

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel