Re: [PATCH 21 of 53] ipath - use phys_to_virt instead of bus_to_virt

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

 



    Bryan> As Segher mentioned, bus_to_virt is unportable, so it's
    Bryan> definitely the wrong thing to use.

Yes, but at least it says what you're trying to do.  asm-powerpc's
io.h has this for phys_to_virt:

 *	This function does not handle bus mappings for DMA transfers. In
 *	almost all conceivable cases a device driver should not be using
 *	this function

so replacing bus_to_virt with that is not a step forward.

    Bryan> Any ideas?  Should this turn from a one-liner into a
    Bryan> big-refactor-for-2.6.18 patch?

I don't think there's a quick way to fix this.  What you really want
to do is override the DMA mapping functions for your device so that
you can keep track of the kernel mapping.  powerpc can already do this
(cf the ehca driver), and I think patches to do it on x86-64 are
floating around as part of the "Calgary IOMMU" work.

 - R.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux