Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp2869505pxf; Sun, 28 Mar 2021 04:43:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw15XAaC/3FjEmrwtchZ1xCk1/4DqdWsX1pOtyadlsa/Tvv6bKTbeZYuwsHhb6V0bxcpSFZ X-Received: by 2002:a17:906:24c7:: with SMTP id f7mr23525038ejb.473.1616931790835; Sun, 28 Mar 2021 04:43:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616931790; cv=none; d=google.com; s=arc-20160816; b=rvrbm/Fug+ZBYZ+lTjN/vnelet2VQF4RWo7pemeFyavRckXUS+lo7otMJIw3lLwKCX pe3L6PqTy1I8Oolo59lLFGoM2Uh/NrkECMd5HH4qjujTAQkb7weGT/o+Xk8ePX5a/siw iMexSr/WveagfYl3MPqXIvtFWJb2zIvDwYGlyf8+cWOKepRf1ZwRdfC6eCxjh6q40QU0 6lVmI5gzsWJXhifANwH18yfAjN7dgkDlr++dsH2G6UX9ZOJYGCL2siGhMhAmjTHYWNHX JkTQwxXn53CWyt3dp1aA7ZdB2T5WuctOpz6m0QaGupxBfr101z5efW1lB9kzNUTsKdxu +NBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=u9+uPN3ZuuHGDJfO7yHJWEJZT06F6DUWNxrPo9GXHxo=; b=v7LWPVgokb8SoeoMBTdtPo8AcqZIc4yAORapWNtEq8cJZS/k1Fz79JmhY14XEItXu0 BIXSg7EfUiTkwxbV8u5zLB8bMLguPQvuX3LbYMqJ4k45kKMos/c6Gzz8rU1RXzn6KHe/ wi61hxUbiAOMoSkFBH+tc8McYaWbtv+cjKbeMeGCJQ3CIBoQfnF4sSVrH4Hgc1gM19Xs 9iW+NiK6ajq7YHDcDnHuaCOjwKckDjdDbrLODAcSRFGufOADi+ZHmOldewqmaCXIF6Lq TNL4pSg1mdmF4kynyoZOtW5jD+vW1/Po2sZdD/U0ErWxUSC4QL2Zg9e6k9LLcMmqpPgP kLxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=DugdbpT4; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i25si10505005eje.58.2021.03.28.04.42.48; Sun, 28 Mar 2021 04:43:10 -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=@kernel.org header.s=k20201202 header.b=DugdbpT4; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229503AbhC1Lhe (ORCPT + 99 others); Sun, 28 Mar 2021 07:37:34 -0400 Received: from mail.kernel.org ([198.145.29.99]:41110 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231260AbhC1LhF (ORCPT ); Sun, 28 Mar 2021 07:37:05 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 9E3B96197C; Sun, 28 Mar 2021 11:37:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1616931420; bh=8r+E9jML76H0gCn8zByIpf9ts7froA6i3yzLNHuBvN4=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=DugdbpT4GDM1HZeaem5soSAi/FHElDFHhmz2xIpsZJUkasWv28ZB3zgK93tR/c1EG Wg6UZIL/32OGSKHjIL7I3TejYIFIJatZ2S0hfZTZhMaw3y2P3h3z4TJdRouH33c2P4 a0vFE4t1YxIuiIc5HdVc8iBz2z/pz1daXtvTbooBxBTN2T1IZ64j2pxee2ABx/u+UN R9Tpd5W1OnKdE7r9gQzXgqssvnkZagFrOM0DWS5GTeRlV6XS25xWzL3c0iO1XPbWAb sCLOKxIHwnhTcR+YQphOeEdtMjQrjqZYOIz3pgbUdAYY8+PAy495HKeu1P90Dt67iE cgL/CGET6Tr6g== Received: by mail-lf1-f44.google.com with SMTP id q29so14175994lfb.4; Sun, 28 Mar 2021 04:37:00 -0700 (PDT) X-Gm-Message-State: AOAM5330m1XrE5OgTu5q3ngejJWzGUDNGl8342twXJp9PSj4WYCmr3oD FYrhOux5BGjkQyDNKef7fm0FBwvqH+4PVjgndZw= X-Received: by 2002:a19:f501:: with SMTP id j1mr14083138lfb.231.1616931418962; Sun, 28 Mar 2021 04:36:58 -0700 (PDT) MIME-Version: 1.0 References: <1616913028-83376-1-git-send-email-guoren@kernel.org> <1616913028-83376-5-git-send-email-guoren@kernel.org> In-Reply-To: From: Guo Ren Date: Sun, 28 Mar 2021 19:36:47 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v5 4/7] powerpc/qspinlock: Add ARCH_USE_QUEUED_SPINLOCKS_XCHG32 To: Christophe Leroy Cc: linux-arch , linux-xtensa@linux-xtensa.org, Guo Ren , Linux Kernel Mailing List , linux-csky@vger.kernel.org, openrisc@lists.librecores.org, Paul Mackerras , sparclinux , linux-riscv , linuxppc-dev@lists.ozlabs.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Mar 28, 2021 at 7:14 PM Christophe Leroy wrote: > > > > Le 28/03/2021 =C3=A0 08:30, guoren@kernel.org a =C3=A9crit : > > From: Guo Ren > > > > We don't have native hw xchg16 instruction, so let qspinlock > > generic code to deal with it. > > We have lharx/sthcx pair on some versions of powerpc. > > See https://patchwork.ozlabs.org/project/linuxppc-dev/patch/2020110703232= 8.2454582-1-npiggin@gmail.com/ Got it, thx for the information. > > Christophe > > > > > Using the full-word atomic xchg instructions implement xchg16 has > > the semantic risk for atomic operations. > > > > This patch cancels the dependency of on qspinlock generic code on > > architecture's xchg16. > > > > Signed-off-by: Guo Ren > > Cc: Michael Ellerman > > Cc: Benjamin Herrenschmidt > > Cc: Paul Mackerras > > --- > > arch/powerpc/Kconfig | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig > > index 386ae12d8523..69ec4ade6521 100644 > > --- a/arch/powerpc/Kconfig > > +++ b/arch/powerpc/Kconfig > > @@ -151,6 +151,7 @@ config PPC > > select ARCH_USE_CMPXCHG_LOCKREF if PPC64 > > select ARCH_USE_QUEUED_RWLOCKS if PPC_QUEUED_SPINLOCKS > > select ARCH_USE_QUEUED_SPINLOCKS if PPC_QUEUED_SPINLOCKS > > + select ARCH_USE_QUEUED_SPINLOCKS_XCHG32 if PPC_QUEUED_SPINLOCKS > > select ARCH_WANT_IPC_PARSE_VERSION > > select ARCH_WANT_IRQS_OFF_ACTIVATE_MM > > select ARCH_WANT_LD_ORPHAN_WARN > > --=20 Best Regards Guo Ren ML: https://lore.kernel.org/linux-csky/