All of lore.kernel.org
 help / color / mirror / Atom feed
From: thierry.reding@gmail.com (Thierry Reding)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: Use arch_virt_to_idmap() only when available
Date: Wed, 23 Oct 2013 15:08:02 +0200	[thread overview]
Message-ID: <1382533682-4835-1-git-send-email-treding@nvidia.com> (raw)

The arch_virt_to_idmap variable is only available when patching of the
physical to virtual translations at runtime is enabled via the Kconfig
ARM_PATCH_PHYS_VIRT option.

Signed-off-by: Thierry Reding <treding@nvidia.com>
---
 arch/arm/include/asm/memory.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/include/asm/memory.h b/arch/arm/include/asm/memory.h
index 6748d62..38f2437 100644
--- a/arch/arm/include/asm/memory.h
+++ b/arch/arm/include/asm/memory.h
@@ -297,9 +297,11 @@ static inline void *phys_to_virt(phys_addr_t x)
  */
 static inline phys_addr_t __virt_to_idmap(unsigned long x)
 {
+#ifdef CONFIG_ARM_PATCH_VIRT_PHYS
 	if (arch_virt_to_idmap)
 		return arch_virt_to_idmap(x);
 	else
+#endif
 		return __virt_to_phys(x);
 }
 
-- 
1.8.4

                 reply	other threads:[~2013-10-23 13:08 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1382533682-4835-1-git-send-email-treding@nvidia.com \
    --to=thierry.reding@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.