Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37432917
en ru br
ALT Linux repos
S:20230628-alt1

Group :: System/Kernel and hardware
RPM: acpica

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Patch: 0026-Support-PDTT-in-a-big-endian-world.patch
Download


From afaa9043357a3b8adbaa1ea389a62da48f561896 Mon Sep 17 00:00:00 2001
From: Al Stone <ahs3@redhat.com>
Date: Fri, 25 Sep 2020 17:03:05 -0600
Subject: [PATCH 26/40] Support PDTT in a big-endian world
Signed-off-by: Al Stone <ahs3@redhat.com>
---
 source/common/dmtbdump2.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
Index: acpica-unix2-20200925/source/common/dmtbdump2.c
===================================================================
--- acpica-unix2-20200925.orig/source/common/dmtbdump2.c
+++ acpica-unix2-20200925/source/common/dmtbdump2.c
@@ -1385,13 +1385,13 @@ AcpiDmDumpPdtt (
 {
     ACPI_STATUS             Status;
     ACPI_PDTT_CHANNEL       *Subtable;
-    UINT32                  Length = Table->Length;
+    UINT32                  TableLength = AcpiUtReadUint32(&Table->Length);
     UINT32                  Offset = sizeof (ACPI_TABLE_PDTT);
 
 
     /* Main table */
 
-    Status = AcpiDmDumpTable (Length, 0, Table, 0, AcpiDmTableInfoPdtt);
+    Status = AcpiDmDumpTable (TableLength, 0, Table, 0, AcpiDmTableInfoPdtt);
     if (ACPI_FAILURE (Status))
     {
         return;
@@ -1400,10 +1400,10 @@ AcpiDmDumpPdtt (
     /* Subtables. Currently there is only one type, but can be multiples */
 
     Subtable = ACPI_ADD_PTR (ACPI_PDTT_CHANNEL, Table, Offset);
-    while (Offset < Table->Length)
+    while (Offset < TableLength)
     {
         AcpiOsPrintf ("\n");
-        Status = AcpiDmDumpTable (Length, Offset, Subtable,
+        Status = AcpiDmDumpTable (TableLength, Offset, Subtable,
             sizeof (ACPI_PDTT_CHANNEL), AcpiDmTableInfoPdtt0);
         if (ACPI_FAILURE (Status))
         {
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin