From patchwork Mon Apr 14 07:40:51 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: ??? X-Patchwork-Id: 3977361 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 612D09F2CC for ; Mon, 14 Apr 2014 07:44:17 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 65B31201D3 for ; Mon, 14 Apr 2014 07:44:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5EED7201CE for ; Mon, 14 Apr 2014 07:44:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753590AbaDNHk7 (ORCPT ); Mon, 14 Apr 2014 03:40:59 -0400 Received: from mailout2.samsung.com ([203.254.224.25]:13857 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753022AbaDNHkw (ORCPT ); Mon, 14 Apr 2014 03:40:52 -0400 Received: from epcpsbgr2.samsung.com (u142.gpu120.samsung.co.kr [203.254.230.142]) by mailout2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N40005RQG03N810@mailout2.samsung.com>; Mon, 14 Apr 2014 16:40:51 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [203.254.230.47]) by epcpsbgr2.samsung.com (EPCPMTA) with SMTP id 40.C6.09028.3019B435; Mon, 14 Apr 2014 16:40:51 +0900 (KST) X-AuditID: cbfee68e-b7f566d000002344-39-534b9103663d Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 8E.0E.29263.3019B435; Mon, 14 Apr 2014 16:40:51 +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 <0N4000F2EG03B880@mmp2.samsung.com>; Mon, 14 Apr 2014 16:40:51 +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 , sungjinn.chung@samsung.com, Arnd Bergmann , kgene.kim@samsung.com, ilho215.lee@samsung.com Subject: [PATCH 4/8] arm64: Introduce a kernel configuration option for VA_BITS Date: Mon, 14 Apr 2014 16:40:51 +0900 Message-id: <000201cf57b4$dbe63260$93b29720$@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: Ac9XrUy/hcb4eczCQ7qwkj0Y19kvsA== Content-language: ko X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrJIsWRmVeSWpSXmKPExsVy+t8zfV3mid7BBvt2SVv8nXSM3eL9sh5G ixev/zFaHP23kNGid8FVNouPp46zW2x6fI3V4vKuOWwWM87vY7L4e+cfm8WHGSsZHbg91sxb w+jx+9ckRo871/aweZzftIbZY/OSeo++LasYPT5vkgtgj+KySUnNySxLLdK3S+DKmN69kK1g Mm/F8/brTA2M17m6GDk5JARMJH4/uccMYYtJXLi3nq2LkYtDSGAZo8TVdS2sXYwcYEWb1nNA xKczSlw6PpMFwvnDKHFg8mNGkG42AU2JR3d72EESIgI7GCUmr13ECuIwC5xglFh6Zy0rSJWw gL/E7IV3mEBsFgFVic5VP8DivAKWEg+eP4CyBSV+TL7HAmIzC2hJrN95nAnClpfYvOYt1K0K EjvOvgbbLCKgJ/HpCEQvs4CIxL4X7xhBFksItHJIPFj2DmqZgMS3yYdYIP6Rldh0AGqOpMTB F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Q2MTMyNLIzMLIxNz c9KElcR5D7RaBwoJpCeWpGanphakFsFsYeLglGpg3OBRpHT+aZH88VTOXUFHpgY5Lg4vDsuv X3eK97Dimssf3BRjIp5+SuOa83tS6O7lD37o3DFJXKkrI8PpacVh1Tsn32CiG7M9+1XfvL1T RKW6anfaGx+9mntCj9klK+7TpfPHZaKk5RN8LDYqrzZfVsHR99PlQN6Two9yXt8nPOdRuSt9 M3axEktxRqKhFnNRcSIAUGecA1kDAAA= 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.9 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)