From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 628E7C31E45 for ; Fri, 14 Jun 2019 03:12:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3528A2073F for ; Fri, 14 Jun 2019 03:12:48 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="PkSwe6ZM" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726613AbfFNDMr (ORCPT ); Thu, 13 Jun 2019 23:12:47 -0400 Received: from mail-pg1-f193.google.com ([209.85.215.193]:35716 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725819AbfFNDMr (ORCPT ); Thu, 13 Jun 2019 23:12:47 -0400 Received: by mail-pg1-f193.google.com with SMTP id s27so685941pgl.2 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=KgY32MtTlnjO8zKiKslYr7/DLu1xPSJYs7glXi+umBTDKw1494Gae+YbthYhR+u8d0 rDGm0Fr2anc3SaNl0clpdJ3w/b+0IQt6gmUycgWlUPvWeK91Wdwd8bFu9794dgIBcUi5 ecMQZwpPlEE+mAOmd3OxdedIDsMVO6DPDxjczAHeflE8AsjZRTnAzfVE8F6aexogjs2r zpABjk6438fgwwlzM0lRbhYC6JeAnCZrfpqKfQzYlGAGXdcmtwPmGbNQFcn+5ccMeOFN QHLnI9OQzFJQ5ymd4wjf3JGtdTQqJt+iuPvzksB/kPn6NUarD1kOOh98hcAJXzHwrtsy s91w== X-Gm-Message-State: APjAAAWVwSADBQK/SDuup0An7gLeSUI6Pm+ag7ctBQ9CtNsjjI8B2oQL 6RedygjisbWWAuu/Pmr4M7tONA== 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 Cc: Viresh Kumar , stable@vger.kernel.org, Catalin Marinas , Marc Zyngier , Mark Rutland , Will Deacon , Russell King , Vincent Guittot , mark.brown@arm.com 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 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org 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. -- 2.21.0.rc0.269.g1a574e7a288b From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.7 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8BE74C31E45 for ; Fri, 14 Jun 2019 03:19:40 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4EEEA2073F for ; Fri, 14 Jun 2019 03:19:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="VZVwPdPn"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="PkSwe6ZM" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4EEEA2073F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 1hbckV-0007WQ-Cg; Fri, 14 Jun 2019 03:19:31 +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 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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. -- 2.21.0.rc0.269.g1a574e7a288b _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel