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: 166758 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp1505786ilk; Thu, 13 Jun 2019 20:12:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqwHwO7tvYGqMHl5TiK5/7hA1xNZEobroB49DLviMa9Td2GiMhGQeuZh18iVkIgFlPkOEDHu X-Received: by 2002:a17:902:467:: with SMTP id 94mr35193777ple.131.1560481968464; Thu, 13 Jun 2019 20:12:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560481968; cv=none; d=google.com; s=arc-20160816; b=UDHZSLOD4v7hFw+V4qKEn8LhdampEwNKK3ncnvWm0QC1qaQLecXzNrdatIc4iNie3l veLx1B+c5gLLgTKu6SmWyjSWED8vaYzbl5+EnR9tt2RlbWj+MPvhUTZs+vxeEFz4XJ4Y 7HFLHa/Rjm/2hj7VmA5WimuYteGm5dD7sqY6qpj0OyAgLU+wPEvO3XPBeyS8QisNBjgo 6ZIzLpGBD9sTCKM1x2VRe+Atr+fXAhPe/7CFMXVwi4h/8klLzNtAb0g7aGOuTBOXFs6o 8jhe/1pDIe6nt95W1jvmdx4XlkfxMz/+sxxeIG9UmERB+am5OQ0Xure54dw7A3auQVvs 9mHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=EmoJPia4REdmsbQ4H3ol9/VbnaPc01q7ugk/yi36Irk=; b=JgEdJjzE2hLvZmEO1Ak81sk2ENNiFrYF9PaBhNGLCNc7UHqRxfcED/xgbBU9ogui3l 06QXz21tnelC0xpw3gecZiIJeJqmNXimQS2RHngdZh6uKOzEa0pK9q6YH7bS41L3nHnL niYB+Ecj/r7K5B44nXF1RMBLC/LvESG9Z1k60QqXz7KXAAjZ0PnoDfBLMcc5l1oY6zzW ivtWuGAbekmK5/xWSe+FX1vz8CqYHzN9kFH97uRVsrWWiSCnLvtpYIHP+KatsJKD+2mt YwituWWjQx7HI6g6PnGTnsulf/1p4j3ko2FumAnLv/u0WQBJbPFxN4gUM7hqJL0Bm/2B jSAQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PkSwe6ZM; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e8si1073936plb.420.2019.06.13.20.12.48; Thu, 13 Jun 2019 20:12:48 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PkSwe6ZM; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726613AbfFNDMr (ORCPT + 14 others); 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-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 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(+) -- 2.21.0.rc0.269.g1a574e7a288b 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.