Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp302813imm; Wed, 11 Jul 2018 02:44:49 -0700 (PDT) X-Google-Smtp-Source: AAOMgpd0ctsx4x0yz4AKMTSrDL/2z3vnaZcoNHJMWi5fPigtMjrNGNkoSx1WfGNRxNxuEJafwXVI X-Received: by 2002:a17:902:2702:: with SMTP id c2-v6mr27743282plb.297.1531302289825; Wed, 11 Jul 2018 02:44:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531302289; cv=none; d=google.com; s=arc-20160816; b=wGRuE0RSS4gL01oD3ASzlJ1kj/9CezO7tgFMKinJ4XBQ3WDGEC/reRimnV9CsitijG qKXUmOVy6Nh2DVaX3euEVFPGfzy7B6tztiqckV3CLAue+y6JDdT3r4f9SqoLKOTA+1TK dSM4Vm++FEkndAsA5DD3TK2lGK1Aq48joSRiJ7K5Fddui8ETjRlVUtSYa5gNORnJ+V3J Ld2+8o08LUmcRTLLixghIDZIJkBafkOPQ8c0NB2thOEpuN7qCtagT/xM6rDhS5lKiirZ QORNNGxS9xZsmIbGaPbE0ytgRqsWmRlmygXtqYNFFaJAocUOTD/Ay7RVeyc5DscoHXi6 Gv5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date :arc-authentication-results; bh=EY1z4hNx7c/5Qfa11EgQ4+aMyGWVIA7onSGomqmsjq8=; b=edQ7Ke9kDCmTQv3Pc484fTmxRELZcNvGm3Ahd8/753cMUUylJ2Z062W0udZ6zKMpOQ 8tSh3zEpv1F91rxsGdVcLxIDKkjUcUPi+82v/Y2J/KmWvr/e7LXlBc7ngqxmrGDR41OA 7KzkYYPpKzgfKd37aHmowmYZaCCjnu9TgIdSIj+geFuWjPa483GCFLT/inDRhZX0Z78F rbz90m2or+4fg6Z3i88AmqO09sNuhgEfuDoXpg2dU2e/3kBmgAnWKg2QfHpNE8fnkWSx tkcgvOb7L6MDrlaxqFoLbeGEkM1pJqjxW66E2TbzBVD/WO84d1hpZ5lotwmS8SIfHA0G dfxQ== 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 n11-v6si17474667plk.225.2018.07.11.02.44.33; Wed, 11 Jul 2018 02:44:49 -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 S1732714AbeGKJqZ (ORCPT + 99 others); Wed, 11 Jul 2018 05:46:25 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:60334 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726637AbeGKJqZ (ORCPT ); Wed, 11 Jul 2018 05:46:25 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 7535E1682; Wed, 11 Jul 2018 02:42:57 -0700 (PDT) Received: from edgewater-inn.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 466CD3F318; Wed, 11 Jul 2018 02:42:57 -0700 (PDT) Received: by edgewater-inn.cambridge.arm.com (Postfix, from userid 1000) id 4F4891AE3828; Wed, 11 Jul 2018 10:43:39 +0100 (BST) Date: Wed, 11 Jul 2018 10:43:39 +0100 From: Will Deacon To: =?utf-8?B?6ZmI5Y2O5omN?= Cc: Peter Zijlstra , Paul Burton , Ralf Baechle , James Hogan , linux-mips , Fuxin Zhang , wuzhangjin , stable , Alan Stern , Andrea Parri , Boqun Feng , Nicholas Piggin , David Howells , Jade Alglave , Luc Maranget , "Paul E. McKenney" , Akira Yokosawa , LKML Subject: Re: [PATCH V2] MIPS: implement smp_cond_load_acquire() for Loongson-3 Message-ID: <20180711094338.GD13963@arm.com> References: <1531103198-16764-1-git-send-email-chenhc@lemote.com> <20180709164939.uhqsvcv4a7jlbhvp@pburton-laptop> <20180710093637.GF2476@hirez.programming.kicks-ass.net> <20180710105437.GT2512@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Huacai, On Tue, Jul 10, 2018 at 07:45:22PM +0800, 陈华才 wrote: > I don't think this is a hardware bug, in design, SFB will flushed to L1 > cache in three cases: > 1, data in SFB is full (be a complete cache line); > 2, there is a subsequent read access in the same cache line; > 3, a 'sync' instruction is executed. I'd expect successful LL/SC, cache maintenance (and potentially TLB) operations to flush your SFB as well, not that I think that provides a better workaround than throwing a 'sync' into cpu_relax(). I assume the SFB is all physically addressed? Generally, CPU architectures guarantee that store buffers drain "in finite time" which is a pretty crappy guarantee, but one which tends to be sufficient in practice and therefore relied upon by software. Will