From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Linus Torvalds <torvalds@osdl.org>
Cc: Roland Dreier <roland@topspin.com>,
Alan Cox <alan@lxorguk.ukuu.org.uk>,
Andrew Morton <akpm@osdl.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Petr Vandrovec <vandrove@vc.cvut.cz>
Subject: Re: [PATCH] ppc64: Fix __raw_* IO accessors
Date: Wed, 22 Sep 2004 11:34:57 +1000 [thread overview]
Message-ID: <1095816897.21231.32.camel@gaston> (raw)
In-Reply-To: <Pine.LNX.4.58.0409211510150.25656@ppc970.osdl.org>
On Wed, 2004-09-22 at 08:16, Linus Torvalds wrote:
> On Tue, 21 Sep 2004, Roland Dreier wrote:
> >
> > That means using __raw_writel() is pretty much guaranteed to blow up
> > on IBM pSeries (and I do care about pSeries for my driver).
>
> Oh, that's true. And that's pretty clearly a bug, since it just means that
> __raw_writel() can't even work in general.
Only when eeh is enabled for a device, never happens on your g5 :)
> > Maybe something like the patch below would make sense? (Reordering of
> > code is to make sure IO_TOKEN_TO_ADDR() is defined before the
> > __raw_*() functions; eeh.h has to be included after the in_*() and
> > out_*() functions are defined)
>
> I wonder if we could just remove the TOKEN/ADDR games. I think they were
> done entirely as a debugging aid (but I could be wrong). In particular,
> the compile-time type safefy should hopefully be better at finding these
> things in the long run, and in the short run the TOKEN games have
> obviously played their part.
>
> I wasn't using pp64 back when, maybe there's some other reason for playing
> games with the tokens? Who's the guity/knowledgeable party? Ben?
Well, g5 will never play token games on you. I need to investigate a bit
about what's up with pSeries, in the meantim, Roland patch looks fine.
There still is that issue with __raw_* doing both barrier-less and
endianswap-less accesses though. I think there is a fundamental problem
here with drivers like matroxfb using them to get endian-less access and
losing barriers at the same time.
I'd rather have matroxfb use writel with an explicit swap, or better, the
driver could maybe disable big endian register access and switch the card
to little endian, provided it can do that while keeping the frame buffer
itself set to BE (which is necessary most of the time).
Petr ?
Ben.
next prev parent reply other threads:[~2004-09-22 1:37 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-21 9:23 [PATCH] ppc64: Fix __raw_* IO accessors Benjamin Herrenschmidt
2004-09-21 10:05 ` Alan Cox
2004-09-21 11:41 ` Benjamin Herrenschmidt
2004-09-21 19:30 ` Roland Dreier
2004-09-21 19:41 ` Linus Torvalds
2004-09-21 20:55 ` Geert Uytterhoeven
2004-09-21 22:05 ` Roland Dreier
2004-09-21 22:16 ` Linus Torvalds
2004-09-22 1:34 ` Benjamin Herrenschmidt [this message]
2004-09-22 18:58 ` Petr Vandrovec
2004-09-23 0:49 ` Benjamin Herrenschmidt
2004-09-23 15:25 ` Petr Vandrovec
2004-09-23 20:26 ` [PATCH] matroxfb big-endian update (was Re: [PATCH] ppc64: Fix __raw_* IO accessors) Petr Vandrovec
2004-09-24 6:25 ` Benjamin Herrenschmidt
2004-09-24 9:53 ` Petr Vandrovec
2004-09-24 16:16 ` Kostas Georgiou
2004-09-25 1:40 ` Benjamin Herrenschmidt
2004-09-23 22:23 ` [PATCH] ppc64: Fix __raw_* IO accessors Benjamin Herrenschmidt
2004-09-22 2:15 ` Paul Mackerras
2004-09-22 7:36 ` Roland Dreier
2004-09-22 1:31 ` Benjamin Herrenschmidt
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=1095816897.21231.32.camel@gaston \
--to=benh@kernel.crashing.org \
--cc=akpm@osdl.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=roland@topspin.com \
--cc=torvalds@osdl.org \
--cc=vandrove@vc.cvut.cz \
/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