* __va() vs phys_to_virt()
@ 2005-03-18 18:32 Hollis Blanchard
2005-03-18 18:45 ` Xin Zhao
2005-03-22 20:45 ` Dave Hansen
0 siblings, 2 replies; 6+ messages in thread
From: Hollis Blanchard @ 2005-03-18 18:32 UTC (permalink / raw)
To: xen-devel
Can someone explain where it's appropriate to use __va() and where
phys_to_virt() should be used instead? Or are they truly synonymous, and we
should phase out one or the other?
--
Hollis Blanchard
IBM Linux Technology Center
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: __va() vs phys_to_virt()
2005-03-18 18:32 __va() vs phys_to_virt() Hollis Blanchard
@ 2005-03-18 18:45 ` Xin Zhao
2005-03-18 18:46 ` Hollis Blanchard
2005-03-22 20:45 ` Dave Hansen
1 sibling, 1 reply; 6+ messages in thread
From: Xin Zhao @ 2005-03-18 18:45 UTC (permalink / raw)
To: Hollis Blanchard; +Cc: xen-devel
I thought they are the same. phys_to_virt() essentially calls __va().
Xin
On Fri, 18 Mar 2005, Hollis Blanchard wrote:
> Can someone explain where it's appropriate to use __va() and where
> phys_to_virt() should be used instead? Or are they truly synonymous, and we
> should phase out one or the other?
>
> --
> Hollis Blanchard
> IBM Linux Technology Center
>
>
> -------------------------------------------------------
> SF email is sponsored by - The IT Product Guide
> Read honest & candid reviews on hundreds of IT Products from real users.
> Discover which products truly live up to the hype. Start reading now.
> http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/xen-devel
>
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: __va() vs phys_to_virt()
2005-03-18 18:45 ` Xin Zhao
@ 2005-03-18 18:46 ` Hollis Blanchard
2005-03-18 18:59 ` Jesse Barnes
0 siblings, 1 reply; 6+ messages in thread
From: Hollis Blanchard @ 2005-03-18 18:46 UTC (permalink / raw)
To: Xin Zhao; +Cc: xen-devel
On Friday 18 March 2005 12:45, Xin Zhao wrote:
> I thought they are the same. phys_to_virt() essentially calls __va().
They are implemented the same on x86, but that does not imply they mean the
same thing.
> On Fri, 18 Mar 2005, Hollis Blanchard wrote:
> > Can someone explain where it's appropriate to use __va() and where
> > phys_to_virt() should be used instead? Or are they truly synonymous, and
> > we should phase out one or the other?
> >
> > --
> > Hollis Blanchard
> > IBM Linux Technology Center
> >
> >
> > -------------------------------------------------------
> > SF email is sponsored by - The IT Product Guide
> > Read honest & candid reviews on hundreds of IT Products from real users.
> > Discover which products truly live up to the hype. Start reading now.
> > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
> > _______________________________________________
> > Xen-devel mailing list
> > Xen-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/xen-devel
--
Hollis Blanchard
IBM Linux Technology Center
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: __va() vs phys_to_virt()
2005-03-18 18:46 ` Hollis Blanchard
@ 2005-03-18 18:59 ` Jesse Barnes
2005-03-18 19:16 ` Hollis Blanchard
0 siblings, 1 reply; 6+ messages in thread
From: Jesse Barnes @ 2005-03-18 18:59 UTC (permalink / raw)
To: xen-devel; +Cc: Hollis Blanchard, Xin Zhao
On Friday, March 18, 2005 10:46 am, Hollis Blanchard wrote:
> On Friday 18 March 2005 12:45, Xin Zhao wrote:
> > I thought they are the same. phys_to_virt() essentially calls __va().
>
> They are implemented the same on x86, but that does not imply they mean the
> same thing.
A quick grep shows that most platforms implement __va and phys_to_virt the
same way, as addr + PAGE_OFFSET. But alpha seems to do phys_to_virt a little
differently. There may be others though, it was only a quick scan.
Jesse
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: __va() vs phys_to_virt()
2005-03-18 18:59 ` Jesse Barnes
@ 2005-03-18 19:16 ` Hollis Blanchard
0 siblings, 0 replies; 6+ messages in thread
From: Hollis Blanchard @ 2005-03-18 19:16 UTC (permalink / raw)
To: Jesse Barnes; +Cc: xen-devel, Xin Zhao
On Friday 18 March 2005 12:59, Jesse Barnes wrote:
> On Friday, March 18, 2005 10:46 am, Hollis Blanchard wrote:
> > On Friday 18 March 2005 12:45, Xin Zhao wrote:
> > > I thought they are the same. phys_to_virt() essentially calls __va().
> >
> > They are implemented the same on x86, but that does not imply they mean
> > the same thing.
>
> A quick grep shows that most platforms implement __va and phys_to_virt the
> same way, as addr + PAGE_OFFSET. But alpha seems to do phys_to_virt a
> little differently. There may be others though, it was only a quick scan.
I should clarify that I'm not talking about Linux, but rather the Xen core.
Linux's use is obviously related, as Xen was a copy-and-paste job, but I'm
asking specifically how/if the meanings of these functions differ in Xen.
--
Hollis Blanchard
IBM Linux Technology Center
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: __va() vs phys_to_virt()
2005-03-18 18:32 __va() vs phys_to_virt() Hollis Blanchard
2005-03-18 18:45 ` Xin Zhao
@ 2005-03-22 20:45 ` Dave Hansen
1 sibling, 0 replies; 6+ messages in thread
From: Dave Hansen @ 2005-03-22 20:45 UTC (permalink / raw)
To: Hollis Blanchard; +Cc: xen-devel
On Fri, 2005-03-18 at 12:32 -0600, Hollis Blanchard wrote:
> Can someone explain where it's appropriate to use __va() and where
> phys_to_virt() should be used instead? Or are they truly synonymous, and we
> should phase out one or the other?
One minor thing on some Linux arches is that virt_to_phys() is volatile,
__pa() is just a macro, so they have different optimization rules.
-- Dave
-------------------------------------------------------
This SF.net email is sponsored by: 2005 Windows Mobile Application Contest
Submit applications for Windows Mobile(tm)-based Pocket PCs or Smartphones
for the chance to win $25,000 and application distribution. Enter today at
http://ads.osdn.com/?ad_id=6882&alloc_id=15148&op=click
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2005-03-22 20:45 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-18 18:32 __va() vs phys_to_virt() Hollis Blanchard
2005-03-18 18:45 ` Xin Zhao
2005-03-18 18:46 ` Hollis Blanchard
2005-03-18 18:59 ` Jesse Barnes
2005-03-18 19:16 ` Hollis Blanchard
2005-03-22 20:45 ` Dave Hansen
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.