On Friday, December 21, 2012 12:01 AM, Dan Carpenter wrote: > On Thu, Dec 20, 2012 at 10:36:39PM +0000, Ian Abbott wrote: >> On 20/12/12 17:09, H Hartley Sweeten wrote: >>>Hello all, >>> >>>I have a question... >>> >>>In the comedi core, the asynchronous 'prealloc_buf' is vmap'ed after >>>the page list has been allocated. The code in question looks like this: >>> >>> async->prealloc_buf = >>>#ifdef PAGE_KERNEL_NOCACHE >>> vmap(pages, n_pages, VM_MAP, PAGE_KERNEL_NOCACHE); >>>#else >>> vmap(pages, n_pages, VM_MAP, PAGE_KERNEL); >>>#endif >>> >>>Is the #ifdef something left over from an older kernel? >>> >>>Isn't PAGE_KERNEL_NOCACHE always defined? >> >> Unfortunately not; it's arch dependent. Neither ARM nor PowerPC >> define it, for example. > > Power PC has _PAGE_NO_CACHE and the DRM subsystem uses that like > PAGE_KERNEL_NOCACHE. For example PAGE_AGP is define in one of these > ways: > > #define PAGE_AGP PAGE_KERNEL_NOCACHE > #define PAGE_AGP __pgprot(_PAGE_KERNEL | _PAGE_NO_CACHE) <- only on powerpc > #define PAGE_AGP PAGE_KERNEL > > I don't really know what's going on here though... > > comedia and AGP are the only drivers which use PAGE_KERNEL_NOCACHE. Yeah, I noticed it's not used very much. I was hoping to either remove its use or just use by default. Either way it would get rid of the #ifdef. But, I'm not sure what's going on either so for not I guess it needs to stay. Regards, Hartley _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/devel