Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp2266831pxp; Mon, 21 Mar 2022 15:23:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxxUm0K4RS+xX0IFKTTdgTPY2hQnx8ELUIaXkFeThMBmIXc71WfGzULVT6mZCpyTE9hxPtl X-Received: by 2002:a17:902:e949:b0:14d:8ab1:919 with SMTP id b9-20020a170902e94900b0014d8ab10919mr14903272pll.122.1647901386970; Mon, 21 Mar 2022 15:23:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647901386; cv=none; d=google.com; s=arc-20160816; b=eygTAjqeh7vk2CXo4r9FwOLfPqqOuxPqD1SiiqwmYzIlcWqKUiHyxERU0DkpiIxfbE wGFGfUPJkFxqrNcFd0i0xC6zbhx1s/VESe9iWCU8lgJ7N5PcbyJTQ7pEff3Tf/6dfyGk VUmkI4dcG0GDRB42Yr5fpcPiXsAneVxyhR2uBX2YBk7ThHXjNNgTGRzx5+9dHuQn+COT cMnGA7bmVas8gLlDjbvH1z9pvHtisR4pui8Tm+7OzHqXD+x2bV7YpdML/dF2nSsI8svP vS+4zRQHdDin+oeqdcG+umo4qf1f0v/wjEHSM8Jq1FokN6KVolgJaOidoEUp6xXQ5Id4 6Xqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=hguHleYC4D8QEDZNO593IgrVtBHwT1h+2Rx7p8zDEPY=; b=eiAZqeZ7QQfj9AiCgKOpHjjL0pFU6hZM6C2bO8JCKBogZTpsld3hH7XYcxwo54Q/nr n2wKT6Nt9T6Gn7P+K6LHWZ5GEUPcCEfVBS5WS6eCqLmj6rClBMm0L0F2bgvE1p7zH8hk oQI9fbYI4FX7MyKkA20fjAnMaHs6wXfQ744UzzfdUQB54QT842EJLkP4RewNvaYbYjOK 9+HCeAoYLgeRmJkKMifMZy+9p3uzmzNPvjEZ/nCKiQoQIAp3t5Ck/KuyKx6iBXJxtIQT ww8LaMqu/LUelT1bhAS7R3tt4tX0epD5DVerYdkazX1qulkCfB/MFx9JUfnaq4zAQA4K 0QeA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=OcPnBTp1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id z41-20020a056a001da900b004fa882655e5si6526763pfw.133.2022.03.21.15.23.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Mar 2022 15:23:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=OcPnBTp1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 8D62B3900BA; Mon, 21 Mar 2022 14:39:10 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242023AbiCSD5P (ORCPT + 99 others); Fri, 18 Mar 2022 23:57:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51770 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242011AbiCSD5B (ORCPT ); Fri, 18 Mar 2022 23:57:01 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 95B063ED05; Fri, 18 Mar 2022 20:55:30 -0700 (PDT) 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 8B414616ED; 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 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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 */ -- 2.25.1