Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp5976171rwb; Tue, 1 Aug 2023 10:22:47 -0700 (PDT) X-Google-Smtp-Source: APBJJlHs3DaBH8CIQrERbx1XCcILAVfLrBGHTWNZIRh8yJA4VyWcYKKovkWlgsjLF5CgD7h6okRb X-Received: by 2002:a17:902:ea0f:b0:1b5:674d:2aa5 with SMTP id s15-20020a170902ea0f00b001b5674d2aa5mr16004376plg.13.1690910567382; Tue, 01 Aug 2023 10:22:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690910567; cv=none; d=google.com; s=arc-20160816; b=AsO1hqZsZWu+c4rG8xteaa5iQ9ABF99k2Y0VGK1C1/8yIMmut5bTLglCz82mLZZdZ2 iYGH2YZdfC4x2wzp/sQWflaaDDfncZvIWEg+M2DElzH0XRO1B+pDzDzlUIF8+rdW0N+V PJiDlc7dS4DNLKdgeDiMOBCGl4vljo+EXpJCNbsk+x8D+80FEolQ4c8Um12TdRHSHG/4 coIARxmQ4353Pp5O1f9nTNE5v8EwxRYVkGqnCXjWkV2dJpLF2tWaLTWInsBGmrzRnP6A S8PXI0ktJoURgj27S9izMo6qGZa3jrGuudBQToGfISg77Pb18tUgTkd99Dc05mGLK6LY L45g== 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; bh=MgYnKOEoZLVGcjSgExObomzm5aysEw93FiOAYYrcP9M=; fh=PxxAVadtOQjMRcRmDo2Jb4n9TPl92Nihns72TrQ/54E=; b=p0MXohzR1pyg2M0lUS954GONLWZWUkeEaiPAW2mulQOGaS8TW15r4ekJnGDe0Unmpz H75aGlkV7cZuZU/FNcVo/QezuPc0f4mNBu/Mp2/jZnFETRxRz7cnIsYWNYkGeoWNohjI +3W4awok71bo7MIMcgiDzup87zTWBARTFByVH4MwTpBaiaDqCWh/a12jVdCGQnURhniy G0wtKCPGWOMnNmoY7ESyEHQWyFpT/DHTOYBu62rDb4jGSKNhR42fqXL1CPlUFdqIAdfv iZaCfKdWT3ZB5XFGJOFotOpt1vvLZ3GFuwrdJSwCYShg9R8xE0zM3wuc1n/vo3JCrbmI cqYg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n10-20020a170902d0ca00b001b20e2ba8e1si5487598pln.23.2023.08.01.10.22.33; Tue, 01 Aug 2023 10:22:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230291AbjHAQhO convert rfc822-to-8bit (ORCPT + 99 others); Tue, 1 Aug 2023 12:37:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60078 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229845AbjHAQhN (ORCPT ); Tue, 1 Aug 2023 12:37:13 -0400 Received: from mail.loongson.cn (mail.loongson.cn [114.242.206.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 2B8361FD6 for ; Tue, 1 Aug 2023 09:37:09 -0700 (PDT) Received: from loongson.cn (unknown [209.85.128.42]) by gateway (Coremail) with SMTP id _____8DxPOuzNMlkTjcOAA--.28253S3; Wed, 02 Aug 2023 00:37:08 +0800 (CST) Received: from mail-wm1-f42.google.com (unknown [209.85.128.42]) by localhost.localdomain (Coremail) with SMTP id AQAAf8DxJ82yNMlkqzREAA--.44521S3; Wed, 02 Aug 2023 00:37:07 +0800 (CST) Received: by mail-wm1-f42.google.com with SMTP id 5b1f17b1804b1-3fbc77e76abso54357765e9.1 for ; Tue, 01 Aug 2023 09:37:07 -0700 (PDT) X-Gm-Message-State: ABy/qLYXX2vhZLiGZXt0Hu8DUQcGbwTpIOUi08Xn1mQRHt6/wtpEPO0F gxZ1vlACi7rT2O8D0KLwHTrNLm2nheZf3xnkHzj/Xw== X-Received: by 2002:a05:600c:141:b0:3fb:fca1:1965 with SMTP id w1-20020a05600c014100b003fbfca11965mr2677036wmm.18.1690907825594; Tue, 01 Aug 2023 09:37:05 -0700 (PDT) MIME-Version: 1.0 References: <20230801011554.3950435-1-guoren@kernel.org> In-Reply-To: From: WANG Rui Date: Wed, 2 Aug 2023 00:36:54 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] LoongArch: Fixup cmpxchg sematic for memory barrier To: Guo Ren Cc: chenhuacai@kernel.or, kernel@xen0n.name, arnd@arndb.de, andi.shyti@linux.intel.com, andrzej.hajda@intel.com, peterz@infradead.org, will@kernel.org, boqun.feng@gmail.com, mark.rutland@arm.com, loongarch@lists.linux.dev, linux-kernel@vger.kernel.org, Guo Ren Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT X-CM-TRANSID: AQAAf8DxJ82yNMlkqzREAA--.44521S3 X-CM-SenderInfo: pzdqw2txl6z05rqj20fqof0/ X-Coremail-Antispam: 1Uk129KBjDUn29KB7ZKAUJUUUUU529EdanIXcx71UUUUU7KY7 ZEXasCq-sGcSsGvfJ3Ic02F40EFcxC0VAKzVAqx4xG6I80ebIjqfuFe4nvWSU5nxnvy29K BjDU0xBIdaVrnRJUUU90b4IE77IF4wAFF20E14v26r1j6r4UM7CY07I20VC2zVCF04k26c xKx2IYs7xG6rWj6s0DM7CIcVAFz4kK6r1j6r18M28lY4IEw2IIxxk0rwA2F7IY1VAKz4vE j48ve4kI8wA2z4x0Y4vE2Ix0cI8IcVAFwI0_Jr0_JF4l84ACjcxK6xIIjxv20xvEc7CjxV AFwI0_Jr0_Gr1l84ACjcxK6I8E87Iv67AKxVWUJVW8JwA2z4x0Y4vEx4A2jsIEc7CjxVAF wI0_Jr0_Gr1le2I262IYc4CY6c8Ij28IcVAaY2xG8wAqjxCEc2xF0cIa020Ex4CE44I27w Aqx4xG64xvF2IEw4CE5I8CrVC2j2WlYx0E2Ix0cI8IcVAFwI0_Jr0_Jr4lYx0Ex4A2jsIE 14v26r1j6r4UMcvjeVCFs4IE7xkEbVWUJVW8JwACjcxG0xvEwIxGrwCF04k20xvY0x0EwI xGrwCF54CYxVAaw2AFwI0_Jrv_JF1l4I8I3I0E4IkC6x0Yz7v_Jr0_Gr1l4IxYO2xFxVAF wI0_Jrv_JF1lx2IqxVAqx4xG67AKxVWUJVWUGwC20s026x8GjcxK67AKxVWUGVWUWwC2zV AF1VAY17CE14v26r1q6r43MIIYrxkI7VAKI48JMIIF0xvE2Ix0cI8IcVAFwI0_Jr0_JF4l IxAIcVC0I7IYx2IY6xkF7I0E14v26r1j6r4UMIIF0xvE42xK8VAvwI8IcIk0rVWUJVWUCw CI42IY6I8E87Iv67AKxVWUJVW8JwCI42IY6I8E87Iv6xkF7I0E14v26r1j6r4UYxBIdaVF xhVjvjDU0xZFpf9x07UE-erUUUUU= X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 On Tue, Aug 1, 2023 at 6:50 PM Guo Ren wrote: > > On Tue, Aug 1, 2023 at 5:32 PM WANG Rui wrote: > > No. LL and LL won't reorder because LL implies a memory barrier(though > > not acquire semantics). > That means we could remove __WEAK_LLSC_MB totally, right? More precisely, __WEAK_LLSC_MB is intended to prevent reordering between LL and normal LD used to fetch the expected value for cmpxchg. Regards, -- WANG Rui