Message ID | 1444857985-28844-3-git-send-email-al.stone@linaro.org |
---|---|
State | New |
Headers | show |
On Wednesday, October 14, 2015 03:26:23 PM Al Stone wrote: > Looking across multiple versions of the ACPI specification, certain > versions introduce new revision numbers for the FADT and/or MADT > tables. So, for example, an FADT indicating it is revision 4 should > not be paired with an MADT revision of anything less than 2. > > However, there are systems out there that do not update the revision > fields in the FADT and MADT tables as they should. So, for arm64, we > can be stricter in complying with the specification, but we need to > relax the checking for legacy systems. > > Signed-off-by: Al Stone <al.stone@linaro.org> > --- > drivers/acpi/tables.c | 14 +++++++++++--- > 1 file changed, 11 insertions(+), 3 deletions(-) > > diff --git a/drivers/acpi/tables.c b/drivers/acpi/tables.c > index e5cfd72..3b5ddfb 100644 > --- a/drivers/acpi/tables.c > +++ b/drivers/acpi/tables.c > @@ -407,9 +407,17 @@ static int __init bad_madt_entry(struct acpi_table_header *table, > ms++; > } > if (!ms->num_types) { > - pr_err("undefined version for either FADT %d.%d or MADT %d\n", > - major, minor, madt->header.revision); > - return 1; > + if (IS_ENABLED(CONFIG_ARM64)) { > + /* Enforce this stricture on arm64... */ > + pr_err("undefined version for either FADT %d.%d or MADT %d\n", > + major, minor, madt->header.revision); > + return 1; > + } else { > + /* ... but relax it on legacy systems so they boot */ > + pr_warn("undefined version for either FADT %d.%d or MADT %d\n", > + major, minor, madt->header.revision); > + return 0; Same comment as for the [1/4] applies here. > + } > } > > if (entry->type >= ms->num_types) { Thanks, Rafael
diff --git a/drivers/acpi/tables.c b/drivers/acpi/tables.c index e5cfd72..3b5ddfb 100644 --- a/drivers/acpi/tables.c +++ b/drivers/acpi/tables.c @@ -407,9 +407,17 @@ static int __init bad_madt_entry(struct acpi_table_header *table, ms++; } if (!ms->num_types) { - pr_err("undefined version for either FADT %d.%d or MADT %d\n", - major, minor, madt->header.revision); - return 1; + if (IS_ENABLED(CONFIG_ARM64)) { + /* Enforce this stricture on arm64... */ + pr_err("undefined version for either FADT %d.%d or MADT %d\n", + major, minor, madt->header.revision); + return 1; + } else { + /* ... but relax it on legacy systems so they boot */ + pr_warn("undefined version for either FADT %d.%d or MADT %d\n", + major, minor, madt->header.revision); + return 0; + } } if (entry->type >= ms->num_types) {
Looking across multiple versions of the ACPI specification, certain versions introduce new revision numbers for the FADT and/or MADT tables. So, for example, an FADT indicating it is revision 4 should not be paired with an MADT revision of anything less than 2. However, there are systems out there that do not update the revision fields in the FADT and MADT tables as they should. So, for arm64, we can be stricter in complying with the specification, but we need to relax the checking for legacy systems. Signed-off-by: Al Stone <al.stone@linaro.org> --- drivers/acpi/tables.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-)