summaryrefslogtreecommitdiffstats
path: root/target-arm/kvm_arm.h
diff options
context:
space:
mode:
authorPavel Fedin2015-08-13 12:26:21 +0200
committerPeter Maydell2015-08-13 12:26:21 +0200
commite6fbcbc4e57322a8de1307556e68a4cd6d0d8c8b (patch)
tree39e13cd535cb305398377adc6d2365eb9f6679e7 /target-arm/kvm_arm.h
parenthw/arm/gic: Kill code duplication (diff)
downloadqemu-e6fbcbc4e57322a8de1307556e68a4cd6d0d8c8b.tar.gz
qemu-e6fbcbc4e57322a8de1307556e68a4cd6d0d8c8b.tar.xz
qemu-e6fbcbc4e57322a8de1307556e68a4cd6d0d8c8b.zip
Introduce gic_class_name() instead of repeating condition
This small inline returns correct GIC class name depending on whether we use KVM acceleration or not. Avoids duplicating the condition everywhere. Signed-off-by: Pavel Fedin <p.fedin@samsung.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 4f26901be9b844b563673ce3ad08eeedbb7a7132.1438758065.git.p.fedin@samsung.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'target-arm/kvm_arm.h')
-rw-r--r--target-arm/kvm_arm.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/target-arm/kvm_arm.h b/target-arm/kvm_arm.h
index 7912d7433d..b3e0ab7e7c 100644
--- a/target-arm/kvm_arm.h
+++ b/target-arm/kvm_arm.h
@@ -191,4 +191,9 @@ int kvm_arm_sync_mpstate_to_qemu(ARMCPU *cpu);
#endif
+static inline const char *gic_class_name(void)
+{
+ return kvm_irqchip_in_kernel() ? "kvm-arm-gic" : "arm_gic";
+}
+
#endif