Blame SOURCES/0037-Support-LPIT-in-a-big-endian-world.patch

9897bb
From d10bfd67b5352ff5587e06fc1f82b896bab49614 Mon Sep 17 00:00:00 2001
9897bb
From: Al Stone <ahs3@redhat.com>
9897bb
Date: Mon, 28 Sep 2020 16:49:30 -0600
9897bb
Subject: [PATCH 37/45] Support LPIT in a big-endian world
9897bb
9897bb
Signed-off-by: Al Stone <ahs3@redhat.com>
9897bb
---
9897bb
 source/common/dmtbdump2.c | 8 ++++----
9897bb
 1 file changed, 4 insertions(+), 4 deletions(-)
9897bb
9897bb
Index: acpica-unix2-20210604/source/common/dmtbdump2.c
9897bb
===================================================================
9897bb
--- acpica-unix2-20210604.orig/source/common/dmtbdump2.c
9897bb
+++ acpica-unix2-20210604/source/common/dmtbdump2.c
9897bb
@@ -690,7 +690,7 @@ AcpiDmDumpLpit (
9897bb
 {
9897bb
     ACPI_STATUS             Status;
9897bb
     ACPI_LPIT_HEADER        *Subtable;
9897bb
-    UINT32                  Length = Table->Length;
9897bb
+    UINT32                  TableLength = AcpiUtReadUint32 (&Table->Length);
9897bb
     UINT32                  Offset = sizeof (ACPI_TABLE_LPIT);
9897bb
     ACPI_DMTABLE_INFO       *InfoTable;
9897bb
     UINT32                  SubtableLength;
9897bb
@@ -699,11 +699,11 @@ AcpiDmDumpLpit (
9897bb
     /* Subtables */
9897bb
 
9897bb
     Subtable = ACPI_ADD_PTR (ACPI_LPIT_HEADER, Table, Offset);
9897bb
-    while (Offset < Table->Length)
9897bb
+    while (Offset < TableLength)
9897bb
     {
9897bb
         /* Common subtable header */
9897bb
 
9897bb
-        Status = AcpiDmDumpTable (Length, Offset, Subtable,
9897bb
+        Status = AcpiDmDumpTable (TableLength, Offset, Subtable,
9897bb
             sizeof (ACPI_LPIT_HEADER), AcpiDmTableInfoLpitHdr);
9897bb
         if (ACPI_FAILURE (Status))
9897bb
         {
9897bb
@@ -727,7 +727,7 @@ AcpiDmDumpLpit (
9897bb
             return;
9897bb
         }
9897bb
 
9897bb
-        Status = AcpiDmDumpTable (Length, Offset, Subtable,
9897bb
+        Status = AcpiDmDumpTable (TableLength, Offset, Subtable,
9897bb
             SubtableLength, InfoTable);
9897bb
         if (ACPI_FAILURE (Status))
9897bb
         {