Staging: Comedi: Build only on arches providing PAGE_KERNEL_NOCACHE
authorRalf Baechle <ralf@linux-mips.org>
Thu, 23 Jun 2011 11:45:37 +0000 (12:45 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 27 Jun 2011 21:19:20 +0000 (14:19 -0700)
commit6fab3e1fbc83e6d61e8c28ceab513274183a96f6
tree626290498b9b0541dc8823b7c2cd0835d2ebbd42
parent89089158d191ba0195b33ebf35f91ed217d44848
Staging: Comedi: Build only on arches providing PAGE_KERNEL_NOCACHE

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@linux-mips.org>
Reported-by: David Miller <davem@davemloft.net>
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Martyn Welch <martyn.welch@ge.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/comedi/Kconfig