Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp678864imj; Wed, 13 Feb 2019 15:34:11 -0800 (PST) X-Google-Smtp-Source: AHgI3IazkMvcGe7dEVL5+ydeSgTGOM7mK+3I6yjCK+YBbWf0Kykgfhag2ciI4+1GGeMcnvh2o3n0 X-Received: by 2002:aa7:80c6:: with SMTP id a6mr832391pfn.40.1550100851441; Wed, 13 Feb 2019 15:34:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550100851; cv=none; d=google.com; s=arc-20160816; b=rmlLT535ZBhkT2nz/e6Qcas1ujhiXXr7Epgo3i0fltaP42MOUIKzAwteAi0nCCjs/f DnFUf0zdPiC/vwq0uC5izbb1wTGtvLbYuGcyyVZ4LRIrD9FZtadwFkaBz8l0p6yFwiEC YgdzldTbmL+vJduPUsV0sIgbCTRFSwrh4oGq9eIPaSbIIlENgDSAojYxrwcpnAzENLBN 4O9WhvNcNkIoTKTNrj58YaZWSGnZI7tkocThRvXyML4rNtTd4Mei6ycbLxiA+PUyT0JP fnjCBhvdH1GQKJ/MwYQeT1OndFIAnBoMC842EHEGXtimUwfdoCLJkqenISrzPRz5X+sd 5IwA== 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-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=oinr/nZMnXAbbjSoiZ11SFTbgmsHT/w6g4VbGHqRuyc=; b=r1DL7gV9q5OOgB56Ai2Av+93ARBzy5UYQEHK4JWuPRIHLA3HNUsnZu1foEci07Zd6a dkZTFodbn8z3lVrnQUiokpUDaA9f4YHbypV2d9JK0Gu+JE4O51etZi5rc5GPGU17prEC eFp7h8MqKYVRzjoUj0HFaGToCijUdOPttIWKj4d6r63Ov6CvPpq0+a6uHFZ9SJLYI15l 6LRUeDQbHywfQ0oWTqouIRzfz9cK42YIRiQ3kX0/j5DYyqIkAKlrG4XeaVOaXPPH+JyQ 1/NpjuqAqAjypJBNFwamw3/z2GlCixVugHOeGUUE5i6tBszsERk8JRqCcwxb/DIcPDu0 PG6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@armlinux.org.uk header.s=pandora-2014 header.b=T+jwZrkO; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s87si645733pfi.185.2019.02.13.15.33.55; Wed, 13 Feb 2019 15:34:11 -0800 (PST) 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; dkim=fail header.i=@armlinux.org.uk header.s=pandora-2014 header.b=T+jwZrkO; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404951AbfBMS16 (ORCPT + 99 others); Wed, 13 Feb 2019 13:27:58 -0500 Received: from pandora.armlinux.org.uk ([78.32.30.218]:60012 "EHLO pandora.armlinux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733194AbfBMS16 (ORCPT ); Wed, 13 Feb 2019 13:27:58 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2014; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=oinr/nZMnXAbbjSoiZ11SFTbgmsHT/w6g4VbGHqRuyc=; b=T+jwZrkOEIJfSRaDCHWsC9cXs 1fd0QA7o2lTRcbjmWJofrdEGy695eiWmLAigpSsofL7to/uM7+QAed8j8XLG/jpeWyHXl4l13d/ea cJPPpATIPnph8GHfAgku2uViPItBKzHoABRQ4yXVmADVxiZR50ivsK+AMx1bjecpMkMyg=; Received: from shell.armlinux.org.uk ([2001:4d48:ad52:3201:5054:ff:fe00:4ec]:54446) by pandora.armlinux.org.uk with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1gtzGA-00068Y-IK; Wed, 13 Feb 2019 18:27:50 +0000 Received: from linux by shell.armlinux.org.uk with local (Exim 4.89) (envelope-from ) id 1gtzG6-00035E-KM; Wed, 13 Feb 2019 18:27:46 +0000 Date: Wed, 13 Feb 2019 18:27:46 +0000 From: Russell King - ARM Linux admin To: Benjamin Gaignard Cc: arnd@arndb.de, alexandre.torgue@st.com, Jason Liu , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com Subject: Re: [PATCH 1/2] ARM: errata 814220-B-Cache maintenance by set/way operations can execute out of order. Message-ID: <20190213182746.yblgx7i7fplt2chp@shell.armlinux.org.uk> References: <20190213095613.31045-1-benjamin.gaignard@linaro.org> <20190213095613.31045-2-benjamin.gaignard@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190213095613.31045-2-benjamin.gaignard@linaro.org> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 13, 2019 at 10:56:12AM +0100, Benjamin Gaignard wrote: > Description: > The v7 ARM states that all cache and branch predictor maintenance operations > that do not specify an address execute, relative to each other, in program > order. However, because of this erratum, an L2 set/way cache maintenance > operation can overtake an L1 set/way cache maintenance operation, this would > cause the data corruption. > > This ERRATA affected the Cortex-A7 and present in r0p2, r0p3, r0p4, r0p5. > > This patch is the SW workaround by adding a DSB before changing cache levels as > the ARM ERRATA: ARM/MP: 814220 told in the ARM ERRATA documentation. > > Signed-off-by: Jason Liu > Signed-off-by: Benjamin Gaignard > --- > arch/arm/Kconfig | 10 ++++++++++ > arch/arm/mm/cache-v7.S | 3 +++ > 2 files changed, 13 insertions(+) > > diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig > index 664e918e2624..6f608558e22a 100644 > --- a/arch/arm/Kconfig > +++ b/arch/arm/Kconfig > @@ -1227,6 +1227,16 @@ config PCI_HOST_ITE8152 > default y > select DMABOUNCE > > +config ARM_ERRATA_814220 > + bool "ARM errata: Cache maintenance by set/way operations can execute out of order" > + depends on CPU_V7 > + help > + The v7 ARM states that all cache and branch predictor maintenance operations > + that do not specify an address execute, relative to each other, in program order. > + However, because of this erratum, an L2 set/way cache maintenance operation can > + overtake an L1 set/way cache maintenance operation. This ERRATA only affected the > + Cortex-A7 and present in r0p2, r0p3, r0p4, r0p5. We generally try to keep help lines so that when edited on an 80 column display, they do not wrap. Please can you reformat the above to satisfy that please? (means breaking the lines after "maintenance" on the first line.) Thanks. > + > endmenu > > menu "Kernel Features" > diff --git a/arch/arm/mm/cache-v7.S b/arch/arm/mm/cache-v7.S > index 2149b47a0c5a..7ff7b4c197cc 100644 > --- a/arch/arm/mm/cache-v7.S > +++ b/arch/arm/mm/cache-v7.S > @@ -163,6 +163,9 @@ loop2: > skip: > add r10, r10, #2 @ increment cache number > cmp r3, r10 > +#ifdef CONFIG_ARM_ERRATA_814220 > + dsb > +#endif > bgt flush_levels > finished: > mov r10, #0 @ switch back to cache level 0 > -- > 2.15.0 > > > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel > -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up According to speedtest.net: 11.9Mbps down 500kbps up