From mboxrd@z Thu Jan 1 00:00:00 1970 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 E24DEC433EF for ; Mon, 25 Jul 2022 02:08:58 +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-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To:Subject: MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=HVRLPOds3lEs6/9JzCTa3VELvUe63sQ+mLDgPSCj1WY=; b=uluqHv6O9Xsytf 92taADXSoRIO7TN1OrGYQcPdwkvkTuqzA3x1ESFo9Gij56huMEKmwYY0i788TOPMYJ228xUWCqp0X mMwRMMYBZT729xmi6SZBI/gRG999BqF+fE7A9xwlbnkGrg9HQrFjz5y4TahlAJ95rDloS+m5sIp3y L3V9knJNkbLCh5vJx9J1rzo3x04frwpnLuvqSQ3g0dmtZJD8urOQQPd6Nrn62O5S8IVMOY4+VCL6/ HWWUxf1ugNcFiywSCozwoWOhhcV81La9h8hLn3I80iYD7mlWiLbp6dNiPEkulzu4ZRxnZzIMGEM40 LCaoPxPhrsFzVeO5GiwA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oFnWa-000cUR-TP; Mon, 25 Jul 2022 02:08:48 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oFnWY-000cJb-8t for linux-riscv@lists.infradead.org; Mon, 25 Jul 2022 02:08:48 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1658714923; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=3H+nJazZwUTI7bMfI3XTbXbN/qZRH3y006Os5Yq8ong=; b=WQcW5Gj/5nxI/PoLJzkA4MjQYKf9ZAw2E8VkTINNibpucjpSQst0Sncr3KLiaHD+9CcVKo m5dSzHb07dH8K2JGKqv2usz0xfdAJ4RzQbPwP1BbWtDfI3HuN4svo2g6h94LGcZ5/hMwwy X8pvUL6mdSDVrHSNq7vBfCoHfzVexUs= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-561-LE49NObQNpihPsAljGi0ow-1; Sun, 24 Jul 2022 22:08:37 -0400 X-MC-Unique: LE49NObQNpihPsAljGi0ow-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 9BAD01C068CB; Mon, 25 Jul 2022 02:08:36 +0000 (UTC) Received: from [10.22.32.58] (unknown [10.22.32.58]) by smtp.corp.redhat.com (Postfix) with ESMTP id 57C3718EAA; Mon, 25 Jul 2022 02:08:35 +0000 (UTC) Message-ID: <0ea27d18-6d45-9673-38b7-78d59325f9d5@redhat.com> Date: Sun, 24 Jul 2022 22:08:34 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH V8 10/10] csky: Add qspinlock support Content-Language: en-US To: guoren@kernel.org, palmer@rivosinc.com, heiko@sntech.de, hch@infradead.org, arnd@arndb.de, peterz@infradead.org, will@kernel.org, boqun.feng@gmail.com, mingo@redhat.com, philipp.tomsich@vrull.eu, cmuellner@linux.com, linux-kernel@vger.kernel.org, David.Laight@ACULAB.COM Cc: linux-riscv@lists.infradead.org, linux-csky@vger.kernel.org, Guo Ren References: <20220724122517.1019187-1-guoren@kernel.org> <20220724122517.1019187-11-guoren@kernel.org> From: Waiman Long In-Reply-To: <20220724122517.1019187-11-guoren@kernel.org> X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220724_190846_558465_6BD5C59D X-CRM114-Status: GOOD ( 18.45 ) 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: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org On 7/24/22 08:25, guoren@kernel.org wrote: > From: Guo Ren > > Enable qspinlock by the requirements mentioned in a8ad07e5240c9 > ("asm-generic: qspinlock: Indicate the use of mixed-size atomics"). > > C-SKY only has "ldex/stex" for all atomic operations. So csky give a > strong forward guarantee for "ldex/stex." That means when ldex grabbed > the cache line into $L1, it would block other cores from snooping the > address with several cycles. > > Signed-off-by: Guo Ren > Signed-off-by: Guo Ren > --- > arch/csky/Kconfig | 16 ++++++++++++++++ > arch/csky/include/asm/Kbuild | 2 ++ > arch/csky/include/asm/cmpxchg.h | 20 ++++++++++++++++++++ > 3 files changed, 38 insertions(+) > > diff --git a/arch/csky/Kconfig b/arch/csky/Kconfig > index dfdb436b6078..09f7d1f06bca 100644 > --- a/arch/csky/Kconfig > +++ b/arch/csky/Kconfig > @@ -354,6 +354,22 @@ config HAVE_EFFICIENT_UNALIGNED_STRING_OPS > Say Y here to enable EFFICIENT_UNALIGNED_STRING_OPS. Some CPU models could > deal with unaligned access by hardware. > > +choice > + prompt "C-SKY spinlock type" > + default CSKY_TICKET_SPINLOCKS > + > +config CSKY_TICKET_SPINLOCKS > + bool "Using ticket spinlock" > + > +config CSKY_QUEUED_SPINLOCKS > + bool "Using queued spinlock" > + depends on SMP > + select ARCH_USE_QUEUED_SPINLOCKS > + help > + Make sure your micro arch LL/SC has a strong forward progress guarantee. > + Otherwise, stay at ticket-lock/combo-lock. "combo-lock"? It is a cut-and-paste error. Right? Cheers, Longman _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv