[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH] linux-user: ppc64: fix ARCH_206 bit in AT_HWCAP
From: |
Michael Walle |
Subject: |
[Qemu-devel] [PATCH] linux-user: ppc64: fix ARCH_206 bit in AT_HWCAP |
Date: |
Tue, 16 Aug 2016 15:40:50 +0200 |
Only the POWER[789] CPUs should have the ARCH_206 bit set. This is what the
linux kernel does. I guess this was also the intention of commit 0e019746.
We have to make sure all *206 bits are set.
Signed-off-by: Michael Walle <address@hidden>
---
checkpatch.pl flags one warning, but I think this is a false positive.
linux-user/elfload.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/linux-user/elfload.c b/linux-user/elfload.c
index f807baf..4945d48 100644
--- a/linux-user/elfload.c
+++ b/linux-user/elfload.c
@@ -742,7 +742,8 @@ static uint32_t get_elf_hwcap(void)
#define GET_FEATURE(flag, feature) \
do { if (cpu->env.insns_flags & flag) { features |= feature; } } while (0)
#define GET_FEATURE2(flag, feature) \
- do { if (cpu->env.insns_flags2 & flag) { features |= feature; } } while (0)
+ do { if ((cpu->env.insns_flags2 & flag) == flag) \
+ { features |= feature; } } while (0)
GET_FEATURE(PPC_64B, QEMU_PPC_FEATURE_64);
GET_FEATURE(PPC_FLOAT, QEMU_PPC_FEATURE_HAS_FPU);
GET_FEATURE(PPC_ALTIVEC, QEMU_PPC_FEATURE_HAS_ALTIVEC);
--
2.1.4
- [Qemu-devel] [PATCH] linux-user: ppc64: fix ARCH_206 bit in AT_HWCAP,
Michael Walle <=