Blame SOURCES/ptr-cast.patch

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