From: nicolas.pitre@linaro.org (Nicolas Pitre)
To: linux-arm-kernel@lists.infradead.org
Subject: Build breakage from 'ARM: mm: use phys_addr_t appropriately in p2v and v2p conversions'
Date: Mon, 25 Nov 2013 22:56:25 -0500 (EST) [thread overview]
Message-ID: <alpine.LFD.2.10.1311252254200.9667@knanqh.ubzr> (raw)
In-Reply-To: <20131125233654.GV16735@n2100.arm.linux.org.uk>
On Mon, 25 Nov 2013, Russell King - ARM Linux wrote:
> On Mon, Nov 25, 2013 at 11:20:03PM +0000, Russell King - ARM Linux wrote:
> > On Mon, Nov 25, 2013 at 03:36:36PM -0700, Jason Gunthorpe wrote:
> > > Which is after your new inlines..
> > >
> > > An elegant fix wasn't obvious to me :)
> >
> > Same here... it's all rather complicated because of all those ifdefs.
> > Nothing easy comes to mind about how to fix this one. I'll look into
> > it at some point.
> >
> > If not, it's going to have to be a revert - or we bite the bullet and
> > start killing off some of these Kconfig options such as making
> > ARM_PATCH_PHYS_VIRT mandatory.
>
> Actually, I think Nicolas' commit:
>
> 1b9f95f8ade9efc2bd49f0e7b9dc61a038ac3eef
>
> was wrong to remove PLAT_PHYS_OFFSET. So, partially undoing Nicolas'
> patch, and reordering things a little, we end up with this, which if
> it weren't for the comment would be 5 lines shorter!
[...]
What about simply doing the following instead, which I'm sure used to
work properly at some point:
diff --git a/arch/arm/include/asm/memory.h b/arch/arm/include/asm/memory.h
index 9ecccc8650..2b8b8d3236 100644
--- a/arch/arm/include/asm/memory.h
+++ b/arch/arm/include/asm/memory.h
@@ -239,6 +239,14 @@ static inline unsigned long __phys_to_virt(phys_addr_t x)
#else
+#ifndef PHYS_OFFSET
+#ifdef PLAT_PHYS_OFFSET
+#define PHYS_OFFSET PLAT_PHYS_OFFSET
+#else
+#define PHYS_OFFSET UL(CONFIG_PHYS_OFFSET)
+#endif
+#endif
+
static inline phys_addr_t __virt_to_phys(unsigned long x)
{
return (phys_addr_t)x - PAGE_OFFSET + PHYS_OFFSET;
@@ -253,14 +261,6 @@ static inline unsigned long __phys_to_virt(phys_addr_t x)
#endif
#endif /* __ASSEMBLY__ */
-#ifndef PHYS_OFFSET
-#ifdef PLAT_PHYS_OFFSET
-#define PHYS_OFFSET PLAT_PHYS_OFFSET
-#else
-#define PHYS_OFFSET UL(CONFIG_PHYS_OFFSET)
-#endif
-#endif
-
#ifndef __ASSEMBLY__
/*
next prev parent reply other threads:[~2013-11-26 3:56 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-25 22:36 Build breakage from 'ARM: mm: use phys_addr_t appropriately in p2v and v2p conversions' Jason Gunthorpe
2013-11-25 23:20 ` Russell King - ARM Linux
2013-11-25 23:34 ` Jason Gunthorpe
2013-11-25 23:39 ` Russell King - ARM Linux
2013-11-25 23:48 ` Santosh Shilimkar
2013-11-25 23:36 ` Russell King - ARM Linux
2013-11-26 3:56 ` Nicolas Pitre [this message]
2013-11-26 9:54 ` Russell King - ARM Linux
2013-11-26 13:35 ` Nicolas Pitre
2013-11-26 13:41 ` Russell King - ARM Linux
2013-11-26 17:26 ` Nicolas Pitre
2013-11-26 17:36 ` Russell King - ARM Linux
2013-11-26 18:41 ` Nicolas Pitre
2013-11-26 19:25 ` Russell King - ARM Linux
2013-11-26 20:08 ` Nicolas Pitre
2013-12-10 19:17 ` Jason Gunthorpe
2013-12-10 19:43 ` Russell King - ARM Linux
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=alpine.LFD.2.10.1311252254200.9667@knanqh.ubzr \
--to=nicolas.pitre@linaro.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).