From patchwork Thu Jul 20 00:29:23 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?TWljaGHFgiBNaXJvc8WCYXc=?= X-Patchwork-Id: 9853413 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 5E5B0600F5 for ; Thu, 20 Jul 2017 00:31:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6523C286FB for ; Thu, 20 Jul 2017 00:31:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5A43B28709; Thu, 20 Jul 2017 00:31:14 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=2.0 tests=BAYES_00,DKIM_ADSP_ALL, DKIM_SIGNED,DKIM_VALID autolearn=no version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 02388286FB for ; Thu, 20 Jul 2017 00:31:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:To:MIME-Version:Subject:From:References :In-Reply-To:Message-Id:Date:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=2QN1yANfqFI4UmR/r+oOKYgHEW/g8vkVhqAV7V+JTbE=; b=OAdOCVU8GE0NrM Pro+U86ShEyMFWCK0FRP+28F67AUSbSdUcG5b8MyOFic5mg2th+4L0GoJdftLlABwGSd1Z6Kt7Cj2 z+8DYk12V8nvDjS7ahelGBtL14VS1vmSoFp77r/p21Gh+A/tDLbQZhHGNk8tEiGsQLWfep865LFMt wFSGo4HkWvg54siWbppPOuBFJNpflrQMKLBrk6R3k2nPfy1Wi3vAPkj1UnTsopn9Xi6tclx6RMNmW pw+wmiPiLZ4GXCBbcoGRrnui9888l65wUo/HhSEwKMrYkusBO4hwcY/lcHTPMGDGnnKO9OGSlRddR pcjeVtzdffB2uBWpjXmQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dXzN0-0004ZM-VZ; Thu, 20 Jul 2017 00:31:10 +0000 Received: from rere.qmqm.pl ([91.227.64.183]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dXzLl-0001uC-P6 for linux-arm-kernel@lists.infradead.org; Thu, 20 Jul 2017 00:29:57 +0000 Received: from remote.user (localhost [127.0.0.1]) by rere.qmqm.pl (Postfix) with ESMTPSA id 5319F325; Thu, 20 Jul 2017 02:29:23 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=rere.qmqm.pl; s=1; t=1500510563; bh=XAlMJuDAVB5p/rJebteQALUamOGmapYtLxqJX8m6zWQ=; h=Date:In-Reply-To:References:From:Subject:To:From; b=M1riSmKgVYqU9tgkTocD/g/oDiovv9HV0znKro6QoyzDMbNInUQ1Bu27Uw4vcvC+2 j5oUz2T97ww3INq5THHUKqbq3VZPFfpN0yPJEhlh6O0n/4nYqLDDa+xX+y7CQCgjQ7 S5AaL6layf8YmimvocgLZewNQlYpv56n/4cJiiAVuwzReuufF7dk235JYCxaouvN3X p3yu/pDfKQw2y36nDvuEq0qJ1NrVOkB38rQ5pSvzjQoiRQ2AVzV3+pwx2atpM0iu6V zjwih3SRLs56IGNPkjpUOmZMDuOY4p3ipmkzfyzVB5ZI7n5NassM/iNQyoa5qlGn8x L8UonltuCZalQ== X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.99.2 at rere Date: Thu, 20 Jul 2017 02:29:23 +0200 Message-Id: <77ce738c15b992a92bee3a18e5468342fb2dc5ab.1500510157.git.mirq-linux@rere.qmqm.pl> In-Reply-To: References: From: =?UTF-8?q?Micha=C5=82=20Miros=C5=82aw?= Subject: [PATCH 1/9] ARM: enable secure platform-only erratas MIME-Version: 1.0 To: linux-tegra@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170719_172954_174704_12CAF75C X-CRM114-Status: UNSURE ( 9.58 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Allow secure-only erratas to be used in multiarch kernel. Signed-off-by: Michał Mirosław --- arch/arm/Kconfig | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index a208bfe367b5..a1eff866550b 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -696,6 +696,14 @@ config ARCH_MULTI_CPU_AUTO endmenu +config ARCH_ASSUME_SECURE_PLATFORM + bool "Enable ERRATAs using secure-only registers" + default !ARCH_MULTIPLATFORM + help + Allow erratas that need access to secure-only registers. + + Beware: Resulting kernel won't boot on a CPU in non-Secure mode. + config ARCH_VIRT bool "Dummy Virtual Machine" depends on ARCH_MULTI_V7 @@ -984,7 +992,7 @@ config ARM_ERRATA_430973 config ARM_ERRATA_458693 bool "ARM errata: Processor deadlock when a false hazard is created" depends on CPU_V7 - depends on !ARCH_MULTIPLATFORM + depends on ARCH_ASSUME_SECURE_PLATFORM help This option enables the workaround for the 458693 Cortex-A8 (r2p0) erratum. For very specific sequences of memory operations, it is @@ -998,7 +1006,7 @@ config ARM_ERRATA_458693 config ARM_ERRATA_460075 bool "ARM errata: Data written to the L2 cache can be overwritten with stale data" depends on CPU_V7 - depends on !ARCH_MULTIPLATFORM + depends on ARCH_ASSUME_SECURE_PLATFORM help This option enables the workaround for the 460075 Cortex-A8 (r2p0) erratum. Any asynchronous access to the L2 cache may encounter a @@ -1011,7 +1019,7 @@ config ARM_ERRATA_460075 config ARM_ERRATA_742230 bool "ARM errata: DMB operation may be faulty" depends on CPU_V7 && SMP - depends on !ARCH_MULTIPLATFORM + depends on ARCH_ASSUME_SECURE_PLATFORM help This option enables the workaround for the 742230 Cortex-A9 (r1p0..r2p2) erratum. Under rare circumstances, a DMB instruction @@ -1024,7 +1032,7 @@ config ARM_ERRATA_742230 config ARM_ERRATA_742231 bool "ARM errata: Incorrect hazard handling in the SCU may lead to data corruption" depends on CPU_V7 && SMP - depends on !ARCH_MULTIPLATFORM + depends on ARCH_ASSUME_SECURE_PLATFORM help This option enables the workaround for the 742231 Cortex-A9 (r2p0..r2p2) erratum. Under certain conditions, specific to the @@ -1062,7 +1070,7 @@ config ARM_ERRATA_720789 config ARM_ERRATA_743622 bool "ARM errata: Faulty hazard checking in the Store Buffer may lead to data corruption" depends on CPU_V7 - depends on !ARCH_MULTIPLATFORM + depends on ARCH_ASSUME_SECURE_PLATFORM help This option enables the workaround for the 743622 Cortex-A9 (r2p*) erratum. Under very rare conditions, a faulty @@ -1076,7 +1084,7 @@ config ARM_ERRATA_743622 config ARM_ERRATA_751472 bool "ARM errata: Interrupted ICIALLUIS may prevent completion of broadcasted operation" depends on CPU_V7 - depends on !ARCH_MULTIPLATFORM + depends on ARCH_ASSUME_SECURE_PLATFORM help This option enables the workaround for the 751472 Cortex-A9 (prior to r3p0) erratum. An interrupted ICIALLUIS operation may prevent the