Blame SOURCES/0029-Support-PDTT-in-a-big-endian-world.patch

214d7a
From 253fe3545e7d4eaa9cb93c771c9619f410109a02 Mon Sep 17 00:00:00 2001
214d7a
From: Al Stone <ahs3@redhat.com>
214d7a
Date: Fri, 25 Sep 2020 17:03:05 -0600
214d7a
Subject: [PATCH 29/45] Support PDTT 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
@@ -1498,13 +1498,13 @@ AcpiDmDumpPdtt (
214d7a
 {
214d7a
     ACPI_STATUS             Status;
214d7a
     ACPI_PDTT_CHANNEL       *Subtable;
214d7a
-    UINT32                  Length = Table->Length;
214d7a
+    UINT32                  TableLength = AcpiUtReadUint32 (&Table->Length);
214d7a
     UINT32                  Offset = sizeof (ACPI_TABLE_PDTT);
214d7a
 
214d7a
 
214d7a
     /* Main table */
214d7a
 
214d7a
-    Status = AcpiDmDumpTable (Length, 0, Table, 0, AcpiDmTableInfoPdtt);
214d7a
+    Status = AcpiDmDumpTable (TableLength, 0, Table, 0, AcpiDmTableInfoPdtt);
214d7a
     if (ACPI_FAILURE (Status))
214d7a
     {
214d7a
         return;
214d7a
@@ -1513,10 +1513,10 @@ AcpiDmDumpPdtt (
214d7a
     /* Subtables. Currently there is only one type, but can be multiples */
214d7a
 
214d7a
     Subtable = ACPI_ADD_PTR (ACPI_PDTT_CHANNEL, Table, Offset);
214d7a
-    while (Offset < Table->Length)
214d7a
+    while (Offset < TableLength)
214d7a
     {
214d7a
         AcpiOsPrintf ("\n");
214d7a
-        Status = AcpiDmDumpTable (Length, Offset, Subtable,
214d7a
+        Status = AcpiDmDumpTable (TableLength, Offset, Subtable,
214d7a
             sizeof (ACPI_PDTT_CHANNEL), AcpiDmTableInfoPdtt0);
214d7a
         if (ACPI_FAILURE (Status))
214d7a
         {