Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1969059yba; Thu, 25 Apr 2019 08:34:18 -0700 (PDT) X-Google-Smtp-Source: APXvYqzsvypITIJPH8ZBiwW3TgXpbz9FtFz4mEAcUp9ZZD3VTOQ4p9V/vs6eEFZ0jMUB6FvlMETs X-Received: by 2002:a63:5061:: with SMTP id q33mr36255054pgl.218.1556206458035; Thu, 25 Apr 2019 08:34:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556206458; cv=none; d=google.com; s=arc-20160816; b=FkJEbBumBbtxhESCFlQU3h+blZPvd5JbrPOkRxUdnTaG6YN861j5q4HbmVJHzMgX/c jcGioGMGkYTZUHC5CM5u6HD5JaV/nbgNx0jexXexP92fgoHQ+5TNxdqVMLXvMBDq3j+8 9kMXuqAhF85gIKJZ1V0cu2jjdDQ1DT+QeMrEz5ObOs17r7TpkM3xSheVS+sDHr9k81Ni V23kGDGrCv0tPKI78pTaT9Z8/Zk13HymUrINpIuQ5n00AOnu9hCyeOVtlRXM/6JtX2vk sKHdxPQxOpXYwR1ZyGwah8X5NX2zhoEB+xpVus9nDAY/lbzK251vacRKrnSfUsd74B2A dtKQ== 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=CpOk7IwqPi0bJ/bTGEwHfrmy8zfW17TY1zxYbzZ9OjI=; b=vzcrg+xLBQoUsGiS/4GfBoRC/aX3cOPh1gJrXI/oQGKlCNgirhtDzoq3GjHX3gZGIz sy5PaLy8s2hPrrVdPrYDnzM7guDbdZbISsO2R8Ds2i8uT2Evq7dlrsrMLogTcvG/0/df afIFNN+RmBKCfDJ4ruOn/S93LQt67GOaKYjcA9RrUk+J/As+nUAzhEzkMzwrlro+RJey zrBK6kH4zg8WP8QJAcyI4elzup4Hz72WlMSGYdxBs6SraosLLq9F1aOYDT1myYPrD1eu moZL91bwtJx7pWhrXeycOpkZx+6usKjtbsd9A/xLM4NeiftvPHNAmXQd5msYzltOno1k 3W6g== 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 s2si22938992plr.110.2019.04.25.08.34.01; Thu, 25 Apr 2019 08:34:18 -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 S1728594AbfDYLdX (ORCPT + 99 others); Thu, 25 Apr 2019 07:33:23 -0400 Received: from mail.loongson.cn ([114.242.206.163]:57755 "EHLO mail.loongson.cn" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727218AbfDYLdW (ORCPT ); Thu, 25 Apr 2019 07:33:22 -0400 Received: by ajax-webmail-mail (Coremail) ; Thu, 25 Apr 2019 19:32:59 +0800 (GMT+08:00) X-CM-HeaderCharset: UTF-8 X-Originating-IP: [222.210.139.220] Date: Thu, 25 Apr 2019 19:32:59 +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: [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: <20190425073348.GV11158@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> X-SendMailWithSms: false Content-Transfer-Encoding: base64 X-CM-CTRLDATA: +hpso2Zvb3Rlcl90eHQ9MzY1Mjo3MzQ= Content-Type: text/plain; charset=UTF-8 MIME-Version: 1.0 Message-ID: <5b13fd3b.c031.16a54452744.Coremail.huangpei@loongson.cn> X-CM-TRANSID: QMiowPDx77_rmsFcubnJAA--.7732W X-CM-SenderInfo: xkxd0whshlqz5rrqw2lrqou0/1tbiAQALAVEBqdXJaAACsE 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+IOWPkemAgeaXtumXtDogMjAxOS0wNC0yNSAx NTozMzo0OCAo5pif5pyf5ZubKQ0KPiDmlLbku7bkuro6IGh1YW5ncGVpQGxvb25nc29uLmNuDQo+ IOaKhOmAgTogIlBhdWwgQnVydG9uIiA8cGF1bC5idXJ0b25AbWlwcy5jb20+LCAic3Rlcm5Acm93 bGFuZC5oYXJ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