diff options
author | Philippe Mathieu-Daudé <philmd@redhat.com> | 2020-05-04 19:24:44 +0200 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2020-05-11 11:45:59 +0100 |
commit | f5cbb280bdd2cb5b8f44db015571591ef3c42665 (patch) | |
tree | 27d36f9e8f48d4eea345171c8c88d5121b0f6249 /target/arm/kvm32.c | |
parent | ba080b8682fc6bde7f2d9dedddb519d63cbe138f (diff) |
target/arm/kvm: Inline set_feature() calls
We want to move the inlined declarations of set_feature()
from cpu*.c to cpu.h. To avoid clashing with the KVM
declarations, inline the few KVM calls.
Suggested-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-id: 20200504172448.9402-2-philmd@redhat.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'target/arm/kvm32.c')
-rw-r--r-- | target/arm/kvm32.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/target/arm/kvm32.c b/target/arm/kvm32.c index f271181ab8..7b3a19e9ae 100644 --- a/target/arm/kvm32.c +++ b/target/arm/kvm32.c @@ -22,11 +22,6 @@ #include "internals.h" #include "qemu/log.h" -static inline void set_feature(uint64_t *features, int feature) -{ - *features |= 1ULL << feature; -} - static int read_sys_reg32(int fd, uint32_t *pret, uint64_t id) { struct kvm_one_reg idreg = { .id = id, .addr = (uintptr_t)pret }; @@ -146,14 +141,14 @@ bool kvm_arm_get_host_cpu_features(ARMHostCPUFeatures *ahcf) * timers; this in turn implies most of the other feature * bits, but a few must be tested. */ - set_feature(&features, ARM_FEATURE_V7VE); - set_feature(&features, ARM_FEATURE_GENERIC_TIMER); + features |= 1ULL << ARM_FEATURE_V7VE; + features |= 1ULL << ARM_FEATURE_GENERIC_TIMER; if (extract32(id_pfr0, 12, 4) == 1) { - set_feature(&features, ARM_FEATURE_THUMB2EE); + features |= 1ULL << ARM_FEATURE_THUMB2EE; } if (extract32(ahcf->isar.mvfr1, 12, 4) == 1) { - set_feature(&features, ARM_FEATURE_NEON); + features |= 1ULL << ARM_FEATURE_NEON; } ahcf->features = features; |