Re: how to get virtual address from dma address

From: Jes Sorensen (jes@sunsite.dk)
Date: Sat Oct 06 2001 - 12:23:26 EST


>>>>> "Paul" == Paul Mackerras <paulus@samba.org> writes:

Paul> David S. Miller writes:
>> I can not even count on one hand how many people I've helped
>> converting, who wanted a bus_to_virt() and when I showed them how
>> to do it with information the device provided already they said "oh
>> wow, I never would have thought of that". That process won't
>> happen as often with the suggested feature.

Paul> Well, let's see if we can come up with a way to achieve this
Paul> goal as well as the other.

Paul> I look at all the hash-table stuff in the usb-ohci driver and I
Paul> think to myself about all the complexity that is there (and I
Paul> haven't managed to convince myself yet that it is actually
Paul> SMP-safe) and all the time wasted doing that stuff, when on
Paul> probably 95% of the machines that use the usb-ohci driver, the
Paul> hashing stuff is totally unnecessary. I am talking about
Paul> powermacs, which don't have an iommu, and where the reverse
Paul> mapping is as simple as adding a constant.

I haven't looked at the ohci driver at all, however doesn't it return
anything but the dma address? No index, no offset, no nothing? If
thats the case, someone really needs to go visit the designers with a
large bat ;-(

Jes
-
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/



This archive was generated by hypermail 2b29 : Sun Oct 07 2001 - 21:00:42 EST