Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1852192yba; Thu, 25 Apr 2019 06:48:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqwJu4eJ+R7vSBposQ522X83sOECvjlgOUEpiTAgWHMnbT2Jah7hhb3MUfc1t8K9VVz4TUF+ X-Received: by 2002:a63:dd58:: with SMTP id g24mr8246550pgj.161.1556200099468; Thu, 25 Apr 2019 06:48:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556200099; cv=none; d=google.com; s=arc-20160816; b=f//ZcDwHrUtehCs0s467KhU9yLeBpnf71pIRFWuzEr5n8PmVP79bgL1rzUhbG2i48y PtFwCAj1X+4e/PE0Ex6UOK2sli6MK2s4XV26a4tYKPziywbdi+tidq06MS3m2xm7BxVZ UNycUDUcaX6EogR3lcgu7QOQmWcy3P64Argt+xs9HGSpp05yG+rgs8KgI28zFuR+Nc7E c1iz+p7JvBktx9fA8bVn2+tWMcQWV3Wvn2i0Hh+amQokA+4F3dQnYqE45+4ASb5cPBbn IBCadokXwGsOR/D55ebyizI9cZrXslosA28YcX0Hdr0sXrqOeAD0MenVthInFVq/7LIP 1Tjg== 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=1mhLaBVtlPYKS1iXS95U5oC8JsPC25v6G6wjYpaoF54=; b=Q2/w9UKloiKzcvjX6omyN7ZLp0t0A6lgN8+vOaEvuoPawzfUq3UBXhko4qXYwRub7K +qen9xAAqNMGBr1ghEdCWqenTybAi5E2z0LRq4KjixPwi+pucEycG2FEruDudK678gyY 2PqpnktCZOBUgrgdSO3iqofC/nxPdP9SKBxgIoCtUIhMb2B3bfTNoiFY2tNccWmFzbSo FLaujX3e2zTqNxdY1zpmxtzqABXjuLnJFmWmIrlNwH9dVGY/hY7vNvR6bCWlHGq61GAN ymxNqKEsPXGNz6eCui1refbkOUFhOiJFTAQ1Cfd6eDulhKHH+O/GwCiK2rUaD3+pe2gh uXIg== 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 v23si4483140pfm.186.2019.04.25.06.48.04; Thu, 25 Apr 2019 06:48:19 -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 S1727698AbfDYMPF (ORCPT + 99 others); Thu, 25 Apr 2019 08:15:05 -0400 Received: from mail.loongson.cn ([114.242.206.163]:58565 "EHLO mail.loongson.cn" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726071AbfDYMPF (ORCPT ); Thu, 25 Apr 2019 08:15:05 -0400 Received: by ajax-webmail-mail (Coremail) ; Thu, 25 Apr 2019 20:14:27 +0800 (GMT+08:00) X-CM-HeaderCharset: UTF-8 X-Originating-IP: [222.210.139.220] Date: Thu, 25 Apr 2019 20:14:27 +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: <20190425090907.GB14281@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> <20190425090907.GB14281@hirez.programming.kicks-ass.net> X-SendMailWithSms: false Content-Transfer-Encoding: base64 X-CM-CTRLDATA: nRVDSGZvb3Rlcl90eHQ9Mzc3Mjo3MzQ= Content-Type: text/plain; charset=UTF-8 MIME-Version: 1.0 Message-ID: <2868b58c.c040.16a546b1ea1.Coremail.huangpei@loongson.cn> X-CM-TRANSID: QMiowPDxpuSjpMFc7r_JAA--.11176W X-CM-SenderInfo: xkxd0whshlqz5rrqw2lrqou0/1tbiAQALAVEBqdXJxQABsq 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 NzowOTowNyAo5pif5pyf5ZubKQ0KPiDmlLbku7bkuro6IGh1YW5ncGVpQGxvb25nc29uLmNuDQo+ IOaKhOmAgTogIlBhdWwgQnVydG9uIiA8cGF1bC5idXJ0b25AbWlwcy5jb20+LCAic3Rlcm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