From 7d1015fa9d315a0330f92b97ad2b3634fd303bf6 Mon Sep 17 00:00:00 2001 From: Will Deacon Date: Thu, 7 Jul 2022 15:51:40 +0100 Subject: [PATCH] Revert "ANDROID: KVM: arm64: Add hyp_spinlock_t static initializer" This reverts commit b7ceb8bab77c6a643d3f049964e61e20ec4d4a69. Bug: 233587962 Signed-off-by: Will Deacon Change-Id: Id40d2098b3d9cfbe85bb83549e36dd2a1bdda503 --- arch/arm64/kvm/hyp/include/nvhe/spinlock.h | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/arch/arm64/kvm/hyp/include/nvhe/spinlock.h b/arch/arm64/kvm/hyp/include/nvhe/spinlock.h index 7c7ea8c55405..4652fd04bdbe 100644 --- a/arch/arm64/kvm/hyp/include/nvhe/spinlock.h +++ b/arch/arm64/kvm/hyp/include/nvhe/spinlock.h @@ -28,17 +28,9 @@ typedef union hyp_spinlock { }; } hyp_spinlock_t; -#define __HYP_SPIN_LOCK_INITIALIZER \ - { .__val = 0 } - -#define __HYP_SPIN_LOCK_UNLOCKED \ - ((hyp_spinlock_t) __HYP_SPIN_LOCK_INITIALIZER) - -#define DEFINE_HYP_SPINLOCK(x) hyp_spinlock_t x = __HYP_SPIN_LOCK_UNLOCKED - #define hyp_spin_lock_init(l) \ do { \ - *(l) = __HYP_SPIN_LOCK_UNLOCKED; \ + *(l) = (hyp_spinlock_t){ .__val = 0 }; \ } while (0) static inline void hyp_spin_lock(hyp_spinlock_t *lock)