|
From: Rene B. <re...@we...> - 2001-09-28 17:55:56
|
Roman Zippel wrote: > > You need to boot with nobats, otherwise kernel_set_cachemode doesn't > work. Will try it. > > Anyway, in the long run kernel_set_cachemode shouldn't be used, it's > simply isn't portable. The only problem is there isn't any standard > interface yet to do this properly. > Something like this is needed: > vaddr =3D __vmalloc(size, GFP_KERNEL, _PAGE_NO_CACHE | _PAGE_GUARDED); > for every page > paddr =3D va_to_phys(vaddr); > > va_to_phys exists currently only for ppc, but it's quite generic code. > For testing you can try it with nobats and we can change it later, but > you should already take care to only work with single pages, that makes > the conversion later easier. As far as I know the standard interface to get some uncached mem is=20 pci_alloc_consistent() as described in Documentation/DMA-mapping.txt.=20 This seems to working on APUS, but I`m not sure if the TLB`s are marked=20 as cache-inhibit. Ciao, Ren=E8 |