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

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