From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Hildenbrand Subject: [kvm-unit-tests PATCH v1 2/3] ppc64: use asm-generic spinlock Date: Fri, 12 May 2017 12:20:41 +0200 Message-ID: <20170512102042.4956-3-david@redhat.com> References: <20170512102042.4956-1-david@redhat.com> Cc: Paolo Bonzini , =?UTF-8?q?Radim=20Kr=C4=8Dm=C3=A1=C5=99?= , Thomas Huth , david@redhat.com, Laurent Vivier , kvm-ppc@vger.kernel.org To: kvm@vger.kernel.org Return-path: Received: from mx1.redhat.com ([209.132.183.28]:35676 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756086AbdELKVB (ORCPT ); Fri, 12 May 2017 06:21:01 -0400 In-Reply-To: <20170512102042.4956-1-david@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: Since the ppc64 implementation is currently only a defunc dummy implementation, let's replace it by the generic one. Signed-off-by: David Hildenbrand --- lib/ppc64/asm/spinlock.h | 9 ++------- lib/ppc64/spinlock.c | 18 ------------------ powerpc/Makefile.ppc64 | 1 - 3 files changed, 2 insertions(+), 26 deletions(-) delete mode 100644 lib/ppc64/spinlock.c diff --git a/lib/ppc64/asm/spinlock.h b/lib/ppc64/asm/spinlock.h index 002cdb1..da1d9d0 100644 --- a/lib/ppc64/asm/spinlock.h +++ b/lib/ppc64/asm/spinlock.h @@ -1,11 +1,6 @@ +#include + #ifndef _ASMPPC64_SPINLOCK_H_ #define _ASMPPC64_SPINLOCK_H_ -struct spinlock { - int v; -}; - -extern void spin_lock(struct spinlock *lock); -extern void spin_unlock(struct spinlock *lock); - #endif /* _ASMPPC64_SPINLOCK_H_ */ diff --git a/lib/ppc64/spinlock.c b/lib/ppc64/spinlock.c deleted file mode 100644 index 1b26ee1..0000000 --- a/lib/ppc64/spinlock.c +++ /dev/null @@ -1,18 +0,0 @@ -/* - * ppc64 (dummy) spinlock implementation - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU Library General Public License version 2. - */ - -#include - -void spin_lock(struct spinlock *lock) -{ - lock->v = 1; -} - -void spin_unlock(struct spinlock *lock) -{ - lock->v = 0; -} diff --git a/powerpc/Makefile.ppc64 b/powerpc/Makefile.ppc64 index 3da3a83..17ece66 100644 --- a/powerpc/Makefile.ppc64 +++ b/powerpc/Makefile.ppc64 @@ -15,7 +15,6 @@ endif cstart.o = $(TEST_DIR)/cstart64.o reloc.o = $(TEST_DIR)/reloc64.o -cflatobjs += lib/ppc64/spinlock.o # ppc64 specific tests tests = -- 2.9.3