From patchwork Sun Dec 9 23:59:17 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "boojin.kim" X-Patchwork-Id: 1854851 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id 8921ADF230 for ; Mon, 10 Dec 2012 00:02:01 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1ThqmH-0005pA-VD; Sun, 09 Dec 2012 23:59:22 +0000 Received: from mailout2.samsung.com ([203.254.224.25]) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1ThqmE-0005oQ-FY for linux-arm-kernel@lists.infradead.org; Sun, 09 Dec 2012 23:59:19 +0000 Received: from epcpsbgm2.samsung.com (epcpsbgm2 [203.254.230.27]) by mailout2.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MES00L4KFYIJLA0@mailout2.samsung.com> for linux-arm-kernel@lists.infradead.org; Mon, 10 Dec 2012 08:59:17 +0900 (KST) Received: from epcpsbgm2.samsung.com ( [203.254.230.49]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 68.42.12699.5D525C05; Mon, 10 Dec 2012 08:59:17 +0900 (KST) X-AuditID: cbfee61b-b7f616d00000319b-49-50c525d53da4 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id F7.42.12699.5D525C05; Mon, 10 Dec 2012 08:59:17 +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 <0MES00GMLFYTDR60@mmp2.samsung.com> for linux-arm-kernel@lists.infradead.org; Mon, 10 Dec 2012 08:59:17 +0900 (KST) From: Boojin Kim To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org References: In-reply-to: Subject: [PATCH 2/3] ARM: MM: Add the workaround of Errata 773022 Date: Mon, 10 Dec 2012 08:59:17 +0900 Message-id: <001801cdd669$331c3850$9954a8f0$%kim@samsung.com> X-Mailer: Microsoft Office Outlook 12.0 Thread-index: Ac3WZaq4ai+zcSB3TK2VBDX2Gj8fbAAABBCwAAAY9EAAAL+/8A== Content-language: ko DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrFLMWRmVeSWpSXmKPExsVy+t8zQ92rqkcDDO6vkrPY9PgaqwOjx+Yl 9QGMUVw2Kak5mWWpRfp2CVwZV1tWsha0CVacmOPRwHiRt4uRg0NCwERi5vyyLkZOIFNM4sK9 9WwgtpDAMkaJ2UfcIeImEp83b2ftYuQCik9nlFjwfioThLOMSWL56S52kCo2AU2JGd+ng9ki Am4SNxo7wIqYBS4wSuzc940dZJuQALfE6uYgkBpOAR6JdX86mUHCwgKOEr8+h4KEWQRUJf7P OsQIEuYVsJWY+ooZ4kx1iUd/dSGGO0m09hxhBLGZBUQk9r14xwjRKSDxbfIhFohyWYlNB5hB 9ksIvGeTOPLyLRvEK5ISB1fcYJnAKDoLSfsCRsZVjKKpBckFxUnpuUZ6xYm5xaV56XrJ+bmb GCEBLL2DcVWDxSFGAQ5GJR7eAMWjAUKsiWXFlbmHGCU4mJVEeLmOHQkQ4k1JrKxKLcqPLyrN SS0+xOgDdNVEZinR5HxgdOWVxBsaG5uYmZiamFuampviEFYS5232SAkQEkhPLEnNTk0tSC2C GcfEwSnVwJgitv3BLUONI+Fz98XY8+3+u3/6koSqjQzvLGumvTnVkGPhdjLg/e7IU+WnRDhO 5XKf9GeItha1/3Nggd2O8/VeZ33D1IuvlxQJ/5Rcw8Ssr/FVW8B9Tq2l6MmEtdUOf8LORIss WL72wkcF9mUXJ61/849l8pVve2/8vrLt43oXycZ/LDO9D+9UYinOSDTUYi4qTgQAzBZtqo0C AAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrNIsWRmVeSWpSXmKPExsVy+t9jQd2rqkcDDDruSFpsenyN1YHRY/OS +gDGqAZGm4zUxJTUIoXUvOT8lMy8dFsl7+B453hTMwNDXUNLC3MlhbzE3FRbJRefAF23zByg qUoKZYk5pUChgMTiYiV9O0wTQkPcdC1gGiN0fUOC4HqMDNBAwjrGjKstK1kL2gQrTszxaGC8 yNvFyMkhIWAi8XnzdlYIW0ziwr31bF2MXBxCAtMZJRa8n8oE4Sxjklh+uosdpIpNQFNixvfp YLaIgJvEjcYOsCJmgQuMEjv3fQNKcAB1cEusbg4CqeEU4JFY96eTGSQsLOAo8etzKEiYRUBV 4v+sQ4wgYV4BW4mpr8AqJATUJR791YUY7iTR2nOEEcRmFhCR2PfiHeMERv5ZSNwFjIyrGEVT C5ILipPSc430ihNzi0vz0vWS83M3MYJj5Jn0DsZVDRaHGAU4GJV4eAMUjwYIsSaWFVfmHmKU 4GBWEuHlOnYkQIg3JbGyKrUoP76oNCe1+BCjD9B9E5mlRJPzgfGbVxJvaGxiZmRpZGZhZGJu jkNYSZy32SMlQEggPbEkNTs1tSC1CGYcEwenVAPjVqPoUjMLnWuNtXFmX/fEL/rpyP5O90Jy t7i5T4CHT3qN1OFvx41PXvkRfuiBjcCchxcKHUSi225v+vfQk29VyJk7c3Zecrv/jKG2w/3o eevE1dYBDeIPrwk/8/JJ4d/wx/9r8a47i3kUWgpONX+91HrhfEQ9cxn7vlZ2Uy/GvD7DVfd/ vLykxFKckWioxVxUnAgAjj34qb4CAAA= X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20121209_185919_055462_22391931 X-CRM114-Status: UNSURE ( 9.06 ) X-CRM114-Notice: Please train this message. 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.25 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 773022 that disables loop buffer. Signed-off-by: Boojin Kim --- arch/arm/Kconfig | 10 ++++++++++ arch/arm/mach-exynos/Kconfig | 1 + arch/arm/mm/proc-v7.S | 6 ++++++ 3 files changed, 17 insertions(+), 0 deletions(-) -- 1.7.5.4 diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 11a57e2..93397da 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -1417,6 +1417,16 @@ config ARM_ERRATA_775420 to deadlock. This workaround puts DSB before executing ISB if an abort may occur on cache maintenance. +config ARM_ERRATA_773022 + bool "ARM errata: incorrect instructions may be executed from loop buffer" + depends on CPU_V7 + help + This option enables the workaround for the erratum 773022 affecting + Cortex-A15 (r0p4). + In certain rare sequences of code, the loop buffer may deliver + incorrect instructions. + This workaround is to disable loop buffer. + config ARM_ERRATA_774769 bool "ARM errata: data corruption may occur with store streaming in a system" depends on CPU_V7 diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig index e1168fb..bb92f4c 100644 --- a/arch/arm/mach-exynos/Kconfig +++ b/arch/arm/mach-exynos/Kconfig @@ -22,6 +22,7 @@ config ARCH_EXYNOS4 config ARCH_EXYNOS5 bool "SAMSUNG EXYNOS5" select HAVE_SMP + select ARM_ERRATA_773022 select ARM_ERRATA_774769 help Samsung EXYNOS5 (Cortex-A15) SoC based systems diff --git a/arch/arm/mm/proc-v7.S b/arch/arm/mm/proc-v7.S index 06cbdfa..0b4c518 100644 --- a/arch/arm/mm/proc-v7.S +++ b/arch/arm/mm/proc-v7.S @@ -249,6 +249,12 @@ __v7_setup: 3: ldr r10, =0x00000c0f @ Cortex-A15 primary part number teq r0, r10 bne 4f +#ifdef CONFIG_ARM_ERRATA_773022 + teq r6, #0x4 @ present in r0p4 + mrceq p15, 0, r10, c1, c0, 1 @ read aux control register + orreq r10, r10, #1 << 1 @ set bit #1 + mcreq p15, 0, r10, c1, c0, 1 @ write aux control register +#endif #ifdef CONFIG_ARM_ERRATA_774769 teq r6, #0x4 @ present in r0p4 mrceq p15, 0, r10, c1, c0, 1 @ read aux control register