]> git.proxmox.com Git - mirror_qemu.git/commitdiff
target/arm: Use FIELD macros for clearing ID_DFR0 PERFMON field
authorPeter Maydell <peter.maydell@linaro.org>
Fri, 14 Feb 2020 17:51:02 +0000 (17:51 +0000)
committerPeter Maydell <peter.maydell@linaro.org>
Fri, 21 Feb 2020 16:07:01 +0000 (16:07 +0000)
We already define FIELD macros for ID_DFR0, so use them in the
one place where we're doing direct bit value manipulation.

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 20200214175116.9164-8-peter.maydell@linaro.org

target/arm/cpu.c

index 12bf9688007a2c5f3d5e6a28a29f4846d2df6115..1024f506c51c2aed9cbe586c75a27925ca7e6968 100644 (file)
@@ -1719,7 +1719,7 @@ static void arm_cpu_realizefn(DeviceState *dev, Error **errp)
 #endif
     } else {
         cpu->id_aa64dfr0 = FIELD_DP64(cpu->id_aa64dfr0, ID_AA64DFR0, PMUVER, 0);
-        cpu->id_dfr0 &= ~(0xf << 24);
+        cpu->id_dfr0 = FIELD_DP32(cpu->id_dfr0, ID_DFR0, PERFMON, 0);
         cpu->pmceid0 = 0;
         cpu->pmceid1 = 0;
     }