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: 4013701 Return-Path: X-Original-To: patchwork-linux-samsung-soc@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 19E61BFF02 for ; Fri, 18 Apr 2014 08:02:45 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5424420384 for ; Fri, 18 Apr 2014 08:02:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 65A0B20380 for ; Fri, 18 Apr 2014 08:02:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752428AbaDRICE (ORCPT ); Fri, 18 Apr 2014 04:02:04 -0400 Received: from mailout2.samsung.com ([203.254.224.25]:13907 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751623AbaDRH7M (ORCPT ); Fri, 18 Apr 2014 03:59:12 -0400 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>; 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 Cc: linux-kernel@vger.kernel.org, linux-samsung-soc , steve.capper@linaro.org, sungjinn.chung@samsung.com, Arnd Bergmann , kgene.kim@samsung.com, ilho215.lee@samsung.com 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 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7bit 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+HnnJQvEMgGJ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A306kVlKNDkfmM7ySuINjU3MjCyNzCyMTMzN SRNWEuc90GodKCSQnliSmp2aWpBaBLOFiYNTqoHR2eTFmf7A64x5c+6tOXBEIifP6X9uickf D6Xb715KXHo6ezF7sE3c9Xsuhan7bPPYr4mdO7e0LkTiyNxb+VHFXsW7X3wUi7GQkI0XDanU mrKv1bP0SNfFN+u590aEPH1SsLR47duwb0oeXCfjs8OXXGev/8uRmXLe3OemvtPfuZdORPrO PM2sxFKckWioxVxUnAgAHPL3PF0DAAA= DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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)