diff options
| author | Jia He <hejianet@gmail.com> | 2018-08-03 09:57:03 -0400 |
|---|---|---|
| committer | Marc Zyngier <marc.zyngier@arm.com> | 2018-08-12 07:14:08 -0400 |
| commit | dc961e5395dde279b77e2cdbdcc99560b89bdfd9 (patch) | |
| tree | 6b9f31fca0eb172d0324ab05dfdf86b405dde116 /virt | |
| parent | 3e8a8a50c7ef1a4f71921731f0e1748a7f70ddaa (diff) | |
KVM: arm/arm64: vgic: Move DEBUG_SPINLOCK_BUG_ON to vgic.h
DEBUG_SPINLOCK_BUG_ON can be used with both vgic-v2 and vgic-v3,
so let's move it to vgic.h
Signed-off-by: Jia He <jia.he@hxt-semitech.com>
[maz: commit message tidy-up]
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Diffstat (limited to 'virt')
| -rw-r--r-- | virt/kvm/arm/vgic/vgic.c | 6 | ||||
| -rw-r--r-- | virt/kvm/arm/vgic/vgic.h | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/virt/kvm/arm/vgic/vgic.c b/virt/kvm/arm/vgic/vgic.c index 33c8325c8f35..c22cea678a66 100644 --- a/virt/kvm/arm/vgic/vgic.c +++ b/virt/kvm/arm/vgic/vgic.c | |||
| @@ -28,12 +28,6 @@ | |||
| 28 | #define CREATE_TRACE_POINTS | 28 | #define CREATE_TRACE_POINTS |
| 29 | #include "trace.h" | 29 | #include "trace.h" |
| 30 | 30 | ||
| 31 | #ifdef CONFIG_DEBUG_SPINLOCK | ||
| 32 | #define DEBUG_SPINLOCK_BUG_ON(p) BUG_ON(p) | ||
| 33 | #else | ||
| 34 | #define DEBUG_SPINLOCK_BUG_ON(p) | ||
| 35 | #endif | ||
| 36 | |||
| 37 | struct vgic_global kvm_vgic_global_state __ro_after_init = { | 31 | struct vgic_global kvm_vgic_global_state __ro_after_init = { |
| 38 | .gicv3_cpuif = STATIC_KEY_FALSE_INIT, | 32 | .gicv3_cpuif = STATIC_KEY_FALSE_INIT, |
| 39 | }; | 33 | }; |
diff --git a/virt/kvm/arm/vgic/vgic.h b/virt/kvm/arm/vgic/vgic.h index ed9d9d9e2fc5..a90024718ca4 100644 --- a/virt/kvm/arm/vgic/vgic.h +++ b/virt/kvm/arm/vgic/vgic.h | |||
| @@ -103,6 +103,12 @@ | |||
| 103 | #define KVM_VGIC_V3_RDIST_COUNT_MASK GENMASK_ULL(63, 52) | 103 | #define KVM_VGIC_V3_RDIST_COUNT_MASK GENMASK_ULL(63, 52) |
| 104 | #define KVM_VGIC_V3_RDIST_COUNT_SHIFT 52 | 104 | #define KVM_VGIC_V3_RDIST_COUNT_SHIFT 52 |
| 105 | 105 | ||
| 106 | #ifdef CONFIG_DEBUG_SPINLOCK | ||
| 107 | #define DEBUG_SPINLOCK_BUG_ON(p) BUG_ON(p) | ||
| 108 | #else | ||
| 109 | #define DEBUG_SPINLOCK_BUG_ON(p) | ||
| 110 | #endif | ||
| 111 | |||
| 106 | /* Requires the irq_lock to be held by the caller. */ | 112 | /* Requires the irq_lock to be held by the caller. */ |
| 107 | static inline bool irq_is_pending(struct vgic_irq *irq) | 113 | static inline bool irq_is_pending(struct vgic_irq *irq) |
| 108 | { | 114 | { |
