From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-la0-f42.google.com (mail-la0-f42.google.com [209.85.215.42]) by kanga.kvack.org (Postfix) with ESMTP id B141D6B0254 for ; Thu, 17 Sep 2015 05:38:19 -0400 (EDT) Received: by lamp12 with SMTP id p12so7458123lam.0 for ; Thu, 17 Sep 2015 02:38:19 -0700 (PDT) Received: from mail-la0-x229.google.com (mail-la0-x229.google.com. [2a00:1450:4010:c03::229]) by mx.google.com with ESMTPS id q7si1651570lae.90.2015.09.17.02.38.17 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 17 Sep 2015 02:38:18 -0700 (PDT) Received: by lagj9 with SMTP id j9so7612391lag.2 for ; Thu, 17 Sep 2015 02:38:17 -0700 (PDT) From: Andrey Ryabinin Subject: [PATCH v6 1/6] arm64: introduce VA_START macro - the first kernel virtual address. Date: Thu, 17 Sep 2015 12:38:07 +0300 Message-Id: <1442482692-6416-2-git-send-email-ryabinin.a.a@gmail.com> In-Reply-To: <1442482692-6416-1-git-send-email-ryabinin.a.a@gmail.com> References: <1442482692-6416-1-git-send-email-ryabinin.a.a@gmail.com> Sender: owner-linux-mm@kvack.org List-ID: To: Will Deacon , Catalin Marinas , linux-arm-kernel@lists.infradead.org Cc: Andrey Ryabinin , Linus Walleij , Alexander Potapenko , Dmitry Vyukov , Arnd Bergmann , linux-kernel@vger.kernel.org, David Keitel , linux-mm@kvack.org, Alexey Klimov , Yury , Andrey Konovalov 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 6b4c3ad..11ccf6c 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 6900b2d9..a53a126 100644 --- a/arch/arm64/include/asm/pgtable.h +++ b/arch/arm64/include/asm/pgtable.h @@ -45,7 +45,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)) -- 2.4.6 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org