OSDN Git Service

KVM: arm/arm64: vgic: Move DEBUG_SPINLOCK_BUG_ON to vgic.h
authorJia He <hejianet@gmail.com>
Fri, 3 Aug 2018 13:57:03 +0000 (21:57 +0800)
committerMarc Zyngier <marc.zyngier@arm.com>
Sun, 12 Aug 2018 11:14:08 +0000 (12:14 +0100)
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>
virt/kvm/arm/vgic/vgic.c
virt/kvm/arm/vgic/vgic.h

index 33c8325..c22cea6 100644 (file)
 #define CREATE_TRACE_POINTS
 #include "trace.h"
 
-#ifdef CONFIG_DEBUG_SPINLOCK
-#define DEBUG_SPINLOCK_BUG_ON(p) BUG_ON(p)
-#else
-#define DEBUG_SPINLOCK_BUG_ON(p)
-#endif
-
 struct vgic_global kvm_vgic_global_state __ro_after_init = {
        .gicv3_cpuif = STATIC_KEY_FALSE_INIT,
 };
index ed9d9d9..a900247 100644 (file)
 #define KVM_VGIC_V3_RDIST_COUNT_MASK   GENMASK_ULL(63, 52)
 #define KVM_VGIC_V3_RDIST_COUNT_SHIFT  52
 
+#ifdef CONFIG_DEBUG_SPINLOCK
+#define DEBUG_SPINLOCK_BUG_ON(p) BUG_ON(p)
+#else
+#define DEBUG_SPINLOCK_BUG_ON(p)
+#endif
+
 /* Requires the irq_lock to be held by the caller. */
 static inline bool irq_is_pending(struct vgic_irq *irq)
 {