[Q] comedi: vmap of the async->prealloc_buf
dan.carpenter at oracle.com
Fri Dec 21 07:01:16 UTC 2012
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);
> > vmap(pages, n_pages, VM_MAP, PAGE_KERNEL);
> >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
#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.
More information about the devel