From patchwork Fri Apr 18 07:59:10 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: ??? X-Patchwork-Id: 4013631 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 54DD1BFF02 for ; Fri, 18 Apr 2014 08:02:02 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5C00C2038D for ; Fri, 18 Apr 2014 08:02:01 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 76AFB20384 for ; Fri, 18 Apr 2014 08:02:00 +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 1Wb3iB-0007Z7-1T; Fri, 18 Apr 2014 07:59:51 +0000 Received: from mailout2.samsung.com ([203.254.224.25]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Wb3hl-0005Le-Pc for linux-arm-kernel@lists.infradead.org; Fri, 18 Apr 2014 07:59:26 +0000 Received: from epcpsbgr1.samsung.com (u141.gpu120.samsung.co.kr [203.254.230.141]) by mailout2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N4700BMPVINB720@mailout2.samsung.com> for linux-arm-kernel@lists.infradead.org; Fri, 18 Apr 2014 16:59:11 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [203.254.230.50]) by epcpsbgr1.samsung.com (EPCPMTA) with SMTP id 10.20.12635.F4BD0535; Fri, 18 Apr 2014 16:59:11 +0900 (KST) X-AuditID: cbfee68d-b7fcd6d00000315b-52-5350db4fa6ec Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 92.3E.29263.F4BD0535; Fri, 18 Apr 2014 16:59:11 +0900 (KST) Received: from DOJAYSLEE01 ([12.36.166.151]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0N4700LRXVIM6K50@mmp2.samsung.com>; Fri, 18 Apr 2014 16:59:11 +0900 (KST) From: Jungseok Lee To: linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, Catalin.Marinas@arm.com, Marc Zyngier , Christoffer Dall Subject: [PATCH v3 3/7] arm64: Introduce a kernel configuration option for VA_BITS Date: Fri, 18 Apr 2014 16:59:10 +0900 Message-id: <000401cf5adc$15147180$3f3d5480$@samsung.com> MIME-version: 1.0 X-Mailer: Microsoft Outlook 14.0 Thread-index: Ac9a1JRat0vdpPpLScqPvatVAM6zLg== Content-language: ko X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrLIsWRmVeSWpSXmKPExsVy+t8zI13/2wHBBtd3CVr8nXSM3eL9sh5G ixev/zFaHP23kNGid8FVNouPp46zW2x6fI3V4vKuOWwWM87vY7L4e+cfm8WKecvYLD7MWMno wOOxZt4aRo/fvyYxety5tofN4/ymNcwem5fUe/RtWcXo8XmTXAB7FJdNSmpOZllqkb5dAlfG 9O6FbAWTeSuet19namC8ztXFyMkhIWAisbzrEhOELSZx4d56ti5GLg4hgWWMElduv2eHKXo5 5y2YLSQwnVFizZskCPsPo8TRk+UgNpuApsSjuz3sIM0iAjsYJSavXcQK4jALPGSU+Pl2PzNI lbBAiMT2h1PB1rEIqErsefwFLM4rYCkx/eF0dghbUOLH5HssIDazgJbE+p3HmSBseYnNa94y Q1ykILHj7GtGEFtEQE9iT8scqHoRiX0v3jGCLJYQaOWQ+HnnJQvEMgGJb5MPAd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NDkfmM7ySuINjU3MjCyNzCyMTMzN SRNWEuc90GodKCSQnliSmp2aWpBaBLOFiYNTqoHR2eTFmf7A64x5c+6tOXBEIifP6X9uickf D6Xb715KXHo6ezF7sE3c9Xsuhan7bPPYr4mdO7e0LkTiyNxb+VHFXsW7X3wUi7GQkI0XDanU mrKv1bP0SNfFN+u590aEPH1SsLR47duwb0oeXCfjs8OXXGev/8uRmXLe3OemvtPfuZdORPrO PM2sxFKckWioxVxUnAgAHPL3PF0DAAA= DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140418_005925_996571_B42E9A0D X-CRM114-Status: GOOD ( 10.15 ) X-Spam-Score: -5.6 (-----) Cc: kgene.kim@samsung.com, steve.capper@linaro.org, Arnd Bergmann , linux-kernel@vger.kernel.org, ilho215.lee@samsung.com, linux-samsung-soc , sungjinn.chung@samsung.com X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 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-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,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 This patch adds a kernel configuration for VA_BITS. It helps to prevent unnecessary #ifdef statements insertions for VA_BITS when implementing different page sizes and level of translation tables. Signed-off-by: Jungseok Lee Reviewed-by: Sungjinn Chung --- arch/arm64/Kconfig | 8 ++++++++ arch/arm64/include/asm/memory.h | 6 +----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index 1a2faf9..431acbc 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -186,6 +186,14 @@ config ARM64_3_LEVELS endchoice +config ARM64_VA_BITS + int "Virtual address space size" + range 39 39 if ARM64_4K_PAGES && ARM64_3_LEVELS + range 42 42 if ARM64_64K_PAGES && ARM64_2_LEVELS + help + This feature is determined by a combination of page size and + level of translation tables. + config CPU_BIG_ENDIAN bool "Build big-endian kernel" help diff --git a/arch/arm64/include/asm/memory.h b/arch/arm64/include/asm/memory.h index e94f945..f6e7480 100644 --- a/arch/arm64/include/asm/memory.h +++ b/arch/arm64/include/asm/memory.h @@ -41,11 +41,7 @@ * The module space lives between the addresses given by TASK_SIZE * and PAGE_OFFSET - it must be within 128MB of the kernel text. */ -#ifdef CONFIG_ARM64_64K_PAGES -#define VA_BITS (42) -#else -#define VA_BITS (39) -#endif +#define VA_BITS (CONFIG_ARM64_VA_BITS) #define PAGE_OFFSET (UL(0xffffffffffffffff) << (VA_BITS - 1)) #define MODULES_END (PAGE_OFFSET) #define MODULES_VADDR (MODULES_END - SZ_64M)