Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp158825yba; Thu, 25 Apr 2019 20:21:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqys+JDAgp1gtVS3KIvd4oHeodeHgmqlWYZFyQuKMkBX4UYX6TCs1t0ji5CjJV5jP2Z/26C7 X-Received: by 2002:a65:60ca:: with SMTP id r10mr40906063pgv.64.1556248870981; Thu, 25 Apr 2019 20:21:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556248870; cv=none; d=google.com; s=arc-20160816; b=P60MNd5Tuhbl8r47OYn/uKS6rfrTa2tlefQt839yQdaIFW0ZJehilieFRjNcMf0Zq5 E6Be43UUL3G6SGY0Y9kYjKGKjtHJGQKw0IKZkwM4GThvOm9ZpQwzVP8sHSoF7PORAruH 0noetTYprVm1+v9IMvCmhYEbhFEcNeNEAymLDJ9ZhxpWSvRkl6ITJnn/cEQa6j/K2Rn5 4o/KHmQfYfNeSQTc+8rzrCv7vDNRjDfyruD2dV6e+pQVqeKz4ZBBfLK4CL+TJ8Y6RVIX Ek1vt2BD3KQ16l1RjsQVnvfMbi1zo6lJngYzAprIeqny2jYmG9K1uzYRlcLXsxm52O5s a5nQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:mime-version :content-transfer-encoding:references:in-reply-to:subject:cc:to:from :date; bh=xLMe3m6rz4CwIFk7RsaED1aIz5qtSuCW/03pxs+rzdA=; b=xL8r5ZM4gsLJDPnGQxUn+qPPZxGWtFZthjpErOTrma43VqYREMgNjPYR0OMym/EluK c3eNf9W8agbUVJyxk0aC4oIu/2r9ar5D+QAI5WSRs2oHa3TdVUKM3bnYSa6qr6VMdSJR CZz3rV5duxYPiRntTeb3jQCYbvHtOAIUwMizqw/txGbLnJUsds+QwhSfT3WCmCISaVur bpOvEQlIvjp60SKmocc8cqyaNkdXAxORlskJO8h4ASovg0UioFwpR1Cscm/ZDHzONkg4 uc7n3FU8nUUvCXd0wcYltZ5LUPOQ17eaBSgYgzcRkoiE4G4CqE81lg9hnRdFRtHFGRuj 2VpA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h12si16939188pgs.151.2019.04.25.20.20.55; Thu, 25 Apr 2019 20:21:10 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728506AbfDZC56 (ORCPT + 99 others); Thu, 25 Apr 2019 22:57:58 -0400 Received: from mail.loongson.cn ([114.242.206.163]:41904 "EHLO mail.loongson.cn" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726771AbfDZC56 (ORCPT ); Thu, 25 Apr 2019 22:57:58 -0400 Received: by ajax-webmail-mail (Coremail) ; Fri, 26 Apr 2019 10:57:20 +0800 (GMT+08:00) X-CM-HeaderCharset: UTF-8 X-Originating-IP: [220.166.230.208] Date: Fri, 26 Apr 2019 10:57:20 +0800 (GMT+08:00) From: huangpei@loongson.cn To: "Peter Zijlstra" Cc: "Paul Burton" , "stern@rowland.harvard.edu" , "akiyks@gmail.com" , "andrea.parri@amarulasolutions.com" , "boqun.feng@gmail.com" , "dlustig@nvidia.com" , "dhowells@redhat.com" , "j.alglave@ucl.ac.uk" , "luc.maranget@inria.fr" , "npiggin@gmail.com" , "paulmck@linux.ibm.com" , "will.deacon@arm.com" , "linux-kernel@vger.kernel.org" , "torvalds@linux-foundation.org" , "Huacai Chen" Subject: Re: Re: Re: Re: Re: [RFC][PATCH 2/5] mips/atomic: Fix loongson_llsc_mb() wreckage X-Priority: 3 X-Mailer: Coremail Webmail Server Version XT3.0.6a_preview build 20150605(69773.7394) Copyright (c) 2002-2019 www.mailtech.cn loongson In-Reply-To: <20190425133105.GV4038@hirez.programming.kicks-ass.net> References: <20190424123656.484227701@infradead.org> <20190424124421.636767843@infradead.org> <20190424211759.52xraajqwudc2fza@pburton-laptop> <2b2b07cc.bf42.16a52dc4e4d.Coremail.huangpei@loongson.cn> <20190425073348.GV11158@hirez.programming.kicks-ass.net> <5b13fd3b.c031.16a54452744.Coremail.huangpei@loongson.cn> <20190425122611.GT4038@hirez.programming.kicks-ass.net> <2ff11adc.c051.16a548cd90c.Coremail.huangpei@loongson.cn> <20190425133105.GV4038@hirez.programming.kicks-ass.net> X-SendMailWithSms: false Content-Transfer-Encoding: base64 X-CM-CTRLDATA: BPPjbWZvb3Rlcl90eHQ9Mzk0Nzo3MzQ= Content-Type: text/plain; charset=UTF-8 MIME-Version: 1.0 Message-ID: <592bc84.c106.16a57936acf.Coremail.huangpei@loongson.cn> X-CM-TRANSID: QMiowPDxpuSQc8JcYyjKAA--.11208W X-CM-SenderInfo: xkxd0whshlqz5rrqw2lrqou0/1tbiAQAMAVEBqdXPMQAAse X-Coremail-Antispam: 1Ur529EdanIXcx71UUUUU7IcSsGvfJ3iIAIbVAYjsxI4VWxJw CS07vEb4IE77IF4wCS07vE1I0E4x80FVAKz4kxMIAIbVAFxVCaYxvI4VCIwcAKzIAtYxBI daVFxhVjvjDU= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org DQoNCg0KPiAtLS0tLeWOn+Wni+mCruS7ti0tLS0tDQo+IOWPkeS7tuS6ujogIlBldGVyIFppamxz dHJhIiA8cGV0ZXJ6QGluZnJhZGVhZC5vcmc+DQo+IOWPkemAgeaXtumXtDogMjAxOS0wNC0yNSAy MTozMTowNSAo5p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2YNCiAgICBWIG91dCwgaXQg Y2FuIGJsaW5kIENQVS0xIA0KICAgIGFuZCBtYWtlIENQVS0xIGJlbGlldmUgaXQgDQogICAgc3Rp bGwgaG9sZCBFIG9uIFYsIGFuZCBjYW4NCiAgICBOT1Qgc2VlIHRoZSBzdyBmcm9tIENQVS0yDQog ICAgYWN0dWFsbHkgaW52YWxpZCBWLCB3aGljaCANCiAgICBzaG91bGQgY2xlYXIgTExCaXQgb2Yg Q1BVLTEsIA0KICAgIGJ1dCBub3QgKi8NCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg c3cgICB0MCwgViAgICAgLy8ganVzdCBhZnRlciBzdywgViA9IDANCiAgICBhZGRpdSAgdDAsIHQw LCAxICAgICAgICAgICAgDQoNCiAgICBzYyAgICAgdDAsIFYNCiAgICAvKiBvb3BzLCBzYyB3cml0 ZSB0MCgyKSANCiAgICBpbnRvIFYgd2l0aCBMTEJpdCAqLw0KDQogICAgLyogZ2V0IFY9MiAqLw0K ICAgIGJlcXogICB0MCwgMWINCiAgICBub3ANCjI6DQo9PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSAg ICANCiAgICAgICAgICAgICAgIA0KaWYgc3BlY3VsYXRpdmUgbWVtIGFjY2VzcyAqZG9lcyBub3Qq IGtpY2sgb3V0IGNhY2hlIGxpbmUgb2YgViwgQ1BVLTEgY2FuIHNlZSBzdw0KZnJvbSBDUFUtMiwg YW5kIGNsZWFyIExMQml0LCB3aGljaCBjYXVzZSBzYyBmYWlsIGFuZCByZXRyeSwgVGhhdCdzIE9L DQogDQoNCg0K5YyX5Lqs5biC5rW35reA5Yy65Lit5YWz5p2R546v5L+d56eR5oqA56S66IyD5Zut 6b6Z6Iqv5Lqn5Lia5ZutMuWPt+alvCAxMDAwOTXnlLXor506ICs4NiAoMTApIDYyNTQ2NjY45Lyg 55yfOiArODYgKDEwKSA2MjYwMDgy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