From patchwork Mon May 15 11:03:47 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Hildenbrand X-Patchwork-Id: 9726687 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A16C160380 for ; Mon, 15 May 2017 11:04:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 995442876D for ; Mon, 15 May 2017 11:04:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8DC3A2894F; Mon, 15 May 2017 11:04:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3AA862876D for ; Mon, 15 May 2017 11:04:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933992AbdEOLEC (ORCPT ); Mon, 15 May 2017 07:04:02 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43680 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933947AbdEOLEA (ORCPT ); Mon, 15 May 2017 07:04:00 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 75CBC80485; Mon, 15 May 2017 11:04:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 75CBC80485 Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=david@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 75CBC80485 Received: from t460s.redhat.com (ovpn-117-106.ams2.redhat.com [10.36.117.106]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7625A1799B; Mon, 15 May 2017 11:03:57 +0000 (UTC) From: David Hildenbrand To: kvm@vger.kernel.org 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 Subject: [kvm-unit-tests PATCH v2 2/3] ppc64: use asm-generic spinlock Date: Mon, 15 May 2017 13:03:47 +0200 Message-Id: <20170515110348.30449-3-david@redhat.com> In-Reply-To: <20170515110348.30449-1-david@redhat.com> References: <20170515110348.30449-1-david@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Mon, 15 May 2017 11:04:00 +0000 (UTC) Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Since the ppc64 implementation is currently only a defunc dummy implementation, let's replace it by the generic one. Acked-by: Thomas Huth Signed-off-by: David Hildenbrand --- 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 #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 =