From patchwork Fri Jun 14 03:08:03 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 10994169 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A197514C0 for ; Fri, 14 Jun 2019 03:19:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 947FA27BA5 for ; Fri, 14 Jun 2019 03:19:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 888B727DCD; Fri, 14 Jun 2019 03:19:37 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 374D627BA5 for ; Fri, 14 Jun 2019 03:19:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=nYqtYuhHl4/o54n2QKOVooy+a9jqsUwunRWlifnsV7w=; b=VZVwPdPn6rJ6eV AGXzFmDCHDN4EhhRvzyOkOLeOngnE6kd23nqY1aFbKscpvRAXnoggwsZiBcm2MkbMzQUmmmOcx712 gqzVYpqp/f/nZQKYoidrRY/9ooEwQ/bSU16HCbKJfiSnsAlUKj/WYuSNDo6rbnmvVMsg06FzdA94m C1OQ0G1pQ9N7TF0J2zYvmIhMeMoozTrxZlan9L2JhJnxJp4/4V1/BlRiNDrphKD91Bjfyv2/GGr2V nFZr6NcgIRQv+teG3mG/1aNU892pqaRMwDHYUpz4+LCM03YRbGKhsl/9jOmbRM7OLPL4hk6pTJpml sx9qUkBampR1Ilvol8Cg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hbckU-0007WQ-Co; Fri, 14 Jun 2019 03:19:30 +0000 Received: from mail-pg1-x544.google.com ([2607:f8b0:4864:20::544]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hbcdz-0000Y2-Mr for linux-arm-kernel@lists.infradead.org; Fri, 14 Jun 2019 03:12:49 +0000 Received: by mail-pg1-x544.google.com with SMTP id f25so662639pgv.10 for ; Thu, 13 Jun 2019 20:12:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=EmoJPia4REdmsbQ4H3ol9/VbnaPc01q7ugk/yi36Irk=; b=PkSwe6ZM+84aZssqC9yjuM9KdfFBu/kwlLo5pJlTemrHl3tbpWb2jFu9oCwjIJLbjZ +R2sV3v4Svb7AGgxYSENh7WQ/BsSqkO3SrL6i1rAA8K9jGSppUSeagoCqZ7kApJZrdmN Ut75sba5qxz1fnQrw+BDywqbPFjsmoNKEmHjhAV+153MleaDr7XY+6okqraszIUYzqRX yRGdmp4jlswT+ElJ/Br6Q9ooyShdDsSjoot+sJxssHE/ZFb7kM+znGZgY02db3aviW/3 qBfzYmNrPIFScOHk+93wZHDGvUVHziCN41rErxUmySN2LDp2wy1cJYAsbuOtFZOVECLc 6YPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=EmoJPia4REdmsbQ4H3ol9/VbnaPc01q7ugk/yi36Irk=; b=Jb9ri5kGCwRastFdQ2tHZEPz5O+Bki2vNlz4FF0b6bh9wZopaX1FfH3ZTiTifSEe/x h1Q05YR+UGVZAToMJ+h40aHvZjTtONKoDj4XpEXrbfeTUX+z7bJONmViRC/nJVhXEWXN IoKkKOYpi9fSVhE5ourY2odGaNhVXL194Qb4jFRsQEAQ31l6KTo1DQ/niqvi+BEXHlwL Ho2LtTDiouQQc7kLdB27qSuR+pPNosLt4Ge94qkNXlufn/efaxT3/i3uSBxJqlNil2ny fAtC1Slt4rA2GN3stM4/D/Of17F1sHSg6/xriHObd9ty8Xk/JlEKP3e+0f9ZIlmD2jrg R6Lw== X-Gm-Message-State: APjAAAU5NFSniP1s6yXac01tfU9mkHE2ao8A5BwaSitiSV3qxQc5rONp uvKHE1hmSxxTOWO4kutt2NASSRjNSKI= X-Google-Smtp-Source: APXvYqzFJ5M7fhmGROMUgYHr4HeztcDrQP1Hyg2FauE3GQtu6eOZ00AU7ushEX3OlWUqiKLJAas35g== X-Received: by 2002:aa7:825a:: with SMTP id e26mr98018300pfn.255.1560481966986; Thu, 13 Jun 2019 20:12:46 -0700 (PDT) Received: from localhost ([122.172.66.84]) by smtp.gmail.com with ESMTPSA id o13sm1237168pje.28.2019.06.13.20.12.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 13 Jun 2019 20:12:46 -0700 (PDT) From: Viresh Kumar To: linux-arm-kernel@lists.infradead.org, Julien Thierry Subject: [PATCH v4.4 20/45] mm: Introduce lm_alias Date: Fri, 14 Jun 2019 08:38:03 +0530 Message-Id: <8500aeb27596eef7bd952f988c8db0a4b2f655c6.1560480942.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.21.0.rc0.269.g1a574e7a288b In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190613_201247_816675_692A9EBA X-CRM114-Status: GOOD ( 10.66 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Marc Zyngier , Viresh Kumar , Will Deacon , stable@vger.kernel.org, mark.brown@arm.com, Catalin Marinas , Russell King Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Laura Abbott commit 568c5fe5a54f2654f5a4c599c45b8a62ed9a2013 upstream. 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 Signed-off-by: Will Deacon Signed-off-by: Viresh Kumar --- include/linux/mm.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/linux/mm.h b/include/linux/mm.h index 251adf4d8a71..f86fdf015c74 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -59,6 +59,10 @@ extern int sysctl_legacy_va_layout; #define __pa_symbol(x) __pa(RELOC_HIDE((unsigned long)(x), 0)) #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.