From patchwork Mon Dec 10 00:00:01 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "boojin.kim" X-Patchwork-Id: 1854861 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id 181613FCF2 for ; Mon, 10 Dec 2012 00:02:47 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1Thqn6-000659-WA; Mon, 10 Dec 2012 00:00:13 +0000 Received: from mailout3.samsung.com ([203.254.224.33]) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1Thqn0-00062T-EH for linux-arm-kernel@lists.infradead.org; Mon, 10 Dec 2012 00:00:07 +0000 Received: from epcpsbgm2.samsung.com (epcpsbgm2 [203.254.230.27]) by mailout3.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MES009AUFZFW080@mailout3.samsung.com> for linux-arm-kernel@lists.infradead.org; Mon, 10 Dec 2012 09:00:00 +0900 (KST) Received: from epcpsbgm2.samsung.com ( [203.254.230.51]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 8A.62.12699.00625C05; Mon, 10 Dec 2012 09:00:00 +0900 (KST) X-AuditID: cbfee61b-b7f616d00000319b-00-50c52600c30a Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 3A.62.12699.00625C05; Mon, 10 Dec 2012 09:00:00 +0900 (KST) Received: from DOBOOJINKIM03 ([12.23.119.77]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MES00EY2G00P190@mmp2.samsung.com> for linux-arm-kernel@lists.infradead.org; Mon, 10 Dec 2012 09:00:00 +0900 (KST) From: Boojin Kim To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org References: In-reply-to: Subject: [PATCH 3/3] ARM: MM: Add the workaround of Errata 766421 Date: Mon, 10 Dec 2012 09:00:01 +0900 Message-id: <001901cdd669$4cd77070$e6865150$%kim@samsung.com> X-Mailer: Microsoft Office Outlook 12.0 Thread-index: Ac3WZaq4ai+zcSB3TK2VBDX2Gj8fbAAABBCwAAAY9EAAAMZlIA== Content-language: ko DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrDLMWRmVeSWpSXmKPExsVy+t8zY10GtaMBBtM61S02Pb7G6sDosXlJ fQBjFJdNSmpOZllqkb5dAlfG0bPNbAU/BSteNnWyNzBe4uti5OSQEDCR2PDrDTuELSZx4d56 ti5GLg4hgWWMEjfXrGaGKWq68owFIjGdUeLrhAYoZxmTxP3nD8Cq2AQ0JWZ8nw42SkTATeJG YwcTSBGzwAVGiZ37vgElOIA6uCVWNweB1HAK8Eis+9PJDBIWFnCUmHAezGQRUJW4fEEHpIJX wFZi46VbjCBhCQF1iUd/dUFMEQEniUNH1UAqmAVEJPa9eMcIYrMICEh8m3yIBaJaVmLTAWaQ 9RIC39kk9h04xAbxiaTEwRU3WCYwis5C0r6AkXEVo2hqQXJBcVJ6rpFecWJucWleul5yfu4m RkgQS+9gXNVgcYhRgINRiYc3QPFogBBrYllxZe4hRgkOZiURXq5jRwKEeFMSK6tSi/Lji0pz UosPMfoAXTWRWUo0OR8YYXkl8YbGxiZmJqYm5pam5qY4hJXEeZs9UgKEBNITS1KzU1MLUotg xjFxcEo1MG46uq8v4fmiuuBPUr6/hA97FZyca1Metn1z3KYD7nV2D1uMouZ0Jq5fuFSoY7em /j6pN4cfPNSM/afTuTB/X8kB3egfX69s/CLsaSV8tTvvjqR6zE2jFalBJ/eey/t76ryblZuX +ilPL3fDRxmMOvra+/9dea35bteMa4mqyy8Ez5NR6VC1+qjEUpyRaKjFXFScCABb6imPjwIA AA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrNIsWRmVeSWpSXmKPExsVy+t9jQV0GtaMBBqfWKllsenyN1YHRY/OS +gDGqAZGm4zUxJTUIoXUvOT8lMy8dFsl7+B453hTMwNDXUNLC3MlhbzE3FRbJRefAF23zByg qUoKZYk5pUChgMTiYiV9O0wTQkPcdC1gGiN0fUOC4HqMDNBAwjrGjKNnm9kKfgpWvGzqZG9g vMTXxcjJISFgItF05RkLhC0mceHeerYuRi4OIYHpjBJfJzSwQDjLmCTuP3/ADFLFJqApMeP7 dHYQW0TATeJGYwcTSBGzwAVGiZ37vgElOIA6uCVWNweB1HAK8Eis+9PJDBIWFnCUmHAezGQR UJW4fEEHpIJXwFZi46VbjCBhCQF1iUd/dUFMEQEniUNH1UAqmAVEJPa9eMc4gZF/FhJ3ASPj KkbR1ILkguKk9FwjveLE3OLSvHS95PzcTYzgGHkmvYNxVYPFIUYBDkYlHt4AxaMBQqyJZcWV uYcYJTiYlUR4uY4dCRDiTUmsrEotyo8vKs1JLT7E6AN03kRmKdHkfGD85pXEGxqbmBlZGplZ GJmYm+MQVhLnbfZICRASSE8sSc1OTS1ILYIZx8TBKdXAqLAgWP3Xubs8d69bmxxe7fJD2qxg pVxxPvs84Qu/t/i5N6lP8rs6lV17e/DDyOmrddcvdRFR3V3/YwLvp1m5y5TM3rS/ijJdvOmK zt49TD0bzv9RerTuR0rmeY4JZ/7xLGzi8cpW0EzbXzVxr+2R/dvZPqTzqu/a8cLAv6ZG9EbJ 3f6Q4KsLpimxFGckGmoxFxUnAgCpEzvfvgIAAA== X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20121209_190006_799676_5B84B0F8 X-CRM114-Status: GOOD ( 10.17 ) X-Spam-Score: -7.6 (-------) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-7.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high trust [203.254.224.33 listed in list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.7 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: 'Boojin Kim' , 'Will Deacon' , 'Kukjin Kim' , 'Russell King' , 'Catalin Marinas' X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org This patch adds the workaround of errata 766421 that adds 'dmb' when changing the translation regime after conditions that the errata 766421 may occur. Concretely, Add 'dmb' when changing ASID and secure state for cortex-A15 r0p4. Signed-off-by: Boojin Kim --- arch/arm/Kconfig | 13 +++++++++++++ arch/arm/mach-exynos/Kconfig | 1 + arch/arm/mm/proc-v7-2level.S | 2 ++ 3 files changed, 16 insertions(+), 0 deletions(-) -- 1.7.5.4 diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 93397da..9bd34dd 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -1417,6 +1417,19 @@ config ARM_ERRATA_775420 to deadlock. This workaround puts DSB before executing ISB if an abort may occur on cache maintenance. +config ARM_ERRATA_766421 + bool "ARM errata: Strongly-Ordered/Device load or NC LDREX could return incorrect data" + depends on CPU_V7 + help + This option enables the workaround for the erratum 766421 affecting + Cortex-A15 erratum (r0p4). + In certain situations, a strongly ordered or device load instruction, + or a non-cacheable normal memory load-exclusive instruction could + match multiple fill buffers and return incorrect data. + This workaround is add DMB instruction when making any change to the + translation regime and before doing any new loads/stores/preloads + in the new translation regime. + config ARM_ERRATA_773022 bool "ARM errata: incorrect instructions may be executed from loop buffer" depends on CPU_V7 diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig index bb92f4c..4e28e1c 100644 --- a/arch/arm/mach-exynos/Kconfig +++ b/arch/arm/mach-exynos/Kconfig @@ -66,6 +66,7 @@ config SOC_EXYNOS5250 select S5P_PM if PM select S5P_SLEEP if PM select SAMSUNG_DMADEV + select ARM_ERRATA_766421 help Enable EXYNOS5250 SoC support diff --git a/arch/arm/mm/proc-v7-2level.S b/arch/arm/mm/proc-v7-2level.S index fd045e7..c663b2e 100644 --- a/arch/arm/mm/proc-v7-2level.S +++ b/arch/arm/mm/proc-v7-2level.S @@ -53,6 +53,8 @@ ENTRY(cpu_v7_switch_mm) #endif #ifdef CONFIG_ARM_ERRATA_754322 dsb +#elif CONFIG_ARM_ERRATA_766421 + dmb #endif mcr p15, 0, r1, c13, c0, 1 @ set context ID isb