Blame SOURCES/ptr-cast.patch

4496ab
diff -Naur acpica-unix2-20180209.orig/source/components/tables/tbutils.c acpica-unix2-20180209/source/components/tables/tbutils.c
4496ab
--- acpica-unix2-20180209.orig/source/components/tables/tbutils.c	2018-03-15 16:47:21.831526264 -0600
4496ab
+++ acpica-unix2-20180209/source/components/tables/tbutils.c	2018-03-15 16:58:20.030097284 -0600
4496ab
@@ -238,9 +238,11 @@
4496ab
          * 64-bit platform, XSDT: Move (unaligned) 64-bit to local,
4496ab
          *  return 64-bit
4496ab
          */
4496ab
-	Address64 = (UINT64) TableEntry;
4496ab
 
4496ab
 #if ACPI_MACHINE_WIDTH == 32
4496ab
+	UINT32 Tmp32 = (UINT32) TableEntry;
4496ab
+
4496ab
+	Address64 = (UINT64) Tmp32;
4496ab
         if (Address64 > ACPI_UINT32_MAX)
4496ab
         {
4496ab
             /* Will truncate 64-bit address to 32 bits, issue warning */
4496ab
@@ -250,9 +252,15 @@
4496ab
                 " truncating",
4496ab
                 ACPI_FORMAT_UINT64 (Address64)));
4496ab
         }
4496ab
-#endif
4496ab
+
4496ab
+        return ((ACPI_PHYSICAL_ADDRESS) (*ACPI_CAST_PTR (
4496ab
+            UINT32, TableEntry)));
4496ab
+#else
4496ab
+	Address64 = (UINT64) TableEntry;
4496ab
+
4496ab
         return ((ACPI_PHYSICAL_ADDRESS) (*ACPI_CAST_PTR (
4496ab
             UINT64, Address64)));
4496ab
+#endif
4496ab
     }
4496ab
 }
4496ab
 
4496ab
diff -Naur acpica-unix2-20180209.orig/source/compiler/aslparseop.c acpica-unix2-20180209/source/compiler/aslparseop.c
4496ab
--- acpica-unix2-20180209.orig/source/compiler/aslparseop.c	2018-03-15 17:20:09.844338074 -0600
4496ab
+++ acpica-unix2-20180209/source/compiler/aslparseop.c	2018-03-15 17:28:19.570800797 -0600
4496ab
@@ -287,7 +287,11 @@
4496ab
         ParseOpcode == PARSEOP_NAMESEG ||
4496ab
         ParseOpcode == PARSEOP_STRING_LITERAL)
4496ab
     {
4496ab
+#if ACPI_MACHINE_WIDTH == 32
4496ab
+        Op->Asl.Value.String = (char *) (UINT32) Value;
4496ab
+#else
4496ab
         Op->Asl.Value.String = (char *) Value;
4496ab
+#endif
4496ab
     }
4496ab
     else
4496ab
     {