[PATCH] STAGING: Comedi: Build only on arches providing PAGE_KERNEL_NOCACHE

Stephen Rothwell sfr at canb.auug.org.au
Thu Jun 23 23:55:42 UTC 2011


Hi Ralf,

On Thu, 23 Jun 2011 12:45:37 +0100 Ralf Baechle <ralf at linux-mips.org> wrote:
>
> On architectures that don't define PAGE_KERNEL_NOCACHE, the Comedi driver turns
> into tragedy:
> 
>   CC [M]  drivers/staging/comedi/drivers.o
> drivers/staging/comedi/drivers.c: In function ‘comedi_buf_alloc’:
> drivers/staging/comedi/drivers.c:505:41: error: ‘PAGE_KERNEL_NOCACHE’ undeclared (first use in this function)
> drivers/staging/comedi/drivers.c:505:41: note: each undeclared identifier is rep orted only once for each function it appears in
> make[3]: *** [drivers/staging/comedi/drivers.o] Error 1
> 
> Restrict the driver to only those architectures that define PAGE_KERNEL_NOCACHE.
> 
> PAGE_KERNEL_NOCACHE is a kludge - some system architectures such as SGI IP27
> are even uable to offer uncached operation - at least in the way an unwitting
> driver might assume.  I haven't looked in details how the driver is using
> the area vmaped with PAGE_KERNEL_NOCACHE but maybe doing it XFS-style using
> cached memory and the flush_kernel_vmap_range / invalidate_kernel_vmap_range
> APIs in conjunction with the DMA API is a practical alternative.
> 
> Signed-off-by: Ralf Baechle <ralf at linux-mips.org>

Since Greg is on vacation, I will add this patch to my fixes tree in
linux-next until a better fix comes along (if there is one).

-- 
Cheers,
Stephen Rothwell                    sfr at canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://driverdev.linuxdriverproject.org/pipermail/driverdev-devel/attachments/20110624/c22ff1c8/attachment.asc>


More information about the devel mailing list