Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933510AbbFWQ2o (ORCPT ); Tue, 23 Jun 2015 12:28:44 -0400 Received: from foss.arm.com ([217.140.101.70]:51839 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933448AbbFWQ23 (ORCPT ); Tue, 23 Jun 2015 12:28:29 -0400 Date: Tue, 23 Jun 2015 17:28:26 +0100 From: Will Deacon To: Vineet Gupta Cc: "Peter Zijlstra (Intel)" , lkml , "linux-arch@vger.kernel.org" , "arc-linux-dev@synopsys.com" Subject: Re: [PATCH v3 22/28] ARCv2: barriers Message-ID: <20150623162826.GB11638@arm.com> References: <20150623092624.GG31504@arm.com> <1435053126-4716-1-git-send-email-vgupta@synopsys.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1435053126-4716-1-git-send-email-vgupta@synopsys.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1662 Lines: 51 On Tue, Jun 23, 2015 at 10:52:06AM +0100, Vineet Gupta wrote: > ARCv2 based HS38 cores are weakly ordered and thus explicit barriers for > kernel proper. > > SMP barrier is provided by DMB instruction which also guarantees local > barrier hence used as backend of smp_*mb() as well as *mb() APIs > > Also hookup barriers into MMIO accessors to avoid ordering issues in IO > > Cc: Peter Zijlstra (Intel) > Cc: Will Deacon > Signed-off-by: Vineet Gupta > --- > Changes since v2 > * lkml discussion link points to lkml redirector (PeterZ) > * Updated comment about IO ordering to use standard LD/ST (Will Deacon) > > Changes since v1 > * Better changelog and comments > * local/mandatory barriers to NOT use DSYNC, but DMB > * define DMB based mandatory barriers even for !SMP > --- [...] > +/* > + * MMIO can also get buffered/optimized in micro-arch, so barriers needed > + * Based on ARM model for the typical use case > + * > + * > + * wmb() > + * > + * or: > + * > + * rmb() > + * > + * > + * http://lkml.kernel.org/r/20150622133656.GG1583@arm.com > + */ If that makes sense to you, then fine, but I find the wmb() and rmb() a bit odd since they're implied by the writel/readl macros. Regardless, you can keep my reviewed-by from last time. Will -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/