LKML Archive on
help / color / mirror / Atom feed
From: "Mike Frysinger" <>
To: "Hans J. Koch" <>
Cc: "Greg KH" <>, "Mike Frysinger" <>,
Subject: Re: [PATCH] UIO: only call pgprot_noncached if defined
Date: Wed, 5 Nov 2008 13:36:56 -0500	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <20081105182743.GE6382@local>

On Wed, Nov 5, 2008 at 13:27, Hans J. Koch wrote:
> On Wed, Nov 05, 2008 at 12:33:37PM -0500, Mike Frysinger wrote:
>> On Wed, Nov 5, 2008 at 11:33, Greg KH wrote:
>> > On Wed, Nov 05, 2008 at 12:36:11PM +0100, Hans J. Koch wrote:
>> >> There seem to be archs that cannot easily implement a sensible
>> >> pgprot_noncached() function, so we should merge this patch. UIO doesn't
>> >> compile on these archs right now.
>> >
>> > No, we should fix those arches to have that function at least NULLed
>> > out.  Isn't there only one, Blackfin?  Putting #ifdefs in .c files is
>> > not something we really want to do if at all possible.
>> that was my question.  this function isnt documented.  if the hardware
>> doesnt support it, is the right thing really for the arch to lie to
>> drivers and not actually give back cached settings even though it
>> asked for non-cached ?
> Well, if there's no possibility to map device memory in a non-cached
> way, it's very likely you don't want to use UIO at all. If there's a few
> seconds between a write and the value actually appearing in the hardware
> register, you will certainly don't see the results you expect.
> If Blackfin can't mmap non-cached memory, we should make UIO depend on

if it wasnt usable on the Blackfin arch, i wouldnt have been looking
at it in the first place.  there is some usage where merely hooking up
an interrupt is the only thing that is needed by userspace.

the only memory regions where a device would be hooked up are never
marked as cachable.  so if this function is only for mapping addresses
where device registers would live, then a stub pgprot_noncached()
would be fine.  but we cant do non-cached access on external memory
(e.g. SDRAM / DDR) if the device wanted coherent memory for dma.

      reply	other threads:[~2008-11-05 18:39 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-29 17:26 Mike Frysinger
2008-10-29 20:53 ` Hans J. Koch
2008-11-05  0:06   ` Mike Frysinger
2008-11-05 11:36 ` Hans J. Koch
2008-11-05 16:33   ` Greg KH
2008-11-05 17:08     ` Hans J. Koch
2008-11-05 17:43       ` Mike Frysinger
2008-11-05 17:33     ` Mike Frysinger
2008-11-05 17:42       ` Greg KH
2008-11-05 17:55         ` Mike Frysinger
2008-11-05 18:27       ` Hans J. Koch
2008-11-05 18:36         ` Mike Frysinger [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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \
    --subject='Re: [PATCH] UIO: only call pgprot_noncached if defined' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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