From: David Hildenbrand <david@redhat.com>
To: kvm@vger.kernel.org
Cc: "Paolo Bonzini" <pbonzini@redhat.com>,
"Radim Krčmář" <rkrcmar@redhat.com>,
"Thomas Huth" <thuth@redhat.com>,
david@redhat.com, "Laurent Vivier" <lvivier@redhat.com>,
kvm-ppc@vger.kernel.org
Subject: [kvm-unit-tests PATCH v2 2/3] ppc64: use asm-generic spinlock
Date: Mon, 15 May 2017 11:03:47 +0000 [thread overview]
Message-ID: <20170515110348.30449-3-david@redhat.com> (raw)
In-Reply-To: <20170515110348.30449-1-david@redhat.com>
Since the ppc64 implementation is currently only a defunc dummy
implementation, let's replace it by the generic one.
Acked-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: David Hildenbrand <david@redhat.com>
---
lib/ppc64/asm/spinlock.h | 7 +------
lib/ppc64/spinlock.c | 18 ------------------
powerpc/Makefile.ppc64 | 1 -
3 files changed, 1 insertion(+), 25 deletions(-)
delete mode 100644 lib/ppc64/spinlock.c
diff --git a/lib/ppc64/asm/spinlock.h b/lib/ppc64/asm/spinlock.h
index 002cdb1..f59eed1 100644
--- a/lib/ppc64/asm/spinlock.h
+++ b/lib/ppc64/asm/spinlock.h
@@ -1,11 +1,6 @@
#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);
+#include <asm-generic/spinlock.h>
#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 <asm/spinlock.h>
-
-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
WARNING: multiple messages have this Message-ID (diff)
From: David Hildenbrand <david@redhat.com>
To: kvm@vger.kernel.org
Cc: "Paolo Bonzini" <pbonzini@redhat.com>,
"Radim Krčmář" <rkrcmar@redhat.com>,
"Thomas Huth" <thuth@redhat.com>,
david@redhat.com, "Laurent Vivier" <lvivier@redhat.com>,
kvm-ppc@vger.kernel.org
Subject: [kvm-unit-tests PATCH v2 2/3] ppc64: use asm-generic spinlock
Date: Mon, 15 May 2017 13:03:47 +0200 [thread overview]
Message-ID: <20170515110348.30449-3-david@redhat.com> (raw)
In-Reply-To: <20170515110348.30449-1-david@redhat.com>
Since the ppc64 implementation is currently only a defunc dummy
implementation, let's replace it by the generic one.
Acked-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: David Hildenbrand <david@redhat.com>
---
lib/ppc64/asm/spinlock.h | 7 +------
lib/ppc64/spinlock.c | 18 ------------------
powerpc/Makefile.ppc64 | 1 -
3 files changed, 1 insertion(+), 25 deletions(-)
delete mode 100644 lib/ppc64/spinlock.c
diff --git a/lib/ppc64/asm/spinlock.h b/lib/ppc64/asm/spinlock.h
index 002cdb1..f59eed1 100644
--- a/lib/ppc64/asm/spinlock.h
+++ b/lib/ppc64/asm/spinlock.h
@@ -1,11 +1,6 @@
#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);
+#include <asm-generic/spinlock.h>
#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 <asm/spinlock.h>
-
-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
next prev parent reply other threads:[~2017-05-15 11:03 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-15 11:03 [kvm-unit-tests PATCH v2 0/3] provide asm-generic spinlock David Hildenbrand
2017-05-15 11:03 ` David Hildenbrand
2017-05-15 11:03 ` [kvm-unit-tests PATCH v2 1/3] lib: provide generic spinlock David Hildenbrand
2017-05-15 11:03 ` David Hildenbrand
2017-05-15 11:03 ` David Hildenbrand [this message]
2017-05-15 11:03 ` [kvm-unit-tests PATCH v2 2/3] ppc64: use asm-generic spinlock David Hildenbrand
2017-05-15 11:03 ` [kvm-unit-tests PATCH v2 3/3] x86: " David Hildenbrand
2017-05-15 11:03 ` David Hildenbrand
2017-05-19 16:21 ` [kvm-unit-tests PATCH v2 0/3] provide " Radim Krčmář
2017-05-19 16:21 ` Radim Krčmář
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170515110348.30449-3-david@redhat.com \
--to=david@redhat.com \
--cc=kvm-ppc@vger.kernel.org \
--cc=kvm@vger.kernel.org \
--cc=lvivier@redhat.com \
--cc=pbonzini@redhat.com \
--cc=rkrcmar@redhat.com \
--cc=thuth@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.