LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: "Mike Frysinger" <vapier.adi@gmail.com>
To: "Hans J. Koch" <hjk@linutronix.de>
Cc: "Mike Frysinger" <vapier@gentoo.org>,
	gregkh@suse.de, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] UIO: only call pgprot_noncached if defined
Date: Tue, 4 Nov 2008 19:06:53 -0500	[thread overview]
Message-ID: <8bd0f97a0811041606n7f712ddbt399e72576110a000@mail.gmail.com> (raw)
In-Reply-To: <20081029205347.GC2951@local>

On Wed, Oct 29, 2008 at 15:53, Hans J. Koch wrote:
> On Wed, Oct 29, 2008 at 01:26:17PM -0400, Mike Frysinger wrote:
>> Not all arches support pgprot_noncached (like the Blackfin port).
>
> These archs have it (just a quick grep, might be incomplete):
> x86, sh, alpha, powerpc, ia64, sparc, sparc64, mips, avr32, arm, parisc.
>
> That's 11 archs _with_ pgprot_noncached(). Might be a good idea to add
> that macro to blackfin, too.

when i looked i got the feeling that the arches that could support
this added it, and those that couldnt did not.  the Blackfin arch
cannot support per-page caching behavior (well, we can with the MPU
turned on, but the overhead of the MPU makes it unrealistic for
production deployment in most cases), so we do not have it defined.

there doesnt seem to be any real documentation on this function though ...

>> Other
>> drivers seem to handle this by checking to see if it is defined,
>
> That statement made me curious. I greped around for a while, but the
> only driver that does this check is drivers/char/mem.c, while there are
> 22 drivers that use pgprot_noncached() without checking.

i was ignoring the drivers that are not generic as i dont think
they're relevant.  that cuts out quite a few of those "22 drivers".

>> so let's do that in the UIO driver as well.
>
> Well, your patch is surely OK and will work, but I've got some
> difficulties to understand why you prefer patching an ugly #ifdef into up
> to 22 drivers instead of just defining that simple macro in your arch,
> like many of the others already did. But maybe I missed the point
> here, could you please elaborate a bit?

it doesnt make sense to ifdef a driver that only works on a single
arch or two and has hardware support for this function (and thus has
it defined).
-mike

  reply	other threads:[~2008-11-05  0:07 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 [this message]
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

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=8bd0f97a0811041606n7f712ddbt399e72576110a000@mail.gmail.com \
    --to=vapier.adi@gmail.com \
    --cc=gregkh@suse.de \
    --cc=hjk@linutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vapier@gentoo.org \
    --subject='Re: [PATCH] UIO: only call pgprot_noncached if defined' \
    /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

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