From patchwork Sat Mar 19 03:54:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guo Ren X-Patchwork-Id: 12786066 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4E836C43219 for ; Sat, 19 Mar 2022 03:55:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=rUr9MJ6D0FHpRa4plKHTU2p4PaIBM5U3B2H+ldjjPw4=; b=29XfpQXk+Tufoj HkecTurKPFv+vMUaQH5v5PuRnmIPhHdT5mW41x0e0X4oQrqu/MqUaa7LpoviY+IJtlbynWaMivsek +mGHPUnM0fwRupk6AeyNoofpyb6LxX2pSkMlw7eieGtNtlvWSrcNNKeotElJgTBBLNVJYpYmuLohE BbJVukfSZ3MKg7lQNu/60gJ8URnaK6iZiq0v0nrP1PUlcWF3K4d27n6qJW9MfFQE7+voJcxURywNT CRa2eBQelLmoPZJXv/ptd7LgHcb5zygovPNuqJaoeaY02fcuogjTUt07B1M0dRgqWdvMpJE72skot 7vAncBA2FmdwxfRJ6tGg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nVQBj-003BRN-5l; Sat, 19 Mar 2022 03:55:35 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nVQBf-003BOg-Bj for linux-riscv@lists.infradead.org; Sat, 19 Mar 2022 03:55:32 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id DA04261861; Sat, 19 Mar 2022 03:55:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 42EB4C340EE; Sat, 19 Mar 2022 03:55:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1647662130; bh=5F9BxWWO0EcVqQsPaqwbkmHpz+6C+srDszfaYSSBJlE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OcPnBTp1KnjsIV5DDlHYScAFsWUao0pSMKtr80n8NyOUamGV8jKHpEFIsEmv+f2Vl Q6g8E0WbSMDESVxBAHfeEJxQKUi9TzRVXQzAx2CigW1OLpkZMZsHY/Itu/5hTPxMPm ylGOEdX1BMVFP+ab7bdgSJi2OFl7qGItK3x4VBLshA+0RbJPhQoMZBi14PpMH+761t 8WqmVQRjBt1wgAAbeMW1ZZ1eER+4XVxIUfxoDgsKrbnAP/ANzxXCfYWdddm/DQqhlM Tx6OLuHXmLbJu/tCNCnwreJqqBNtl8E1cPByk4V6sSSsmwhgiv5/wVnPVqqSKJSBQ7 8sD3Ue3pzOD6A== From: guoren@kernel.org To: guoren@kernel.org, palmer@dabbelt.com, arnd@arndb.de, boqun.feng@gmail.com, longman@redhat.com, peterz@infradead.org Cc: linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, linux-csky@vger.kernel.org, openrisc@lists.librecores.org, Palmer Dabbelt Subject: [PATCH V2 5/5] openrisc: Move to ticket-spinlock Date: Sat, 19 Mar 2022 11:54:57 +0800 Message-Id: <20220319035457.2214979-6-guoren@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220319035457.2214979-1-guoren@kernel.org> References: <20220319035457.2214979-1-guoren@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220318_205531_517574_620C25DD X-CRM114-Status: GOOD ( 12.46 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org From: Peter Zijlstra We have no indications that openrisc meets the qspinlock requirements, so move to ticket-spinlock as that is more likey to be correct. Remove duplicate arch_spin_relax, arch_read_relax, arch_write_relax definition. Signed-off-by: Palmer Dabbelt Signed-off-by: Guo Ren --- arch/openrisc/Kconfig | 1 - arch/openrisc/include/asm/Kbuild | 7 ++---- arch/openrisc/include/asm/spinlock.h | 27 ---------------------- arch/openrisc/include/asm/spinlock_types.h | 7 ------ 4 files changed, 2 insertions(+), 40 deletions(-) delete mode 100644 arch/openrisc/include/asm/spinlock.h delete mode 100644 arch/openrisc/include/asm/spinlock_types.h diff --git a/arch/openrisc/Kconfig b/arch/openrisc/Kconfig index f724b3f1aeed..f5fa226362f6 100644 --- a/arch/openrisc/Kconfig +++ b/arch/openrisc/Kconfig @@ -30,7 +30,6 @@ config OPENRISC select HAVE_DEBUG_STACKOVERFLOW select OR1K_PIC select CPU_NO_EFFICIENT_FFS if !OPENRISC_HAVE_INST_FF1 - select ARCH_USE_QUEUED_SPINLOCKS select ARCH_USE_QUEUED_RWLOCKS select OMPIC if SMP select ARCH_WANT_FRAME_POINTERS diff --git a/arch/openrisc/include/asm/Kbuild b/arch/openrisc/include/asm/Kbuild index ca5987e11053..1df59e446b46 100644 --- a/arch/openrisc/include/asm/Kbuild +++ b/arch/openrisc/include/asm/Kbuild @@ -1,9 +1,6 @@ # SPDX-License-Identifier: GPL-2.0 generic-y += extable.h generic-y += kvm_para.h -generic-y += mcs_spinlock.h -generic-y += qspinlock_types.h -generic-y += qspinlock.h -generic-y += qrwlock_types.h -generic-y += qrwlock.h +generic-y += spinlock_types.h +generic-y += spinlock.h generic-y += user.h diff --git a/arch/openrisc/include/asm/spinlock.h b/arch/openrisc/include/asm/spinlock.h deleted file mode 100644 index 264944a71535..000000000000 --- a/arch/openrisc/include/asm/spinlock.h +++ /dev/null @@ -1,27 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-or-later */ -/* - * OpenRISC Linux - * - * Linux architectural port borrowing liberally from similar works of - * others. All original copyrights apply as per the original source - * declaration. - * - * OpenRISC implementation: - * Copyright (C) 2003 Matjaz Breskvar - * Copyright (C) 2010-2011 Jonas Bonn - * et al. - */ - -#ifndef __ASM_OPENRISC_SPINLOCK_H -#define __ASM_OPENRISC_SPINLOCK_H - -#include - -#include - -#define arch_spin_relax(lock) cpu_relax() -#define arch_read_relax(lock) cpu_relax() -#define arch_write_relax(lock) cpu_relax() - - -#endif diff --git a/arch/openrisc/include/asm/spinlock_types.h b/arch/openrisc/include/asm/spinlock_types.h deleted file mode 100644 index 7c6fb1208c88..000000000000 --- a/arch/openrisc/include/asm/spinlock_types.h +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef _ASM_OPENRISC_SPINLOCK_TYPES_H -#define _ASM_OPENRISC_SPINLOCK_TYPES_H - -#include -#include - -#endif /* _ASM_OPENRISC_SPINLOCK_TYPES_H */