Generic Linux architectural discussions
 help / color / mirror / Atom feed
* [PATCH] STAGING: Comedi: Build only on arches providing PAGE_KERNEL_NOCACHE
@ 2011-06-23 11:45 Ralf Baechle
  2011-06-23 11:45 ` Ralf Baechle
                   ` (3 more replies)
  0 siblings, 4 replies; 20+ messages in thread
From: Ralf Baechle @ 2011-06-23 11:45 UTC (permalink / raw)
  To: Greg Kroah-Hartman, devel, linux-kernel, David Howells,
	linux-m32r, linux-m32r-ja
  Cc: linux-arch

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>

 drivers/staging/comedi/Kconfig |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/staging/comedi/Kconfig b/drivers/staging/comedi/Kconfig
index 1502d80..bccdc12 100644
--- a/drivers/staging/comedi/Kconfig
+++ b/drivers/staging/comedi/Kconfig
@@ -2,6 +2,7 @@ config COMEDI
 	tristate "Data acquisition support (comedi)"
 	default N
 	depends on m
+	depends on BROKEN || FRV || M32R || MN10300 || SUPERH || TILE || X86
 	---help---
 	  Enable support a wide range of data acquisition devices
 	  for Linux.
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel

^ permalink raw reply related	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2011-06-23 23:55 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-23 11:45 [PATCH] STAGING: Comedi: Build only on arches providing PAGE_KERNEL_NOCACHE Ralf Baechle
2011-06-23 11:45 ` Ralf Baechle
2011-06-23 11:53 ` Martyn Welch
2011-06-23 11:53   ` Martyn Welch
2011-06-23 12:02   ` Ralf Baechle
2011-06-23 12:02     ` Ralf Baechle
2011-06-23 12:10     ` Kumar Gala
2011-06-23 12:10       ` Kumar Gala
2011-06-23 15:05       ` Ralf Baechle
2011-06-23 15:05         ` Ralf Baechle
2011-06-23 12:13     ` Martyn Welch
2011-06-23 12:13       ` Martyn Welch
2011-06-23 22:01     ` Benjamin Herrenschmidt
2011-06-23 16:01 ` Geert Uytterhoeven
2011-06-23 16:01   ` Geert Uytterhoeven
2011-06-23 16:31   ` Ralf Baechle
2011-06-23 16:31     ` Ralf Baechle
2011-06-23 19:18     ` Arnaud Lacombe
2011-06-23 19:18       ` Arnaud Lacombe
2011-06-23 23:55 ` Stephen Rothwell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox