From 65082bfcb486ef06f93b7603a9045cdf0c0022e8 Mon Sep 17 00:00:00 2001 From: Lv Zheng Date: Thu, 3 Aug 2017 14:26:50 +0800 Subject: ACPICA: CLib: Add short multiply/shift support ACPICA commit 01b8f5a2350b9cc329cd8402ac8faec36fc501f5 In order to build ACPICA EFI tools with EDK-II on Windows, 64-bit multiply/shift supports are also required to be implemented. Otherwise, MSVC complains: acpidump.lib(utstrtoul64.obj) : error LNK2001: unresolved external symbol __allmul acpidump.lib(uthex.obj) : error LNK2001: unresolved external symbol __aullshr Note: 1. This patch also splits _EDK2_EFI from _GNU_EFI as they might have different math64 supports. 2. Support of gcc math64 is not included in this patch. 3. Support of EDK2 arch independent math64 is done via linking to base_lib. This patch fixes this issue. Reported by Shao Ming, fixed by Lv Zheng. For Linux kernel, this patch is a functional no-op. Link: https://github.com/acpica/acpica/commit/01b8f5a2 Tested-by: "Shao, Ming" Signed-off-by: Lv Zheng Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki --- include/acpi/actypes.h | 1 + include/acpi/platform/acgcc.h | 4 ++++ include/acpi/platform/aclinux.h | 2 ++ 3 files changed, 7 insertions(+) (limited to 'include/acpi') diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h index 0260be595d40..dc3bb153420a 100644 --- a/include/acpi/actypes.h +++ b/include/acpi/actypes.h @@ -166,6 +166,7 @@ typedef u64 acpi_physical_address; #define ACPI_SIZE_MAX ACPI_UINT64_MAX #define ACPI_USE_NATIVE_DIVIDE /* Has native 64-bit integer support */ +#define ACPI_USE_NATIVE_MATH64 /* Has native 64-bit integer support */ /* * In the case of the Itanium Processor Family (IPF), the hardware does not diff --git a/include/acpi/platform/acgcc.h b/include/acpi/platform/acgcc.h index 97a7e21cfbe0..9c8f8b79644e 100644 --- a/include/acpi/platform/acgcc.h +++ b/include/acpi/platform/acgcc.h @@ -84,4 +84,8 @@ typedef __builtin_va_list va_list; #define COMPILER_VA_MACRO 1 +/* GCC supports native multiply/shift on 32-bit platforms */ + +#define ACPI_USE_NATIVE_MATH64 + #endif /* __ACGCC_H__ */ diff --git a/include/acpi/platform/aclinux.h b/include/acpi/platform/aclinux.h index afd95f28c8f0..1b473efd9eb6 100644 --- a/include/acpi/platform/aclinux.h +++ b/include/acpi/platform/aclinux.h @@ -128,6 +128,7 @@ /* Host-dependent types and defines for in-kernel ACPICA */ #define ACPI_MACHINE_WIDTH BITS_PER_LONG +#define ACPI_USE_NATIVE_MATH64 #define ACPI_EXPORT_SYMBOL(symbol) EXPORT_SYMBOL(symbol); #define strtoul simple_strtoul @@ -216,6 +217,7 @@ #define COMPILER_DEPENDENT_INT64 long long #define COMPILER_DEPENDENT_UINT64 unsigned long long #define ACPI_USE_NATIVE_DIVIDE +#define ACPI_USE_NATIVE_MATH64 #endif #ifndef __cdecl -- cgit v1.2.3