lkml.org 
[lkml]   [2007]   [Oct]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [bug] ata subsystem related crash with latest -git
From
Date
On Thu, 18 Oct 2007 19:14:29 +0200
Jens Axboe <jens.axboe@oracle.com> wrote:

> On Thu, Oct 18 2007, Arjan van de Ven wrote:
> > On Thu, 18 Oct 2007 09:55:04 -0700 (PDT)
> > Linus Torvalds <torvalds@linux-foundation.org> wrote:
> >
> > >
> > >
> > > On Thu, 18 Oct 2007, Jens Axboe wrote:
> > > > - unsigned long addr = page_to_phys(s->page) +
> > > > s->offset;
> > > > + unsigned long addr = page_to_phys(sg_page(s)) +
> > > > s->offset;
> > >
> > > Umm. May I suggest (I haven't read the whole thread yet, maybe
> > > somebody else already did) that
> > >
> > > static inline unsigned long sg_phys(struct scatterlist *sg)
> > > {
> > > return page_to_phys(sg_page(sg)) + sg->offset;
> > > }
> > >
> > > would be a good thing to have?
> > >
> > > Very few drivers should care so much about the *page* itself (or the
> > > offset). That's something that the generic allocation code etc cares
> > > about, but the driver is almost bound to care mostly about the actual
> > > DMA address
> >
> > .... but will that work for systems with IOMMU ? or is it fundamentally
> > the wrong interface
>
> They use foo_to_bus() on the address. sg_phys() should of course only be
> used where the user previously did page_to_phys() on the sg page.

I can take care of IOMMU stuff when I'll send IOMMU merging fix
patchset:

http://marc.info/?l=linux-scsi&m=119079718126157&w=2
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-10-19 11:05    [W:0.103 / U:0.424 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site