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/kvm32.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/kvm32.c')
-rw-r--r-- | target-arm/kvm32.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/target-arm/kvm32.c b/target-arm/kvm32.c index 421ce0e..3ae57a6 100644 --- a/target-arm/kvm32.c +++ b/target-arm/kvm32.c @@ -181,7 +181,6 @@ int kvm_arm_cpreg_level(uint64_t regidx) return KVM_PUT_RUNTIME_STATE; } -#define ARM_MPIDR_HWID_BITMASK 0xFFFFFF #define ARM_CPU_ID_MPIDR 0, 0, 0, 5 int kvm_arch_init_vcpu(CPUState *cs) @@ -234,7 +233,7 @@ int kvm_arch_init_vcpu(CPUState *cs) if (ret) { return ret; } - cpu->mp_affinity = mpidr & ARM_MPIDR_HWID_BITMASK; + cpu->mp_affinity = mpidr & ARM32_AFFINITY_MASK; return kvm_arm_init_cpreg_list(cpu); } |