Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp1134145pxb; Fri, 1 Oct 2021 04:22:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw/JguEoSMqZf+Fc+HcnEVfWtyV67cDf9gvX5/M7xxUuDI3e/jVWANWqrxmOYMDrwbjK5/f X-Received: by 2002:a50:da8d:: with SMTP id q13mr14168059edj.198.1633087365030; Fri, 01 Oct 2021 04:22:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633087365; cv=none; d=google.com; s=arc-20160816; b=j1mo7GEqHUT/ULcgIHVVMimEytZ8K864ncB9MksJRzO5P4mq/1M2J8HdGjpjDuCngT qZL5lgzD6mOgGp/EY3X92gvKtQW+zpP9oee/dAT/GxtRwZvG/R6htMciLLz/jwdY/mOA Wvp5EBFM5XibPN8EBsFVJjaEkl4xUDp7BiUIbL+p1e0Y2gpnt22JMmxD/Eafn8UV7ahJ mJ7bnWXQCEY7mMYsh6p2gazKhrLt8Z9ETULWDihJQwA1kOIg+hC/spHYs1KnDiEUwNdf uQcv6DQ9u/udOKT8mqcCQZAbki10yFKRVab4CJg012WjZiIDdgTr0LtqxXrX9Afeq4Mj nVhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=nAxGSz+sw/DtojqdX9FUJgt3bJ218IVOzIPvBEAJSXA=; b=K6QGxoZWv4kgXVzOkZKLlVh074B5DrRxuTtH2pwlfe8+lpGAZAAllSBIlZ/fm5Xin5 +XnF5a4P82BcrjtmGsl7Tj1/TqeI8kfclIs0rDWHIcL8dtgSUCP28WCO0oOgZJGEzEQ5 2K3BwKakLhiY1PTeORHjyolEXD9GH2OpEC4HsYItxhLDp7NoEu/XC6rOP8ja8nbtInFx zHBD1h+IluInCUpSlGQ03ffkuEP8ueEjMMjha2fHFnXF9q9IOLAU+tnEXk39bzd9ptME QoW5mujdLXTCszftwU8UDNupPxyvYxsiY2eQDug+DvQ9JIi9RKY/Ji436fBv1osiUnx+ b6lQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b="DLSiRm/p"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hk18si6840949ejb.238.2021.10.01.04.22.19; Fri, 01 Oct 2021 04:22:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b="DLSiRm/p"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1353438AbhJALG1 (ORCPT + 99 others); Fri, 1 Oct 2021 07:06:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33846 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1353235AbhJALG0 (ORCPT ); Fri, 1 Oct 2021 07:06:26 -0400 Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E8566C061775; Fri, 1 Oct 2021 04:04:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=nAxGSz+sw/DtojqdX9FUJgt3bJ218IVOzIPvBEAJSXA=; b=DLSiRm/pWw1pc5DQf8PMkaLZka zz4NpjYwOMu1HdN3WHbPDdlmZ7eFmn2Ma4aTh+PHXwI28o2x0tFpUvNA1Qn4Spp49sHin+vOHO/kJ nOBBEayEr3SXhoZ/Km5A/dbishdpH8/ySu/q+CBwPqfS9kxHc3OEI795PNtADLi6VQ+1zdj1OUnI5 AEtjiNy8WQ4RVOjlq0GzFwCEhZSs7ZDhccvki3xDdzqpMUrtjsA5h/xTQmTSdqHKbhhZI44WTey9C ankxqdb/S3YYh7FpKM1yLLceuiXwS72j4N2scmybEcefIZnHhuVlDdgKzlebX7zVB7EODYu7GTRMt TVIIgF1w==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1mWGL7-00790w-48; Fri, 01 Oct 2021 11:04:29 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 8521A300299; Fri, 1 Oct 2021 13:04:28 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 73A9526717AC7; Fri, 1 Oct 2021 13:04:28 +0200 (CEST) Date: Fri, 1 Oct 2021 13:04:28 +0200 From: Peter Zijlstra To: Huacai Chen Cc: Arnd Bergmann , Andy Lutomirski , Thomas Gleixner , Andrew Morton , David Airlie , Jonathan Corbet , Linus Torvalds , linux-arch@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Xuefeng Li , Yanteng Si , Huacai Chen , Jiaxun Yang Subject: Re: [PATCH V4 07/22] LoongArch: Add atomic/locking headers Message-ID: References: <20210927064300.624279-1-chenhuacai@loongson.cn> <20210927064300.624279-8-chenhuacai@loongson.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210927064300.624279-8-chenhuacai@loongson.cn> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 27, 2021 at 02:42:44PM +0800, Huacai Chen wrote: > diff --git a/arch/loongarch/include/asm/spinlock.h b/arch/loongarch/include/asm/spinlock.h > new file mode 100644 > index 000000000000..2544ee546596 > --- /dev/null > +++ b/arch/loongarch/include/asm/spinlock.h > @@ -0,0 +1,12 @@ > +/* SPDX-License-Identifier: GPL-2.0 */ > +/* > + * Copyright (C) 2020-2021 Loongson Technology Corporation Limited > + */ > +#ifndef _ASM_SPINLOCK_H > +#define _ASM_SPINLOCK_H > + > +#include > +#include > +#include > + > +#endif /* _ASM_SPINLOCK_H */ > diff --git a/arch/loongarch/include/asm/spinlock_types.h b/arch/loongarch/include/asm/spinlock_types.h > new file mode 100644 > index 000000000000..91f258401ef9 > --- /dev/null > +++ b/arch/loongarch/include/asm/spinlock_types.h > @@ -0,0 +1,11 @@ > +/* SPDX-License-Identifier: GPL-2.0 */ > +/* > + * Copyright (C) 2020-2021 Loongson Technology Corporation Limited > + */ > +#ifndef _ASM_SPINLOCK_TYPES_H > +#define _ASM_SPINLOCK_TYPES_H > + > +#include > +#include > + > +#endif Also see the many lkml threads on this, is there big enough loongson to justify qspinlock? Have you tried a ticket lock?