Signed-off-by: Ashwin Chaugule ashwin.chaugule@linaro.org --- drivers/acpi/plat/arm-core.c | 57 +++++++++++++++++++++++++++++++------------- 1 file changed, 40 insertions(+), 17 deletions(-)
diff --git a/drivers/acpi/plat/arm-core.c b/drivers/acpi/plat/arm-core.c index 9704229..52865c9 100644 --- a/drivers/acpi/plat/arm-core.c +++ b/drivers/acpi/plat/arm-core.c @@ -224,24 +224,37 @@ static int __init acpi_parse_fadt(struct acpi_table_header *table)
static void __init acpi_process_madt(void) { - int error; - - if (!acpi_table_parse(ACPI_SIG_MADT, acpi_parse_madt)) { - - /* - * Parse MADT GIC cpu interface entries - */ - error = acpi_parse_madt_gic_entries(); - if (!error) { - /* - * Parse MADT GIC distributor entries - */ - acpi_parse_madt_gic_distributor_entries(); - } + int err; + + err = acpi_table_parse(ACPI_SIG_MADT, acpi_parse_madt); + if (err) { + pr_err("Failed to parse MADT\n"); + goto out_err; + } + + /* + * Parse MADT GIC cpu interface entries + */ + err = acpi_parse_madt_gic_entries(); + if (err) { + pr_err("Failed to parse GIC entries from MADT\n"); + goto out_err; + } + + /* + * Parse MADT GIC distributor entries + */ + err = acpi_parse_madt_gic_distributor_entries(); + if (err) { + pr_err("Failed to find GIC Distributor entries from MADT\n"); + goto out_err; }
pr_info("Using ACPI for processor (GIC) configuration information\n"); + return;
+out_err: + pr_err("Err processing GIC information\n"); return; }
@@ -273,20 +286,30 @@ void __init acpi_boot_table_init(void)
int __init acpi_boot_init(void) { + int err = 0; /* * If acpi_disabled, bail out */ if (acpi_disabled) return -ENODEV;
- acpi_table_parse(ACPI_SIG_FADT, acpi_parse_fadt); + err = acpi_table_parse(ACPI_SIG_FADT, acpi_parse_fadt); + if (err) { + pr_err("Failed to find FADT\n"); + goto out_err; + }
/* * Process the Multiple APIC Description Table (MADT), if present */ - acpi_process_madt(); + err = acpi_process_madt(); + if (err) { + pr_err("Failed to process MADT\n"); + goto out_err; + }
- return 0; +out_err: + return err; }
static int __init parse_acpi(char *arg)