> > > > extern void * > > > > pci_pool_dma_to_cpu (struct pci_pool *pool, dma_addr_t handle); > > > > > > Do lots of drivers need the reverse mapping? It wasn't on my todo list > > > yet. > > > > Some hardware (like OHCI) talks to drivers using those dma handles. > > I wonder if it may be feasible to allocate a bunch of contiguous > pages. Then, whenever the hardware returns a bus address, subtract > the remembered bus address of the zone start, add the offset to > the virtual and voila. That's effectively what the implementation I posted is doing. Simple math ... as soon as you get the right "logical page", and that page size could become a per-pool tunable. Currently one logical page is PAGE_SIZE; there are some issues to deal with in terms of not crossing page boundaries. There can be multiple such pages, known to the pool allocator and hidden from the device drivers. I'd expect most USB host controllers wouldn't allocate more than one or two pages, so the cost of this function would typically be small. - Dave _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: http://lists.sourceforge.net/lists/listinfo/linux-usb-devel
- [linux-usb-devel] Re: SLAB vs. pci_alloc_xxx in usb-uhc... David Brownell
- [linux-usb-devel] Re: SLAB vs. pci_alloc_xxx in us... Manfred Spraul
- [linux-usb-devel] Re: SLAB vs. pci_alloc_xxx in us... David S. Miller
- Re: [linux-usb-devel] Re: SLAB vs. pci_alloc_xxx i... Johannes Erdfelt
- Re: [linux-usb-devel] Re: SLAB vs. pci_alloc_xxx i... Alan Cox
- [linux-usb-devel] Re: SLAB vs. pci_alloc_xxx in us... David Brownell
- [linux-usb-devel] Re: SLAB vs. pci_alloc_xxx i... David S. Miller
- Re: [linux-usb-devel] Re: SLAB vs. pci_alloc_xxx i... Steve Longerbeam
- [linux-usb-devel] Re: SLAB vs. pci_alloc_xxx in us... Pete Zaitcev
- [linux-usb-devel] Re: SLAB vs. pci_alloc_xxx i... David S. Miller
- [linux-usb-devel] Re: SLAB vs. pci_alloc_xxx in us... David Brownell
- [linux-usb-devel] Re: SLAB vs. pci_alloc_xxx in us... G�rard Roudier
- Re: [linux-usb-devel] Re: SLAB vs. pci_alloc_xxx i... Alan Cox
- [linux-usb-devel] Re: SLAB vs. pci_alloc_xxx in us... David Brownell
- [linux-usb-devel] Re: SLAB vs. pci_alloc_xxx in us... G�rard Roudier
- [linux-usb-devel] Re: SLAB vs. pci_alloc_xxx i... David Brownell
- Re: [linux-usb-devel] Re: SLAB vs. pci_alloc_xxx i... Russell King
- Re: [linux-usb-devel] Re: SLAB vs. pci_alloc_x... Roman Weissgaerber
- Re: [linux-usb-devel] Re: SLAB vs. pci_alloc_xxx i... Brad Parker
- Re: [linux-usb-devel] Re: SLAB vs. pci_alloc_x... Roman Weissgaerber
- Re: [linux-usb-devel] Re: SLAB vs. pci_alloc_xxx i... Alan Cox
