Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1877405yba; Thu, 25 Apr 2019 07:10:25 -0700 (PDT) X-Google-Smtp-Source: APXvYqzkxsgp802fOi7kMoX4FKWMe5PIRCgTW6xZ7RsQYo7dwyoXJSKaRa4Dc4JXTuehNxOSQ/ka X-Received: by 2002:a63:ed12:: with SMTP id d18mr5457742pgi.248.1556201425447; Thu, 25 Apr 2019 07:10:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556201425; cv=none; d=google.com; s=arc-20160816; b=xMP+hNsRemEe/pt4z5a/g9j+d85q1qym0/gAyyhaLzNV/TUQottJ28/qsigv/xUBuF vUyG4IttYsXm76ueIQR31XbUCNe2Dst/Duz+Boedtpp7LTT5U5C1XIYEY6LKMqczY5HW hNWt6Koy/yZ+qYFFiQew0AWdSB5C8L5kj5MuJ3sBXY/X2LlvZxJWSNNT08+AHlPhfHP2 hFviPrG5LYZE1qI7bkrPwtkIZzORrPHQKCKCBOcZYhbVi9CEwuplYE5/p0pT39cx+NjP 8RNjVN6RHY0zXq8c/sQffQ5JafwkRZXFBkFwVK/8VXRb5923Y2LkIhLtjVGiEk7Xuk/s oEvg== 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=YslnCas8iepkIlg8uNI43/hi/XG7Y4OimMxfO5JFVZw=; b=g3AxSsm0z49UnXM6ywG8xZ8H6/2FugWEYN5FIZP5B67zmMoRMOR5bKNfTrgRHZAqzH 6cMi1ivyc+SIgWYIcJ1D9UTK2Lbs+dn1yNwiei0iIB15WZtxTl4g3+EXpyEtFer2scC2 ssdIOXBVJzwYcszZ1ds0+jTX0HOXedthRF/NQM5aEW4uunZ4IObZPZkU9+g22RPTEZnj svpge764802akDScCFpcYfKjrKYnDDiHVRiLoxA1jFaFhGf7yDWrFBjWM5AqVWXaTro7 2Xnpp+L/fB/Zmq/ggErw7g4GC62l/mXep5xiY/u3/DTRpbzXeyFxtWCVGwt1NbgNRhlp dRSQ== 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 j7si24868437pfb.75.2019.04.25.07.10.03; Thu, 25 Apr 2019 07:10:25 -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 S1728164AbfDYMvq (ORCPT + 99 others); Thu, 25 Apr 2019 08:51:46 -0400 Received: from mail.loongson.cn ([114.242.206.163]:59119 "EHLO mail.loongson.cn" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726074AbfDYMvp (ORCPT ); Thu, 25 Apr 2019 08:51:45 -0400 Received: by ajax-webmail-mail (Coremail) ; Thu, 25 Apr 2019 20:51:17 +0800 (GMT+08:00) X-CM-HeaderCharset: UTF-8 X-Originating-IP: [222.210.139.220] Date: Thu, 25 Apr 2019 20:51:17 +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: [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: <20190425122611.GT4038@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> X-SendMailWithSms: false Content-Transfer-Encoding: base64 X-CM-CTRLDATA: C5u0eWZvb3Rlcl90eHQ9MzM3Mzo3MzQ= Content-Type: text/plain; charset=UTF-8 MIME-Version: 1.0 Message-ID: <2ff11adc.c051.16a548cd90c.Coremail.huangpei@loongson.cn> X-CM-TRANSID: QMiowPDxVuRFrcFcpMTJAA--.11166W X-CM-SenderInfo: xkxd0whshlqz5rrqw2lrqou0/1tbiAQALAVEBqdXKNQABsZ 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 MDoyNjoxMSAo5pif5pyf5ZubKQ0KPiDmlLbku7bkuro6IGh1YW5ncGVpQGxvb25nc29uLmNuDQo+ IOaKhOmA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