From: santosh.shilimkar@ti.com (Santosh Shilimkar)
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 18:48:55 -0500 [thread overview]
Message-ID: <5293E1E7.9030800@ti.com> (raw)
In-Reply-To: <20131125233929.GW16735@n2100.arm.linux.org.uk>
On Monday 25 November 2013 06:39 PM, Russell King - ARM Linux wrote:
> On Mon, Nov 25, 2013 at 04:34:58PM -0700, Jason Gunthorpe wrote:
>> diff --git a/arch/arm/include/asm/memory.h b/arch/arm/include/asm/memory.h
>> index eaf428c..b886eba 100644
>> --- a/arch/arm/include/asm/memory.h
>> +++ b/arch/arm/include/asm/memory.h
>> @@ -239,15 +239,8 @@ static inline unsigned long __phys_to_virt(phys_addr_t x)
>>
>> #else
>>
>> -static inline phys_addr_t __virt_to_phys(unsigned long x)
>> -{
>> - return (phys_addr_t)x - PAGE_OFFSET + PHYS_OFFSET;
>> -}
>> -
>> -static inline unsigned long __phys_to_virt(phys_addr_t x)
>> -{
>> - return x - PHYS_OFFSET + PAGE_OFFSET;
>> -}
>> +#define __virt_to_phys(x) ((phys_addr_t)(x) - PAGE_OFFSET + PHYS_OFFSET)
>> +#define __phys_to_virt(x) ((unsigned long)((phys_addr_t)(x) - PHYS_OFFSET + PAGE_OFFSET))
>>
>> #endif
>> #endif
>>
>> I don't seen an obvious major downside to loosing the inline, static
>> checking will have to be done with the ARM_PATCH_PHYS_VIRT branch..
>
> Well, at this point I'm seriously thinking that killing the __ versions
> of this is the right thing to do: the original idea was that the __
> versions were the underlying mathematical conversions, with all the
> casting kept out of them - thereby making it easy for them to be
> overridden without introducing subtle bugs.
>
> That's been lost now with all the casting, so there's little point them
> really existing.
>
Just saw the thread. I was assuming that ARM_PATCH_PHYS_VIRT is always
enabled when the PLAT_PHYS_OFFSET was killed. Sorry for the build breakage.
NoMMU and machines with mach/memory.h still don't have ARM_PATCH_PHYS_VIRT
enabled so they would break.
Looks like you have proposed already a patch with PLAT_PHYS_OFFSET
which should help the case. Thanks.
Regards,
Santosh
next prev parent reply other threads:[~2013-11-25 23:48 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 [this message]
2013-11-25 23:36 ` Russell King - ARM Linux
2013-11-26 3:56 ` Nicolas Pitre
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=5293E1E7.9030800@ti.com \
--to=santosh.shilimkar@ti.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.