diff options
author | Pavel Fedin <p.fedin@samsung.com> | 2015-09-07 10:39:31 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2015-09-07 10:39:31 +0100 |
commit | 0f4a9e45ec35811ee250ac232d84d3c6d4fcd7fc (patch) | |
tree | f4699d367397ab732d340d13e8822d620f12c240 /target-arm/kvm64.c | |
parent | d4e26d106a1ea35a81176cb5398406b08316adc7 (diff) | |
download | qemu-0f4a9e45ec35811ee250ac232d84d3c6d4fcd7fc.zip qemu-0f4a9e45ec35811ee250ac232d84d3c6d4fcd7fc.tar.gz qemu-0f4a9e45ec35811ee250ac232d84d3c6d4fcd7fc.tar.bz2 |
target-arm: Refactor CPU affinity handling
Introduces reusable definitions for CPU affinity masks/shifts and gets rid
of hardcoded magic numbers.
Signed-off-by: Pavel Fedin <p.fedin@samsung.com>
Message-id: 7e6def4d0d91ae64615cdd2035b94d408d0a23c6.1441366248.git.p.fedin@samsung.com
[PMM: folded overlong line]
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'target-arm/kvm64.c')
-rw-r--r-- | target-arm/kvm64.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/target-arm/kvm64.c b/target-arm/kvm64.c index bd60889..ceebfeb 100644 --- a/target-arm/kvm64.c +++ b/target-arm/kvm64.c @@ -77,7 +77,6 @@ bool kvm_arm_get_host_cpu_features(ARMHostCPUClass *ahcc) return true; } -#define ARM_MPIDR_HWID_BITMASK 0xFF00FFFFFFULL #define ARM_CPU_ID_MPIDR 3, 0, 0, 0, 5 int kvm_arch_init_vcpu(CPUState *cs) @@ -120,7 +119,7 @@ int kvm_arch_init_vcpu(CPUState *cs) if (ret) { return ret; } - cpu->mp_affinity = mpidr & ARM_MPIDR_HWID_BITMASK; + cpu->mp_affinity = mpidr & ARM64_AFFINITY_MASK; return kvm_arm_init_cpreg_list(cpu); } |