Skip to contentSkip to conversation

STAGING: Comedi: Build only on arches providing PAGE_KERNEL_NOCACHE

PATCH In review Ralf Baechle 7 participants 11 messages Jun 23, 2011

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

 drivers/staging/comedi/Kconfig |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/staging/comedi/Kconfig +1 -0
index 1502d80..bccdc12 100644
@@ -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
[email protected]
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel

#1 lore raw
Quoted 28 lines · Ralf Baechle

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.

 drivers/staging/comedi/Kconfig |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/staging/comedi/Kconfig +0 -0
index 1502d80..bccdc12 100644

drivers/staging/comedi/Kconfig config COMEDI · line 5

Quoted 4 lines
drivers/staging/comedi/Kconfig +1 -0
@@ -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

I'm sure I got comedi to compile on a 32-bit PPC board not that long ago. Has something changed, or is this just not an exhaustive list?

Quoted 7 lines
drivers/staging/comedi/Kconfig +0 -0
 	---help---
 	  Enable support a wide range of data acquisition devices
 	  for Linux.

_______________________________________________
devel mailing list
[email protected]
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel

Signature · 8 lines
Martyn Welch (Principal Software Engineer) | Registered in England and
GE Intelligent Platforms                   | Wales (3828642) at 100
T +44(0)127322748                          | Barbirolli Square, Manchester,
E [email protected]                      | M2 3AB  VAT:GB 927559189
_______________________________________________
devel mailing list
[email protected]
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
#2 lore raw
Quoted 24 lines · Martyn Welch
Quoted 23 lines · Ralf Baechle

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.

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

drivers/staging/comedi/Kconfig config COMEDI · line 5

Quoted 9 lines
drivers/staging/comedi/Kconfig +1 -0
index 1502d80..bccdc12 100644
@@ -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

I'm sure I got comedi to compile on a 32-bit PPC board not that long ago. Has something changed, or is this just not an exhaustive list?

(Adding the PPC folks to cc.)

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.

Ralf
_______________________________________________
devel mailing list
[email protected]
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel

#3 lore raw
Quoted 39 lines · Ralf Baechle
Quoted 24 lines · Martyn Welch
Quoted 23 lines · Ralf Baechle

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.

drivers/staging/comedi/Kconfig | 1 +

1 files changed, 1 insertions(+), 0 deletions(-)
Quoted 12 lines

drivers/staging/comedi/Kconfig config COMEDI · line 5

Quoted 9 lines
drivers/staging/comedi/Kconfig +1 -0
index 1502d80..bccdc12 100644
@@ -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

I'm sure I got comedi to compile on a 32-bit PPC board not that long ago. Has something changed, or is this just not an exhaustive list?

Quoted 5 lines

(Adding the PPC folks to cc.)

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

#4 lore raw
Quoted 6 lines · Kumar Gala
Quoted 5 lines

(Adding the PPC folks to cc.)

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.

Quoted 7 lines

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.

Do you think this driver in it's current stage is so valuable that some ifdefery to get it to work on PPC is the way to go?

IA-64 has PAGE_KERNEL_UC, so basically the same question for IA-64, too.

But preferably the driver should be sorted out properly and until the v1 of my patch which disables it on all architectures that don't provide a PAGE_KERNEL_NOCACHE definition will do just fine.

Ralf

#5 lore raw
In reply to Ralf Baechle
Quoted 39 lines · Ralf Baechle
Quoted 24 lines · Martyn Welch
Quoted 23 lines · Ralf Baechle

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.

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

drivers/staging/comedi/Kconfig config COMEDI · line 5

Quoted 9 lines
drivers/staging/comedi/Kconfig +1 -0
index 1502d80..bccdc12 100644
@@ -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

I'm sure I got comedi to compile on a 32-bit PPC board not that long ago. Has something changed, or is this just not an exhaustive list?

Quoted 5 lines

(Adding the PPC folks to cc.)

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.

Ah, just found the tree looks like I had a little patch to make it seemingly work, though it will make it "not work" for most other archs at a guess (it may not even be right on PPC):

drivers/staging/comedi/drivers.c +0 -0
index 44d6b62..263ad3d 100644
@@ -505,7 +505,7 @@ int comedi_buf_alloc(struct comedi_device *dev, struct

comedi_subdevice *s,

                }
                if (i == n_pages) {
                        async->prealloc_buf =
-                           vmap(pages, n_pages, VM_MAP, PAGE_KERNEL_NOCACHE);
+                           vmap(pages, n_pages, VM_MAP, PAGE_KERNEL_NC);
                }
                vfree(pages);

