]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
KVM: arm/arm64: Move irq_is_ppi() to header file
authorChristoffer Dall <cdall@linaro.org>
Tue, 2 May 2017 18:11:49 +0000 (20:11 +0200)
committerChristoffer Dall <cdall@linaro.org>
Thu, 8 Jun 2017 14:59:56 +0000 (16:59 +0200)
We are about to need this define in the arch timer code as well so move
it to a common location.

Signed-off-by: Christoffer Dall <cdall@linaro.org>
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
include/kvm/arm_vgic.h
virt/kvm/arm/pmu.c

index 97b8d3728b3103f1b54f711f15d06fa84691e372..dde59fbc5f8017f9ac6383e4cbc429e4105044b3 100644 (file)
@@ -38,6 +38,8 @@
 #define VGIC_MIN_LPI           8192
 #define KVM_IRQCHIP_NUM_PINS   (1020 - 32)
 
+#define irq_is_ppi(irq) ((irq) >= VGIC_NR_SGIS && (irq) < VGIC_NR_PRIVATE_IRQS)
+
 enum vgic_type {
        VGIC_V2,                /* Good ol' GICv2 */
        VGIC_V3,                /* New fancy GICv3 */
index 96a9cab3998216225912dbc94f2d5ff4555be2ae..574feff55a6cfd2829d44ac859d6a6f80b40ae99 100644 (file)
@@ -496,8 +496,6 @@ static int kvm_arm_pmu_v3_init(struct kvm_vcpu *vcpu)
        return 0;
 }
 
-#define irq_is_ppi(irq) ((irq) >= VGIC_NR_SGIS && (irq) < VGIC_NR_PRIVATE_IRQS)
-
 /*
  * For one VM the interrupt type must be same for each vcpu.
  * As a PPI, the interrupt number is the same for all vcpus,