[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-ia64-devel] [PATCH][RFC] enable CONFIG_IA64_GENERIC and paravirtualize swiotlb & sba_iommu



On Thu, 2007-05-03 at 22:23 +0900, Isaku Yamahata wrote:
> On Wed, May 02, 2007 at 11:27:31PM -0600, Alex Williamson wrote:
> > --- linux-2.6-xen-sparse/arch/ia64/hp/common/sba_iommu.c    2006-09-19 
> > 21:42:06.000000000 -0600
> > +++ linux-2.6-xen-sparse/arch/ia64/hp/common/sba_iommu.c    2007-05-02 
> > 22:52:34.000000000 -0600
> > @@ -944,7 +943,7 @@
> >  
> >     while (size > 0) {
> >             ASSERT(((u8 *)pdir_start)[7] == 0); /* verify availability */
> > -           sba_io_pdir_entry(pdir_start, (unsigned long) addr);
> > +           sba_io_pdir_entry(pdir_start, virt_to_bus(addr));
> >  
> >             DBG_RUN("     pdir 0x%p %lx\n", pdir_start, *pdir_start);
> >  
> 
> sba_io_pdir_entry() seems to expect virtual address as 2nd argument
> so that modifying sba_io_pdir_entry() itself would be better than
> modifying all callers argument.
> I don't know the sba_iommu spec, though.

   Good point.  sba_io_pdir_entry is taking a shortcut since it's only
mapping region 7 addresses.  It would probably be more correct to do the
virt_to_bus there.  Functionally the approaches end up with the same
result since a mask is used to do the virt to phys translation in
sba_io_pdir_entry.  Thanks,

        Alex

-- 
Alex Williamson                             HP Open Source & Linux Org.


_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ia64-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.