(Sorry for the wrapping)

Signature · 4 lines
Martyn Welch (Principal Software Engineer) | Registered in England and
GE Intelligent Platforms                   | Wales (3828642) at 100
T +44(0)127322748                          | Barbirolli Square, Manchester,
E [email protected]                      | M2 3AB  VAT:GB 927559189
#6 lore raw
In reply to Ralf Baechle
Quoted 26 lines · Ralf Baechle
Quoted 24 lines · Martyn Welch
Quoted 23 lines · Ralf Baechle

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.

 drivers/staging/comedi/Kconfig |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
Quoted 12 lines
Quoted 4 lines
Quoted 4 lines
drivers/staging/comedi/Kconfig +0 -0
index 1502d80..bccdc12 100644
Quoted 8 lines

drivers/staging/comedi/Kconfig config COMEDI · line 5

Quoted 5 lines
drivers/staging/comedi/Kconfig +1 -0
@@ -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

I'm sure I got comedi to compile on a 32-bit PPC board not that long ago. Has something changed, or is this just not an exhaustive list?

It went away. There's a proper API (pgprot_noncached), but it depends what this is used for and it's likely to be broken anyways... what is that driver trying to map non-cached ?

Cheers,
Ben.

Quoted 11 lines

(Adding the PPC folks to cc.)

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.

Ralf
--
To unsubscribe from this list: send the line "unsubscribe linux-arch" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

Acked-by on v1 1/1
#7 lore raw
In reply to Ralf Baechle
Quoted 11 lines · Ralf Baechle

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.

Quoted 8 lines

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.

If only to get m68k/allmodconfig going again (hmm, there's another staging driver
preventing a green light).

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds

#8 lore raw
Quoted 3 lines · Geert Uytterhoeven

If only to get m68k/allmodconfig going again (hmm, there's another staging driver
preventing a green light).

I ran into this doing an allyesconfig. Allyesconfig has one disadvantage, for choice it will only select the first or default option which means that option gets exercised well and all the other options not at all. On MIPS that'd be IP22, 32-bit, R4x00, big endian, 4K pages, no multithreading, 250Hz. Make randconfig disables lots of things so often misses the opportunity to trigger some issues.

I'd really want an "make allrandconfig" which enables as many options as possible but picks a random one from choice statements, something like that.

Ralf

#9 lore raw

Hi,

Quoted 13 lines · Ralf Baechle
Quoted 3 lines · Geert Uytterhoeven

If only to get m68k/allmodconfig going again (hmm, there's another staging driver
preventing a green light).

I ran into this doing an allyesconfig.  Allyesconfig has one disadvantage, for choice it will only select the first or default option which means that option gets exercised well and all the other options not at all.  On MIPS that'd be IP22, 32-bit, R4x00, big endian, 4K pages, no multithreading, 250Hz.  Make randconfig disables lots of things so often misses the opportunity to trigger some issues.

Quoted 3 lines

I'd really want an "make allrandconfig" which enables as many options as possible but picks a random one from choice statements, something like that.

Something like the attached patch ? [sorry for the attachment, gmail is so much a PITA for that ...]

- Arnaud

ps: the patch breaks all the others *config target.

Quoted 6 lines

 Ralf
--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

From f4b15f8ac27ce0913cb4dca0b0e26f1aaf30025e Mon Sep 17 00:00:00 2001
From: Arnaud Lacombe <[email protected]>
Date: Thu, 23 Jun 2011 15:11:24 -0400
Subject: [PATCH] allyesrandchoiceconfig

---
 scripts/kconfig/Makefile   |    2 +-
 scripts/kconfig/conf.c     |    7 +++++++
 scripts/kconfig/confdata.c |   14 +++++++++++---
 scripts/kconfig/lkc.h      |    1 +
 4 files changed, 20 insertions(+), 4 deletions(-)
scripts/kconfig/Makefile +1 -1
index faa9a47..4eb9eac 100644
@@ -98,7 +98,7 @@ update-po-config: $(obj)/kxgettext $(obj)/gconf.glade.h
 
 PHONY += allnoconfig allyesconfig allmodconfig alldefconfig randconfig
 
