From patchwork Wed Jul 22 10:30:34 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrey Ryabinin X-Patchwork-Id: 6841971 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.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 381A1C05AC for ; Wed, 22 Jul 2015 10:33:27 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6034D2064C for ; Wed, 22 Jul 2015 10:33:26 +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 724B6206B6 for ; Wed, 22 Jul 2015 10:33:25 +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 1ZHrJO-0000qw-4R; Wed, 22 Jul 2015 10:31:42 +0000 Received: from mailout2.w1.samsung.com ([210.118.77.12]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZHrIx-0000gI-Ia for linux-arm-kernel@lists.infradead.org; Wed, 22 Jul 2015 10:31:17 +0000 Received: from eucpsbgm1.samsung.com (unknown [203.254.199.244]) by mailout2.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0NRV00F14X7DOC60@mailout2.w1.samsung.com> for linux-arm-kernel@lists.infradead.org; Wed, 22 Jul 2015 11:30:49 +0100 (BST) X-AuditID: cbfec7f4-f79c56d0000012ee-67-55af70d9f5a8 Received: from eusync4.samsung.com ( [203.254.199.214]) by eucpsbgm1.samsung.com (EUCPMTA) with SMTP id DA.A7.04846.9D07FA55; Wed, 22 Jul 2015 11:30:49 +0100 (BST) Received: from localhost.localdomain ([106.109.129.143]) by eusync4.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0NRV00ML7X769090@eusync4.samsung.com>; Wed, 22 Jul 2015 11:30:49 +0100 (BST) From: Andrey Ryabinin To: Catalin Marinas , Will Deacon , linux-arm-kernel@lists.infradead.org Subject: [PATCH v3 2/5] arm64: introduce VA_START macro - the first kernel virtual address. Date: Wed, 22 Jul 2015 13:30:34 +0300 Message-id: <1437561037-31995-3-git-send-email-a.ryabinin@samsung.com> X-Mailer: git-send-email 2.4.5 In-reply-to: <1437561037-31995-1-git-send-email-a.ryabinin@samsung.com> References: <1437561037-31995-1-git-send-email-a.ryabinin@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrELMWRmVeSWpSXmKPExsVy+t/xa7o3C9aHGiw/xmWx7dcjNos569ew WfyddIzd4v2yHkaL3ZeeMVtMeNjGbtH+cS+zxZQ/y5ksNj2+xmpxedccNot7a/6zWrz8eILF gcdjzbw1jB6/f01i9Ljc18vksWBTqcemT5PYPe5c28PmcWLGbxaPzUvqPfq2rGL0+LxJLoAr issmJTUnsyy1SN8ugStjwbZprAUr+Cq6v8xgamD8xN3FyMEhIWAicfJATBcjJ5ApJnHh3nq2 LkYuDiGBpYwSr5b/hnKamCRu3TnMDlLFJqAn8W/WdjYQW0SgQuLq1QmMIDazwAUmiZ6JXCC2 sECsxPct95hBbBYBVYmpk5aB1fAKuElsmDqRFWKxnMTS5lqQMKeAu8T5s/vByoWASv5/+sA0 gZF3ASPDKkbR1NLkguKk9FxDveLE3OLSvHS95PzcTYyQkP2yg3HxMatDjAIcjEo8vBOOrgsV Yk0sK67MPcQowcGsJML7Imt9qBBvSmJlVWpRfnxRaU5q8SFGaQ4WJXHeubvehwgJpCeWpGan phakFsFkmTg4pRoY7XfH/oqf7TJ70a3ovfw6a17+PLzEQ6yTfdNBHp63zUyH/34/931n0/yT 784zf1q/xSDJNDOLs0m6jS3mTbLxlk87RY2D/3duD/79lmt57JnUsHxz9QCVy0lsq95HBbzj ebD+6vaS5ASFDc3XgkOqN0dHBWYd+P6/sP/cbOsfvXwXDVevnfr4qhJLcUaioRZzUXEiAOGo yK9VAgAA X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150722_033115_791390_1331A659 X-CRM114-Status: GOOD ( 15.45 ) X-Spam-Score: -8.1 (--------) 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: Arnd Bergmann , linux-mm@kvack.org, Andrey Ryabinin , Linus Walleij , linux-kernel@vger.kernel.org, David Keitel , Alexander Potapenko , Andrew Morton , Dmitry Vyukov 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=-5.4 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 In order to not use lengthy (UL(0xffffffffffffffff) << VA_BITS) everywhere, replace it with VA_START. Signed-off-by: Andrey Ryabinin Reviewed-by: Catalin Marinas --- arch/arm64/include/asm/memory.h | 2 ++ arch/arm64/include/asm/pgtable.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/arm64/include/asm/memory.h b/arch/arm64/include/asm/memory.h index f800d45..288c19d 100644 --- a/arch/arm64/include/asm/memory.h +++ b/arch/arm64/include/asm/memory.h @@ -42,12 +42,14 @@ * PAGE_OFFSET - the virtual address of the start of the kernel image (top * (VA_BITS - 1)) * VA_BITS - the maximum number of bits for virtual addresses. + * VA_START - the first kernel virtual address. * TASK_SIZE - the maximum size of a user space task. * TASK_UNMAPPED_BASE - the lower boundary of the mmap VM area. * The module space lives between the addresses given by TASK_SIZE * and PAGE_OFFSET - it must be within 128MB of the kernel text. */ #define VA_BITS (CONFIG_ARM64_VA_BITS) +#define VA_START (UL(0xffffffffffffffff) << VA_BITS) #define PAGE_OFFSET (UL(0xffffffffffffffff) << (VA_BITS - 1)) #define MODULES_END (PAGE_OFFSET) #define MODULES_VADDR (MODULES_END - SZ_64M) diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h index 56283f8..a1f9f61 100644 --- a/arch/arm64/include/asm/pgtable.h +++ b/arch/arm64/include/asm/pgtable.h @@ -40,7 +40,7 @@ * fixed mappings and modules */ #define VMEMMAP_SIZE ALIGN((1UL << (VA_BITS - PAGE_SHIFT)) * sizeof(struct page), PUD_SIZE) -#define VMALLOC_START (UL(0xffffffffffffffff) << VA_BITS) +#define VMALLOC_START (VA_START) #define VMALLOC_END (PAGE_OFFSET - PUD_SIZE - VMEMMAP_SIZE - SZ_64K) #define vmemmap ((struct page *)(VMALLOC_END + SZ_64K))