From patchwork Wed Apr 16 04:33:18 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: ??? X-Patchwork-Id: 3997731 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 CE195BFF02 for ; Wed, 16 Apr 2014 04:34:50 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 08B9A20222 for ; Wed, 16 Apr 2014 04:34:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1CA182020F for ; Wed, 16 Apr 2014 04:34:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752917AbaDPEd1 (ORCPT ); Wed, 16 Apr 2014 00:33:27 -0400 Received: from mailout1.samsung.com ([203.254.224.24]:10385 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750919AbaDPEdT (ORCPT ); Wed, 16 Apr 2014 00:33:19 -0400 Received: from epcpsbgr1.samsung.com (u141.gpu120.samsung.co.kr [203.254.230.141]) by mailout1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N4300L0EWNITN30@mailout1.samsung.com>; Wed, 16 Apr 2014 13:33:18 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [203.254.230.50]) by epcpsbgr1.samsung.com (EPCPMTA) with SMTP id 89.DE.12635.E080E435; Wed, 16 Apr 2014 13:33:18 +0900 (KST) X-AuditID: cbfee68d-b7fcd6d00000315b-67-534e080ef0b1 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 78.DA.29263.E080E435; Wed, 16 Apr 2014 13:33:18 +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 <0N43006FIWNIK980@mmp2.samsung.com>; Wed, 16 Apr 2014 13:33:18 +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 v2 3/7] arm64: Introduce a kernel configuration option for VA_BITS Date: Wed, 16 Apr 2014 13:33:18 +0900 Message-id: <004301cf592c$fdb00c80$f9102580$@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: Ac9ZKy1VPlIXxfgIQrGg1Hw7n0197g== Content-language: ko X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrHIsWRmVeSWpSXmKPExsVy+t8zI10+Dr9ggw9ntS3+TjrGbvF+WQ+j xYvX/xgtjv5byGjRu+Aqm8XHU8fZLTY9vsZqcXnXHDaLGef3MVn8vfOPzWLFvGVsFh9mrGR0 4PFYM28No8fvX5MYPe5c28PmcX7TGmaPzUvqPfq2rGL0+LxJLoA9issmJTUnsyy1SN8ugStj evdCtoLJvBXP268zNTBe5+pi5OSQEDCRuPn7OyOELSZx4d56ti5GLg4hgWWMEtt+/WWGKTr6 fQU7RGI6o8St+c1MIAkhgT+MEnePGoLYbAKaEo/u9oAViQjsYJSYvHYRK4jDLPCQUeLn2/1g o4QFQiTuT/3PAmKzCKhKbHk/iw3E5hWwlPj//gyULSjxY/I9sBpmAS2J9TuPM0HY8hKb17yF OklBYsfZ12B3iwjoSXzo3QVVIyKx78U7RpDFEgKd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owQHs5II75cvQCHelMTKqtSi/Pii0pzU4kOMyUCfTmSWEk3OBya0vJJ4Q2MTMyNLIzML IxNzc9KElcR5D7RaBwoJpCeWpGanphakFsFsYeLglGpgnB5r4OnIKrzn+znuwysWJXkaXyyy ZBdSElKyFW5UDyxdovb78KYHr2esKyvcYGrREHf4/8OPj55cVLjCL6I7p8/O7PVe96anLysc Yl/OrXGe8vKoVt2dvP9bfIv3Ckx+mrXWzFTjUaKK3QXJhMIO11opUyHpwMCHcZM7j/7YOfHx qWRLxoowJZbijERDLeai4kQA/l5Cg14DAAA= 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.6 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)