diff options
author | Philip Prindeville <philipp@redfish-solutions.com> | 2023-04-07 13:29:42 -0600 |
---|---|---|
committer | Philip Prindeville <philipp@redfish-solutions.com> | 2023-04-07 13:30:40 -0600 |
commit | 934d3538f7b95eb13e71fe6e55c914605a5fad73 (patch) | |
tree | df8c9d5770565043efb936f61f6efa7d3b196be2 | |
parent | 2c755759dfabf5414f38b12914677c871e744824 (diff) |
acpica-unix: Update to 20230331
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
6 files changed, 33 insertions, 148 deletions
diff --git a/utils/acpica-unix/Makefile b/utils/acpica-unix/Makefile index 10e5a4c1d..fd5a11ce3 100644 --- a/utils/acpica-unix/Makefile +++ b/utils/acpica-unix/Makefile @@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=acpica-unix -PKG_VERSION:=20221020 -PKG_RELEASE:=2 +PKG_VERSION:=20230331 +PKG_RELEASE:=1 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar_0.gz +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_CAT:=gzip -dc PKG_SOURCE_URL:=https://acpica.org/sites/$(patsubst %-unix,%,$(PKG_NAME))/files/ -PKG_HASH:=33a2e394aca0ca57d4018afe3da340dfad5eb45b1b9300e81dd595fda07cf1c5 +PKG_HASH:=0c5d695d605aaa61709f3c63f57a1a99b8902291723998446b0813b57ac310e2 PKG_MAINTAINER:=Philip Prindeville <philipp@redfish-solutions.com> PKG_LICENSE:=GPL-2.0 diff --git a/utils/acpica-unix/patches/0001-ACPI_CAST_PTR-cast-through-void.patch b/utils/acpica-unix/patches/0001-ACPI_CAST_PTR-cast-through-void.patch deleted file mode 100644 index 71510df53..000000000 --- a/utils/acpica-unix/patches/0001-ACPI_CAST_PTR-cast-through-void.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 0f814783ef9ed3a50e15cab08579218ec45b4640 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= <thomas@t-8ch.de> -Date: Sat, 21 May 2022 12:15:16 +0200 -Subject: [PATCH 1/3] ACPI_CAST_PTR: cast through "void *" - -Not all pointer are castable to integers directly and ACPI_UINTPTR_T is -not guaranteed to be "void *". ---- - source/include/actypes.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/source/include/actypes.h -+++ b/source/include/actypes.h -@@ -649,7 +649,7 @@ typedef UINT64 - - /* Pointer manipulation */ - --#define ACPI_CAST_PTR(t, p) ((t *) (ACPI_UINTPTR_T) (p)) -+#define ACPI_CAST_PTR(t, p) ((t *) (ACPI_UINTPTR_T) (void *) (p)) - #define ACPI_CAST_INDIRECT_PTR(t, p) ((t **) (ACPI_UINTPTR_T) (p)) - #define ACPI_ADD_PTR(t, a, b) ACPI_CAST_PTR (t, (ACPI_CAST_PTR (UINT8, (a)) + (ACPI_SIZE)(b))) - #define ACPI_SUB_PTR(t, a, b) ACPI_CAST_PTR (t, (ACPI_CAST_PTR (UINT8, (a)) - (ACPI_SIZE)(b))) diff --git a/utils/acpica-unix/patches/0002-Linux-non-kernel-Use-use-uintptr_t-for-ACPI_UINTPTR_.patch b/utils/acpica-unix/patches/0002-Linux-non-kernel-Use-use-uintptr_t-for-ACPI_UINTPTR_.patch deleted file mode 100644 index 92fb3cdb6..000000000 --- a/utils/acpica-unix/patches/0002-Linux-non-kernel-Use-use-uintptr_t-for-ACPI_UINTPTR_.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 6b7a78c41c04772a30923c8c0ba71770d55ac815 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= <thomas@t-8ch.de> -Date: Sat, 21 May 2022 12:17:14 +0200 -Subject: [PATCH 2/3] Linux non-kernel: Use use uintptr_t for ACPI_UINTPTR_T - ---- - source/include/platform/aclinux.h | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - ---- a/source/include/platform/aclinux.h -+++ b/source/include/platform/aclinux.h -@@ -168,6 +168,8 @@ - #define ACPI_USE_DO_WHILE_0 - #define ACPI_IGNORE_PACKAGE_RESOLUTION_ERRORS - -+#define ACPI_UINTPTR_T uintptr_t -+ - - #ifdef __KERNEL__ - -@@ -252,8 +254,6 @@ - #define ACPI_SPINLOCK spinlock_t * - #define ACPI_CPU_FLAGS unsigned long - --#define ACPI_UINTPTR_T uintptr_t -- - #define ACPI_TO_INTEGER(p) ((uintptr_t)(p)) - #define ACPI_OFFSET(d, f) offsetof(d, f) - -@@ -311,6 +311,7 @@ - - #ifdef ACPI_USE_STANDARD_HEADERS - #include <unistd.h> -+#include <stdint.h> - #endif - - /* Define/disable kernel-specific declarators */ diff --git a/utils/acpica-unix/patches/0003-debug-use-UINT_PTR_T-to-store-stack-boundaries.patch b/utils/acpica-unix/patches/0003-debug-use-UINT_PTR_T-to-store-stack-boundaries.patch deleted file mode 100644 index b0c1bef6e..000000000 --- a/utils/acpica-unix/patches/0003-debug-use-UINT_PTR_T-to-store-stack-boundaries.patch +++ /dev/null @@ -1,85 +0,0 @@ -From 2185f7d5d7a5650dbcb6a05e9de41f340cd3b865 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= <thomas@t-8ch.de> -Date: Sat, 21 May 2022 12:17:58 +0200 -Subject: [PATCH 3/3] debug: use UINT_PTR_T to store stack boundaries - -GCC12 complains about storing invalid pointers, store them as integers -instead. - -obj/acpiexec ../../../source/components/utilities/utdebug.c -../../../source/components/utilities/utdebug.c: In function 'AcpiUtInitStackPtrTrace': -../../../source/components/utilities/utdebug.c:188:31: error: storing the address of local variable 'CurrentSp' in 'AcpiGbl_EntryStackPointer' [-Werror=dangling-pointer=] - 188 | AcpiGbl_EntryStackPointer = &CurrentSp; - | ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~ -../../../source/components/utilities/utdebug.c:185:29: note: 'CurrentSp' declared here - 185 | ACPI_SIZE CurrentSp; - | ^~~~~~~~~ - -Fixes #771 ---- - source/components/debugger/dbstats.c | 4 ++-- - source/components/utilities/utdebug.c | 6 +++--- - source/components/utilities/utinit.c | 2 +- - source/include/acglobal.h | 4 ++-- - 4 files changed, 8 insertions(+), 8 deletions(-) - ---- a/source/components/debugger/dbstats.c -+++ b/source/components/debugger/dbstats.c -@@ -647,8 +647,8 @@ AcpiDbDisplayStatistics ( - AcpiGbl_EntryStackPointer, AcpiGbl_LowestStackPointer); - - AcpiOsPrintf ("\nSubsystem Stack Usage:\n\n"); -- AcpiOsPrintf ("Entry Stack Pointer %p\n", AcpiGbl_EntryStackPointer); -- AcpiOsPrintf ("Lowest Stack Pointer %p\n", AcpiGbl_LowestStackPointer); -+ AcpiOsPrintf ("Entry Stack Pointer %p\n", ACPI_TO_POINTER(AcpiGbl_EntryStackPointer)); -+ AcpiOsPrintf ("Lowest Stack Pointer %p\n", ACPI_TO_POINTER(AcpiGbl_LowestStackPointer)); - AcpiOsPrintf ("Stack Use %X (%u)\n", Temp, Temp); - AcpiOsPrintf ("Deepest Procedure Nesting %u\n", AcpiGbl_DeepestNesting); - #endif ---- a/source/components/utilities/utdebug.c -+++ b/source/components/utilities/utdebug.c -@@ -185,7 +185,7 @@ AcpiUtInitStackPtrTrace ( - ACPI_SIZE CurrentSp; - - -- AcpiGbl_EntryStackPointer = &CurrentSp; -+ AcpiGbl_EntryStackPointer = ACPI_TO_INTEGER(&CurrentSp); - } - - -@@ -208,9 +208,9 @@ AcpiUtTrackStackPtr ( - ACPI_SIZE CurrentSp; - - -- if (&CurrentSp < AcpiGbl_LowestStackPointer) -+ if (ACPI_TO_INTEGER(&CurrentSp) < AcpiGbl_LowestStackPointer) - { -- AcpiGbl_LowestStackPointer = &CurrentSp; -+ AcpiGbl_LowestStackPointer = ACPI_TO_INTEGER(&CurrentSp); - } - - if (AcpiGbl_NestingLevel > AcpiGbl_DeepestNesting) ---- a/source/components/utilities/utinit.c -+++ b/source/components/utilities/utinit.c -@@ -359,7 +359,7 @@ AcpiUtInitGlobals ( - #endif - - #ifdef ACPI_DEBUG_OUTPUT -- AcpiGbl_LowestStackPointer = ACPI_CAST_PTR (ACPI_SIZE, ACPI_SIZE_MAX); -+ AcpiGbl_LowestStackPointer = ACPI_SIZE_MAX; - #endif - - #ifdef ACPI_DBG_TRACK_ALLOCATIONS ---- a/source/include/acglobal.h -+++ b/source/include/acglobal.h -@@ -332,8 +332,8 @@ extern const ACPI_PREDEFINED_NAMES - ACPI_GLOBAL (UINT32, AcpiGbl_CurrentNodeCount); - ACPI_GLOBAL (UINT32, AcpiGbl_CurrentNodeSize); - ACPI_GLOBAL (UINT32, AcpiGbl_MaxConcurrentNodeCount); --ACPI_GLOBAL (ACPI_SIZE *, AcpiGbl_EntryStackPointer); --ACPI_GLOBAL (ACPI_SIZE *, AcpiGbl_LowestStackPointer); -+ACPI_GLOBAL (ACPI_UINTPTR_T, AcpiGbl_EntryStackPointer); -+ACPI_GLOBAL (ACPI_UINTPTR_T, AcpiGbl_LowestStackPointer); - ACPI_GLOBAL (UINT32, AcpiGbl_DeepestNesting); - ACPI_INIT_GLOBAL (UINT32, AcpiGbl_NestingLevel, 0); - #endif diff --git a/utils/acpica-unix/patches/0004-need-stdint.h-for-uintptr_t.patch b/utils/acpica-unix/patches/0004-need-stdint.h-for-uintptr_t.patch new file mode 100644 index 000000000..c137560e3 --- /dev/null +++ b/utils/acpica-unix/patches/0004-need-stdint.h-for-uintptr_t.patch @@ -0,0 +1,13 @@ +We use the type uintptr_t but we don't directly include the header +file <stdint.h> from which it comes. + +--- a/source/include/platform/aclinux.h ++++ b/source/include/platform/aclinux.h +@@ -312,6 +312,7 @@ + #ifdef ACPI_USE_STANDARD_HEADERS + #include <stddef.h> + #include <unistd.h> ++#include <stdint.h> + + #define ACPI_OFFSET(d, f) offsetof(d, f) + #endif diff --git a/utils/acpica-unix/patches/0005-pragma-dangling-pointer-CurrentSp.patch b/utils/acpica-unix/patches/0005-pragma-dangling-pointer-CurrentSp.patch new file mode 100644 index 000000000..cd903238f --- /dev/null +++ b/utils/acpica-unix/patches/0005-pragma-dangling-pointer-CurrentSp.patch @@ -0,0 +1,16 @@ +Storing the address of an ephemeral variable into a persistent pointer +is flagged by GCC 12 as a dangling-pointer error. + +--- a/source/components/utilities/utdebug.c ++++ b/source/components/utilities/utdebug.c +@@ -185,7 +185,10 @@ AcpiUtInitStackPtrTrace ( + ACPI_SIZE CurrentSp; + + ++#pragma GCC diagnostic push ++#pragma GCC diagnostic ignored "-Wdangling-pointer=" + AcpiGbl_EntryStackPointer = &CurrentSp; ++#pragma GCC diagnostic pop + } + + |