From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qt0-f200.google.com (mail-qt0-f200.google.com [209.85.216.200]) by kanga.kvack.org (Postfix) with ESMTP id B49416B0260 for ; Tue, 10 Jan 2017 16:36:17 -0500 (EST) Received: by mail-qt0-f200.google.com with SMTP id t56so112545980qte.3 for ; Tue, 10 Jan 2017 13:36:17 -0800 (PST) Received: from mail-qk0-f182.google.com (mail-qk0-f182.google.com. [209.85.220.182]) by mx.google.com with ESMTPS id d41si2269055qkh.92.2017.01.10.13.36.17 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 10 Jan 2017 13:36:17 -0800 (PST) Received: by mail-qk0-f182.google.com with SMTP id 11so90656517qkl.3 for ; Tue, 10 Jan 2017 13:36:17 -0800 (PST) From: Laura Abbott Subject: [PATCHv7 03/11] mm: Introduce lm_alias Date: Tue, 10 Jan 2017 13:35:42 -0800 Message-Id: <1484084150-1523-4-git-send-email-labbott@redhat.com> In-Reply-To: <1484084150-1523-1-git-send-email-labbott@redhat.com> References: <1484084150-1523-1-git-send-email-labbott@redhat.com> Sender: owner-linux-mm@kvack.org List-ID: To: Mark Rutland , Ard Biesheuvel , Will Deacon , Catalin Marinas , Christoffer Dall , Marc Zyngier , Lorenzo Pieralisi , Florian Fainelli Cc: Laura Abbott , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Andrew Morton , Marek Szyprowski , Joonsoo Kim , linux-arm-kernel@lists.infradead.org Certain architectures may have the kernel image mapped separately to alias the linear map. Introduce a macro lm_alias to translate a kernel image symbol into its linear alias. This is used in part with work to add CONFIG_DEBUG_VIRTUAL support for arm64. Reviewed-by: Mark Rutland Tested-by: Mark Rutland Signed-off-by: Laura Abbott --- include/linux/mm.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/linux/mm.h b/include/linux/mm.h index fe6b403..5dc9c46 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -76,6 +76,10 @@ extern int mmap_rnd_compat_bits __read_mostly; #define page_to_virt(x) __va(PFN_PHYS(page_to_pfn(x))) #endif +#ifndef lm_alias +#define lm_alias(x) __va(__pa_symbol(x)) +#endif + /* * To prevent common memory management code establishing * a zero page mapping on a read fault. -- 2.7.4 -- 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