Re: [PATCH] STAGING: Comedi: Build only on arches providing PAGE_KERNEL_NOCACHE
From: Kumar Gala <hidden>
Date: 2011-06-23 12:24:03
Also in:
linux-arch, linux-sh, lkml
On Jun 23, 2011, at 7:02 AM, Ralf Baechle wrote:
On Thu, Jun 23, 2011 at 12:53:36PM +0100, Martyn Welch wrote: =20quoted
On 23/06/11 12:45, Ralf Baechle wrote:quoted
On architectures that don't define PAGE_KERNEL_NOCACHE, the Comedi =
driver turns
quoted
quoted
into tragedy: =20 CC [M] drivers/staging/comedi/drivers.o drivers/staging/comedi/drivers.c: In function =91comedi_buf_alloc=92: drivers/staging/comedi/drivers.c:505:41: error: =
=91PAGE_KERNEL_NOCACHE=92 undeclared (first use in this function)
quoted
quoted
drivers/staging/comedi/drivers.c:505:41: note: each undeclared =
identifier is rep orted only once for each function it appears in
quoted
quoted
make[3]: *** [drivers/staging/comedi/drivers.o] Error 1 =20 Restrict the driver to only those architectures that define =
PAGE_KERNEL_NOCACHE.
quoted
quoted
=20 PAGE_KERNEL_NOCACHE is a kludge - some system architectures such as =
SGI IP27
quoted
quoted
are even uable to offer uncached operation - at least in the way an =
unwitting
quoted
quoted
driver might assume. I haven't looked in details how the driver is =
using
quoted
quoted
the area vmaped with PAGE_KERNEL_NOCACHE but maybe doing it =
XFS-style using
quoted
quoted
cached memory and the flush_kernel_vmap_range / =
invalidate_kernel_vmap_range
quoted
quoted
APIs in conjunction with the DMA API is a practical alternative. =20 Signed-off-by: Ralf Baechle <redacted> =20 drivers/staging/comedi/Kconfig | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) =20diff --git a/drivers/staging/comedi/Kconfig =
b/drivers/staging/comedi/Kconfig
quoted
quoted
index 1502d80..bccdc12 100644--- a/drivers/staging/comedi/Kconfig +++ b/drivers/staging/comedi/Kconfig@@ -2,6 +2,7 @@ config COMEDItristate "Data acquisition support (comedi)" default N depends on m + depends on BROKEN || FRV || M32R || MN10300 || SUPERH || TILE || =
X86
quoted
=20 I'm sure I got comedi to compile on a 32-bit PPC board not that long =
ago. Has
quoted
something changed, or is this just not an exhaustive list?=20 (Adding the PPC folks to cc.) =20 A "git grep -w PAGE_KERNEL_NOCACHE arch/powerpc/" doesn't find =
anything so
I don't think the driver will build there. I don't have a PPC =
toolchain
to verify that.
I can verify it fails on PPC as well: drivers/staging/comedi/drivers.c: In function 'comedi_buf_alloc': drivers/staging/comedi/drivers.c:505:37: error: 'PAGE_KERNEL_NOCACHE' = undeclared (first use in this function) drivers/staging/comedi/drivers.c:505:37: note: each undeclared = identifier is reported only once for each function it appears in However, we do have a #define for PAGE_KERNEL_NC. - k=