[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Stable-8.2.1 18/38] util: fix build with musl libc on ppc64le
From: |
Michael Tokarev |
Subject: |
[Stable-8.2.1 18/38] util: fix build with musl libc on ppc64le |
Date: |
Thu, 18 Jan 2024 10:52:45 +0300 |
From: Natanael Copa <ncopa@alpinelinux.org>
Use PPC_FEATURE2_ISEL and PPC_FEATURE2_VEC_CRYPTO from linux headers
instead of the GNU specific PPC_FEATURE2_HAS_ISEL and
PPC_FEATURE2_HAS_VEC_CRYPTO. This fixes build with musl libc.
Cc: qemu-stable@nongnu.org
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1861
Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
Fixes: 63922f467a ("tcg/ppc: Replace HAVE_ISEL macro with a variable")
Fixes: 68f340d4cd ("tcg/ppc: Enable Altivec detection")
Message-Id: <20231219105236.7059-1-ncopa@alpinelinux.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
(cherry picked from commit 1d513e06d96697f44de4a1b85c6ff627c443e306)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
diff --git a/util/cpuinfo-ppc.c b/util/cpuinfo-ppc.c
index 1ea3db0ac8..b2d8893a06 100644
--- a/util/cpuinfo-ppc.c
+++ b/util/cpuinfo-ppc.c
@@ -6,10 +6,10 @@
#include "qemu/osdep.h"
#include "host/cpuinfo.h"
+#include <asm/cputable.h>
#ifdef CONFIG_GETAUXVAL
# include <sys/auxv.h>
#else
-# include <asm/cputable.h>
# include "elf.h"
#endif
@@ -40,7 +40,7 @@ unsigned __attribute__((constructor)) cpuinfo_init(void)
info |= CPUINFO_V2_06;
}
- if (hwcap2 & PPC_FEATURE2_HAS_ISEL) {
+ if (hwcap2 & PPC_FEATURE2_ISEL) {
info |= CPUINFO_ISEL;
}
if (hwcap & PPC_FEATURE_HAS_ALTIVEC) {
@@ -53,7 +53,7 @@ unsigned __attribute__((constructor)) cpuinfo_init(void)
* always have both anyway, since VSX came with Power7
* and crypto came with Power8.
*/
- if (hwcap2 & PPC_FEATURE2_HAS_VEC_CRYPTO) {
+ if (hwcap2 & PPC_FEATURE2_VEC_CRYPTO) {
info |= CPUINFO_CRYPTO;
}
}
--
2.39.2
- [Stable-8.2.1 08/38] hw/net/can/sja1000: fix bug for single acceptance filter and standard frame, (continued)
- [Stable-8.2.1 08/38] hw/net/can/sja1000: fix bug for single acceptance filter and standard frame, Michael Tokarev, 2024/01/18
- [Stable-8.2.1 09/38] target/riscv: Fix mcycle/minstret increment behavior, Michael Tokarev, 2024/01/18
- [Stable-8.2.1 10/38] chardev/char.c: fix "abstract device type" error message, Michael Tokarev, 2024/01/18
- [Stable-8.2.1 11/38] audio/audio.c: remove trailing newline in error_setg, Michael Tokarev, 2024/01/18
- [Stable-8.2.1 12/38] hw/net: cadence_gem: Fix MDIO_OP_xxx values, Michael Tokarev, 2024/01/18
- [Stable-8.2.1 13/38] edu: fix DMA range upper bound check, Michael Tokarev, 2024/01/18
- [Stable-8.2.1 14/38] vfio/container: Replace basename with g_path_get_basename, Michael Tokarev, 2024/01/18
- [Stable-8.2.1 15/38] hw/vfio: fix iteration over global VFIODevice list, Michael Tokarev, 2024/01/18
- [Stable-8.2.1 16/38] hw/intc/arm_gicv3_cpuif: handle LPIs in in the list registers, Michael Tokarev, 2024/01/18
- [Stable-8.2.1 17/38] tcg/ppc: Use new registers for LQ destination, Michael Tokarev, 2024/01/18
- [Stable-8.2.1 18/38] util: fix build with musl libc on ppc64le,
Michael Tokarev <=
- [Stable-8.2.1 19/38] tests/acpi: allow tests/data/acpi/virt/SSDT.memhp changes, Michael Tokarev, 2024/01/18
- [Stable-8.2.1 20/38] edk2: update to git snapshot, Michael Tokarev, 2024/01/18
- [Stable-8.2.1 21/38] edk2: update build config, set PcdUninstallMemAttrProtocol = TRUE., Michael Tokarev, 2024/01/18
- [Stable-8.2.1 22/38] edk2: update binaries to git snapshot, Michael Tokarev, 2024/01/18
- [Stable-8.2.1 23/38] tests/acpi: update expected data files, Michael Tokarev, 2024/01/18
- [Stable-8.2.1 24/38] tests/acpi: disallow tests/data/acpi/virt/SSDT.memhp changes, Michael Tokarev, 2024/01/18
- [Stable-8.2.1 26/38] target/s390x: Fix LAE setting a wrong access register, Michael Tokarev, 2024/01/18
- [Stable-8.2.1 25/38] tests/qtest/virtio-ccw: Fix device presence checking, Michael Tokarev, 2024/01/18
- [Stable-8.2.1 27/38] .gitlab-ci.d/buildtest.yml: Work around htags bug when environment is large, Michael Tokarev, 2024/01/18
- [Stable-8.2.1 28/38] readthodocs: fully specify a build environment, Michael Tokarev, 2024/01/18