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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DAB84C433FE for ; Fri, 1 Oct 2021 11:04:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C40B76101A for ; Fri, 1 Oct 2021 11:04:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1353443AbhJALG2 (ORCPT ); Fri, 1 Oct 2021 07:06:28 -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?