-allnoconfig allyesconfig allmodconfig alldefconfig randconfig: $(obj)/conf
+allnoconfig allyesconfig allyesrandchoiceconfig allmodconfig alldefconfig randconfig: $(obj)/conf
 	$< --$@ $(Kconfig)
 
 PHONY += listnewconfig oldnoconfig savedefconfig defconfig
scripts/kconfig/conf.c +7 -0
index 006ad81..9b1c324 100644
@@ -33,6 +33,7 @@ enum input_mode {
 	savedefconfig,
 	listnewconfig,
 	oldnoconfig,
+	allyesrandchoiceconfig,
 } input_mode = oldaskconfig;
 
 char *defconfig_file;
@@ -453,6 +454,7 @@ static struct option long_opts[] = {
 	{"randconfig",      no_argument,       NULL, randconfig},
 	{"listnewconfig",   no_argument,       NULL, listnewconfig},
 	{"oldnoconfig",     no_argument,       NULL, oldnoconfig},
+	{"allyesrandchoiceconfig", no_argument, NULL, allyesrandchoiceconfig},
 	{NULL, 0, NULL, 0}
 };
 
@@ -476,6 +478,7 @@ int main(int ac, char **av)
 		case savedefconfig:
 			defconfig_file = optarg;
 			break;
+		case allyesrandchoiceconfig:
 		case randconfig:
 		{
 			struct timeval now;
@@ -579,6 +582,10 @@ int main(int ac, char **av)
 	case allnoconfig:
 		conf_set_all_new_symbols(def_no);
 		break;
+	case allyesrandchoiceconfig:
+		conf_set_all_new_symbols(def_yes);
+		conf_set_all_new_choice_symbols(def_random);
+		break;
 	case allyesconfig:
 		conf_set_all_new_symbols(def_yes);
 		break;
scripts/kconfig/confdata.c +11 -3
index 2bafd9a..e96b95a 100644
@@ -945,6 +945,7 @@ static void randomize_choice_values(struct symbol *csym)
 
 	cnt = 0;
 	expr_list_for_each_sym(prop->expr, e, sym) {
+		printf("%s %d %d\n", sym->name, def, cnt+1);
 		if (def == cnt++) {
 			sym->def[S_DEF_USER].tri = yes;
 			csym->def[S_DEF_USER].val = sym;
@@ -980,12 +981,14 @@ static void set_all_choice_values(struct symbol *csym)
 
 void conf_set_all_new_symbols(enum conf_def_mode mode)
 {
-	struct symbol *sym, *csym;
+	struct symbol *sym;
 	int i, cnt;
 
 	for_all_symbols(i, sym) {
 		if (sym_has_value(sym))
 			continue;
+		if (sym_is_choice(sym))
+			continue;
 		switch (sym_get_type(sym)) {
 		case S_BOOLEAN:
 		case S_TRISTATE:
@@ -1006,14 +1009,19 @@ void conf_set_all_new_symbols(enum conf_def_mode mode)
 			default:
 				continue;
 			}
-			if (!(sym_is_choice(sym) && mode == def_random))
-				sym->flags |= SYMBOL_DEF_USER;
+			sym->flags |= SYMBOL_DEF_USER;
 			break;
 		default:
 			break;
 		}
 
 	}
+}
+
+void conf_set_all_new_choice_symbols(enum conf_def_mode mode)
+{
+	struct symbol *csym;
+	int i;
 
 	sym_clear_all_valid();
 
scripts/kconfig/lkc.h +1 -0
index febf0c9..672c78f 100644
@@ -91,6 +91,7 @@ char *conf_get_default_confname(void);
 void sym_set_change_count(int count);
 void sym_add_change_count(int count);
 void conf_set_all_new_symbols(enum conf_def_mode mode);
+void conf_set_all_new_choice_symbols(enum conf_def_mode mode);
 
 /* confdata.c and expr.c */
 static inline void xfwrite(const void *str, size_t len, size_t count, FILE *out)
Signature · 1 line
1.7.3.4.574.g608b.dirty
#10 lore raw
In reply to Ralf Baechle

Hi Ralf,

Quoted 12 lines · On Thu, 23 Jun 2011 12:45:37 +0100 Ralf Baechle <[email protected]> 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.

Quoted 8 lines

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.

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).

Signature · 3 lines
Cheers,
Stephen Rothwell                    [email protected]
http://www.canb.auug.org.au/~sfr/