diff mbox series

[v2,23/39] acpi: Drop code for missing XSDT from acpi_write_rsdp()

Message ID 20200308214442.v2.23.I4566efe7db4c618499115f6973d851e0aa502da9@changeid
State Superseded
Headers show
Series dm: Add programmatic generation of ACPI tables (part A) | expand

Commit Message

Simon Glass March 9, 2020, 3:44 a.m. UTC
We don't actually support tables without an XSDT so we can drop this dead
code.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

Changes in v2: None

 arch/x86/lib/acpi_table.c | 15 ++-------------
 1 file changed, 2 insertions(+), 13 deletions(-)

Comments

Wolfgang Wallner March 11, 2020, 2:34 p.m. UTC | #1
-----"Simon Glass" <sjg at chromium.org> schrieb: -----
> 
> We don't actually support tables without an XSDT so we can drop this dead
> code.
> 
> Signed-off-by: Simon Glass <sjg at chromium.org>
> ---
> 
> Changes in v2: None
> 
>  arch/x86/lib/acpi_table.c | 15 ++-------------
>  1 file changed, 2 insertions(+), 13 deletions(-)

Reviewed-by: Wolfgang Wallner <wolfgang.wallner at br-automation.com>
diff mbox series

Patch

diff --git a/arch/x86/lib/acpi_table.c b/arch/x86/lib/acpi_table.c
index 964f10a7cb..0757ac3431 100644
--- a/arch/x86/lib/acpi_table.c
+++ b/arch/x86/lib/acpi_table.c
@@ -42,19 +42,8 @@  static void acpi_write_rsdp(struct acpi_rsdp *rsdp, struct acpi_rsdt *rsdt,
 	rsdp->length = sizeof(struct acpi_rsdp);
 	rsdp->rsdt_address = (u32)rsdt;
 
-	/*
-	 * Revision: ACPI 1.0: 0, ACPI 2.0/3.0/4.0: 2
-	 *
-	 * Some OSes expect an XSDT to be present for RSD PTR revisions >= 2.
-	 * If we don't have an ACPI XSDT, force ACPI 1.0 (and thus RSD PTR
-	 * revision 0)
-	 */
-	if (xsdt == NULL) {
-		rsdp->revision = ACPI_RSDP_REV_ACPI_1_0;
-	} else {
-		rsdp->xsdt_address = (u64)(u32)xsdt;
-		rsdp->revision = ACPI_RSDP_REV_ACPI_2_0;
-	}
+	rsdp->xsdt_address = (u64)(u32)xsdt;
+	rsdp->revision = ACPI_RSDP_REV_ACPI_2_0;
 
 	/* Calculate checksums */
 	rsdp->checksum = table_compute_checksum((void *)rsdp, 20);