From patchwork Tue Feb 23 19:15:36 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Brandt X-Patchwork-Id: 8395661 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id E2C9B9F1D4 for ; Tue, 23 Feb 2016 19:19:22 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 06E7D202FF for ; Tue, 23 Feb 2016 19:19:22 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id CFDA9202F0 for ; Tue, 23 Feb 2016 19:19:20 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1aYIS7-0006Im-Ne; Tue, 23 Feb 2016 19:16:55 +0000 Received: from relmlor3.renesas.com ([210.160.252.173] helo=relmlie2.idc.renesas.com) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1aYIS3-0005ur-E6 for linux-arm-kernel@lists.infradead.org; Tue, 23 Feb 2016 19:16:53 +0000 Received: from unknown (HELO relmlir3.idc.renesas.com) ([10.200.68.153]) by relmlie2.idc.renesas.com with ESMTP; 24 Feb 2016 04:16:23 +0900 Received: from relmlac1.idc.renesas.com (relmlac1.idc.renesas.com [10.200.69.21]) by relmlir3.idc.renesas.com (Postfix) with ESMTP id 87DCC3FB2D; Wed, 24 Feb 2016 04:16:23 +0900 (JST) Received: by relmlac1.idc.renesas.com (Postfix, from userid 0) id 82A8A8002E; Wed, 24 Feb 2016 04:16:23 +0900 (JST) Received: from relmlac1.idc.renesas.com (localhost [127.0.0.1]) by relmlac1.idc.renesas.com (Postfix) with ESMTP id 7B9218002D; Wed, 24 Feb 2016 04:16:23 +0900 (JST) Received: from relmlii1.idc.renesas.com [10.200.68.65] by relmlac1.idc.renesas.com with ESMTP id EAB15694; Wed, 24 Feb 2016 04:16:23 +0900 X-IronPort-AV: E=Sophos;i="5.22,490,1449500400"; d="scan'208";a="204994628" Received: from unknown (HELO rtamta01.rta.renesas.com) ([143.103.48.75]) by relmlii1.idc.renesas.com with ESMTP; 24 Feb 2016 04:16:22 +0900 Received: from localhost.localdomain (unknown [172.27.49.52]) by rtamta01.rta.renesas.com (Postfix) with ESMTP id 557F22B3; Tue, 23 Feb 2016 19:16:19 +0000 (UTC) From: Chris Brandt To: linux@arm.linux.org.uk Subject: [PATCH v2] ARM: Allow MULTIPLATFORM to select XIP Date: Tue, 23 Feb 2016 14:15:36 -0500 Message-Id: <1456254936-28875-1-git-send-email-chris.brandt@renesas.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1455816310-11308-1-git-send-email-chris.brandt@renesas.com> References: <1455816310-11308-1-git-send-email-chris.brandt@renesas.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160223_111651_647230_6D00E14D X-CRM114-Status: GOOD ( 13.13 ) X-Spam-Score: -1.9 (-) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Nicolas Pitre , Chris Brandt , Arnd Bergmann , linux-arm-kernel@lists.infradead.org, Ard Biesheuvel MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP As devices move to multiplatform only, you should not be restricted from selecting XIP. Whether it makes sense or not depends on how you configure the rest of the kernel (as in, removing individual platforms). While there is no easy way to guarantee success when XIP is selected, the MULTIPLATFORM_XIP_CAPABLE attribute at least provides a means to show what devices have been known to boot (when configured correctly). Signed-off-by: Chris Brandt --- v2: * Added MULTIPLATFORM_XIP_CAPABLE because there is no good way to restrict that only 1 device can be selected at one time, so this at least narrows down the the exposure of XIP in multiplatform. --- arch/arm/Kconfig | 7 +++++-- arch/arm/mach-shmobile/Kconfig | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index d67f1aa..0d838ed 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -226,6 +226,9 @@ config NEED_RET_TO_USER config ARCH_MTD_XIP bool +config MULTIPLATFORM_XIP_CAPABLE + bool + config VECTORS_BASE hex default 0xffff0000 if MMU || CPU_HIGH_VECTOR @@ -327,7 +330,7 @@ config ARCH_MULTIPLATFORM depends on MMU select ARCH_WANT_OPTIONAL_GPIOLIB select ARM_HAS_SG_CHAIN - select ARM_PATCH_PHYS_VIRT + select ARM_PATCH_PHYS_VIRT if !XIP_KERNEL select AUTO_ZRELADDR select CLKSRC_OF select COMMON_CLK @@ -1918,7 +1921,7 @@ endchoice config XIP_KERNEL bool "Kernel Execute-In-Place from ROM" - depends on !ARM_LPAE && !ARCH_MULTIPLATFORM + depends on (!ARM_LPAE && !ARCH_MULTIPLATFORM) || (!ARM_LPAE && MULTIPLATFORM_XIP_CAPABLE) help Execute-In-Place allows the kernel to run from non-volatile storage directly addressable by the CPU, such as NOR flash. This saves RAM diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig index cd5f171..b27661e 100644 --- a/arch/arm/mach-shmobile/Kconfig +++ b/arch/arm/mach-shmobile/Kconfig @@ -57,6 +57,7 @@ config ARCH_R7S72100 bool "RZ/A1H (R7S72100)" select PM_GENERIC_DOMAINS if PM select SYS_SUPPORTS_SH_MTU2 + select MULTIPLATFORM_XIP_CAPABLE config ARCH_R8A73A4 bool "R-Mobile APE6 (R8A73A40)"