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
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 _______________________________________________ Xen-devel mailing list Xen-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/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 _______________________________________________ Xen-devel mailing list Xen-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xen-devel
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 _______________________________________________ Xen-devel mailing list Xen-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xen-devel
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 _______________________________________________ Xen-devel mailing list Xen-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/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 _______________________________________________ Xen-devel mailing list Xen-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xen-devel