From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Ralf Baechle <ralf@linux-mips.org>
Cc: devel@driverdev.osuosl.org, David Howells <dhowells@redhat.com>,
linux-m32r@ml.linux-m32r.org, Paul Mundt <lethal@linux-sh.org>,
linux-sh@vger.kernel.org, Greg Kroah-Hartman <gregkh@suse.de>,
linux-kernel@vger.kernel.org, Chris Metcalf <cmetcalf@tilera.com>,
Martyn Welch <martyn.welch@ge.com>,
linux-am33-list@redhat.com, Paul Mackerras <paulus@samba.org>,
linux-m32r-ja@ml.linux-m32r.org, "H. Peter Anvin" <hpa@zytor.com>,
Thomas Gleixner <tglx@linutronix.de>,
linux-arch@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
Ingo Molnar <mingo@redhat.com>,
x86@kernel.org
Subject: Re: [PATCH] STAGING: Comedi: Build only on arches providing PAGE_KERNEL_NOCACHE
Date: Fri, 24 Jun 2011 08:01:39 +1000 [thread overview]
Message-ID: <1308866499.32158.216.camel@pasglop> (raw)
In-Reply-To: <20110623120234.GA22524@linux-mips.org>
On Thu, 2011-06-23 at 13:02 +0100, Ralf Baechle wrote:
> On Thu, Jun 23, 2011 at 12:53:36PM +0100, Martyn Welch wrote:
>
> > On 23/06/11 12:45, Ralf Baechle 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@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
> >
> > 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.
> (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 majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2011-06-23 22:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20110623114536.GA14011@linux-mips.org>
[not found] ` <4E032940.5010205@ge.com>
2011-06-23 12:02 ` [PATCH] STAGING: Comedi: Build only on arches providing PAGE_KERNEL_NOCACHE Ralf Baechle
2011-06-23 12:10 ` Kumar Gala
2011-06-23 12:13 ` Martyn Welch
2011-06-23 22:01 ` Benjamin Herrenschmidt [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1308866499.32158.216.camel@pasglop \
--to=benh@kernel.crashing.org \
--cc=cmetcalf@tilera.com \
--cc=devel@driverdev.osuosl.org \
--cc=dhowells@redhat.com \
--cc=gregkh@suse.de \
--cc=hpa@zytor.com \
--cc=lethal@linux-sh.org \
--cc=linux-am33-list@redhat.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-m32r-ja@ml.linux-m32r.org \
--cc=linux-m32r@ml.linux-m32r.org \
--cc=linux-sh@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=martyn.welch@ge.com \
--cc=mingo@redhat.com \
--cc=paulus@samba.org \
--cc=ralf@linux-mips.org \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).