From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Greg KH <greg@kroah.com>
Cc: Sachin P Sant <sachinp@linux.vnet.ibm.com>,
Stephen Rothwell <sfr@canb.auug.org.au>,
Linux-Kernel <linux-kernel@vger.kernel.org>,
Linuxppc-dev <Linuxppc-dev@ozlabs.org>,
Linux-Next <linux-next@vger.kernel.org>,
Paul Mackerras <paulus@samba.org>,
Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>,
Geert Uytterhoeven <geert@linux-m68k.org>,
Subrata Modak <subrata@linux.vnet.ibm.com>
Subject: Re: [BUILD FAILURE 01/04] Next June 04:PPC64 randconfig [drivers/staging/comedi/drivers.o]
Date: Sat, 06 Jun 2009 09:31:40 +1000 [thread overview]
Message-ID: <1244244700.31984.15.camel@pasglop> (raw)
In-Reply-To: <20090605182618.GA11853@kroah.com>
On Fri, 2009-06-05 at 11:26 -0700, Greg KH wrote:
> Should the comedi layer just not be using PAGE_KERNEL_NOCACHE here? I
> can't believe that we need to do something like this in a driver. What
> should the proper fix for this be?
Actualy, I think powerpc -had- PAGE_KERNEL_NOCACHE and I removed it ...
Oh well... My understanding was that the exposed interface isn't that
but instead pgprot_noncached().
Nowadays we provide these on ppc:
#define pgprot_noncached(prot) (__pgprot((pgprot_val(prot) & ~_PAGE_CACHE_CTL) | \
_PAGE_NO_CACHE | _PAGE_GUARDED))
#define pgprot_noncached_wc(prot) (__pgprot((pgprot_val(prot) & ~_PAGE_CACHE_CTL) | \
_PAGE_NO_CACHE))
#define pgprot_cached(prot) (__pgprot((pgprot_val(prot) & ~_PAGE_CACHE_CTL) | \
_PAGE_COHERENT))
#define pgprot_cached_wthru(prot) (__pgprot((pgprot_val(prot) & ~_PAGE_CACHE_CTL) | \
_PAGE_COHERENT | _PAGE_WRITETHRU))
Now, of course, expect interesting problems if you use it in vmap, since
you are mapping struct pages, you are effectively mapping memory.
On some platforms, it's absolutely illegal to map memory non-cacheable while
this memory is mapped cacheable elsewhere and can be fatal. But the pages you
are mapping here, I suppose, are also part of the linear mapping which is ...
cacheable.
Why would you need that non-cacheable mapping in the first place ? If it's
for DMA, it's the wrong interface I believe....
Cheers,
Ben.
WARNING: multiple messages have this Message-ID (diff)
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Greg KH <greg@kroah.com>
Cc: Subrata Modak <subrata@linux.vnet.ibm.com>,
Paul Mackerras <paulus@samba.org>,
Sachin P Sant <sachinp@linux.vnet.ibm.com>,
Linux-Kernel <linux-kernel@vger.kernel.org>,
Linux-Next <linux-next@vger.kernel.org>,
Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>,
Stephen Rothwell <sfr@canb.auug.org.au>,
Geert Uytterhoeven <geert@linux-m68k.org>,
Linuxppc-dev <Linuxppc-dev@ozlabs.org>,
Michael Ellerman <michael@ellerman.id.au>
Subject: Re: [BUILD FAILURE 01/04] Next June 04:PPC64 randconfig [drivers/staging/comedi/drivers.o]
Date: Sat, 06 Jun 2009 09:31:40 +1000 [thread overview]
Message-ID: <1244244700.31984.15.camel@pasglop> (raw)
In-Reply-To: <20090605182618.GA11853@kroah.com>
On Fri, 2009-06-05 at 11:26 -0700, Greg KH wrote:
> Should the comedi layer just not be using PAGE_KERNEL_NOCACHE here? I
> can't believe that we need to do something like this in a driver. What
> should the proper fix for this be?
Actualy, I think powerpc -had- PAGE_KERNEL_NOCACHE and I removed it ...
Oh well... My understanding was that the exposed interface isn't that
but instead pgprot_noncached().
Nowadays we provide these on ppc:
#define pgprot_noncached(prot) (__pgprot((pgprot_val(prot) & ~_PAGE_CACHE_CTL) | \
_PAGE_NO_CACHE | _PAGE_GUARDED))
#define pgprot_noncached_wc(prot) (__pgprot((pgprot_val(prot) & ~_PAGE_CACHE_CTL) | \
_PAGE_NO_CACHE))
#define pgprot_cached(prot) (__pgprot((pgprot_val(prot) & ~_PAGE_CACHE_CTL) | \
_PAGE_COHERENT))
#define pgprot_cached_wthru(prot) (__pgprot((pgprot_val(prot) & ~_PAGE_CACHE_CTL) | \
_PAGE_COHERENT | _PAGE_WRITETHRU))
Now, of course, expect interesting problems if you use it in vmap, since
you are mapping struct pages, you are effectively mapping memory.
On some platforms, it's absolutely illegal to map memory non-cacheable while
this memory is mapped cacheable elsewhere and can be fatal. But the pages you
are mapping here, I suppose, are also part of the linear mapping which is ...
cacheable.
Why would you need that non-cacheable mapping in the first place ? If it's
for DMA, it's the wrong interface I believe....
Cheers,
Ben.
next prev parent reply other threads:[~2009-06-05 23:31 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-05 18:26 [BUILD FAILURE 01/04] Next June 04:PPC64 randconfig [drivers/staging/comedi/drivers.o] Subrata Modak
2009-06-05 18:26 ` Subrata Modak
2009-06-05 18:26 ` Subrata Modak
2009-06-05 18:26 ` Greg KH
2009-06-05 18:26 ` Greg KH
2009-06-05 23:31 ` Benjamin Herrenschmidt [this message]
2009-06-05 23:31 ` Benjamin Herrenschmidt
2009-06-05 23:32 ` Benjamin Herrenschmidt
2009-06-05 23:32 ` Benjamin Herrenschmidt
2009-06-06 0:56 ` David Miller
2009-06-06 0:56 ` David Miller
2009-06-06 0:56 ` David Miller
2009-06-06 4:16 ` Benjamin Herrenschmidt
2009-06-06 4:16 ` Benjamin Herrenschmidt
2009-06-06 5:51 ` Greg KH
2009-06-06 5:51 ` Greg KH
2009-06-06 13:36 ` Frank Mori Hess
2009-06-06 13:36 ` Frank Mori Hess
2009-06-07 14:36 ` Subrata Modak
2009-06-07 14:36 ` Subrata Modak
2009-06-09 3:50 ` Benjamin Herrenschmidt
2009-06-09 3:50 ` Benjamin Herrenschmidt
2009-06-09 18:34 ` Subrata Modak
2009-06-09 18:34 ` Subrata Modak
2009-06-09 18:54 ` Geert Uytterhoeven
2009-06-09 18:54 ` Geert Uytterhoeven
2009-06-09 18:54 ` Geert Uytterhoeven
2009-06-09 22:34 ` Benjamin Herrenschmidt
2009-06-09 22:34 ` Benjamin Herrenschmidt
-- strict thread matches above, loose matches on Subject: below --
2009-06-04 13:31 Subrata Modak
2009-06-04 13:31 ` Subrata Modak
2009-06-04 13:31 ` Subrata Modak
2009-06-04 18:07 ` Greg KH
2009-06-04 18:07 ` Greg KH
2009-06-04 18:07 ` Greg KH
2009-06-04 20:40 ` Geert Uytterhoeven
2009-06-04 20:40 ` Geert Uytterhoeven
2009-06-04 20:40 ` Geert Uytterhoeven
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=1244244700.31984.15.camel@pasglop \
--to=benh@kernel.crashing.org \
--cc=Geert.Uytterhoeven@sonycom.com \
--cc=Linuxppc-dev@ozlabs.org \
--cc=geert@linux-m68k.org \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=paulus@samba.org \
--cc=sachinp@linux.vnet.ibm.com \
--cc=sfr@canb.auug.org.au \
--cc=subrata@linux.vnet.ibm.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.