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.

regards,
dan carpenter

_______________________________________________
devel mailing list
[email protected]
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel

Reply via email to