On Fri, Jun 14, 2002 at 12:06:40PM +1000, David Gibson wrote: > On Thu, Jun 13, 2002 at 06:57:45PM -0700, Eugene Surovegin wrote: > > > > At 06:33 PM 6/13/2002, David Gibson wrote: > > >On Thu, Jun 13, 2002 at 06:25:11PM -0700, Eugene Surovegin wrote: > > >> > > >> At 05:24 PM 6/13/2002, David Gibson wrote: > > >> >That's right. But I think the patch below is a better fix for the > > >> >problem. It makes consistent_alloc()/consistent_free() just do the > > >> >right thing for both cache coherent and cache non-coherent processors, > > >> >so we can get rid of the ifdef in pci_alloc_consistent() and > > >> >pci_free_consistent(). > > >> > > >> So, kmalloc will allocate non-cacheable memory? > > >> > > >> I seriously doubt it (actually I've just tested it:). > > > > > >No, but on cache coherent processors we don't need non-cacheable > > >memory. That's the whole point. Likewise with __get_free_pages() > > >which is what pci_alloc_consistent() uses on cache-coherent processors > > >now. > > > > OK, I got it :) > > > > One problem though, kmalloc allocated memory will not be necessarily > > properly aligned > > as required by DMA-mappings.txt > > > > Some PCI drivers may break because of this. > > Ah, yes, indeed. How about this:
One last thing, did you mean to keep consistent_free as kfree() still and not free_pages() ? -- Tom Rini (TR1265) http://gate.crashing.org/~trini/ ** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
