linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: u.kleine-koenig@pengutronix.de (Uwe Kleine-König)
To: linux-arm-kernel@lists.infradead.org
Subject: drivers/rtc/rtc-pl031.c uses __raw_readl()?
Date: Tue, 17 Nov 2009 11:02:56 +0100	[thread overview]
Message-ID: <20091117100256.GC7407@pengutronix.de> (raw)
In-Reply-To: <63386a3d0911120043y2143c7f5w7289bc83b2e31847@mail.gmail.com>

On Thu, Nov 12, 2009 at 09:43:43AM +0100, Linus Walleij wrote:
> 2009/11/11 Linus Walleij <linus.ml.walleij@gmail.com>:
> 
> > Is there some special reason as to why drivers/rtc/rtc-pl031.c uses
> > the __raw_[read|write]l() macro instead of plain [read|write]l()?
> 
> Reading the macro definitions I come to the conclusion that readl()
> is always little-endian and __raw_readl() is the machine endianness,
Actually the readl part is not necessarily true I think.

At least arch/arm/mach-bcmring/include/mach/io.h has:

	/* Do not enable mem_pci for a big endian arm architecture or unexpected byteswaps will */
	/* happen in readw/writew etc. */

	#define readb(c)        __raw_readb(c)
	...

But maybe this is a bug in mach-bcmring?!  Or a work-around of drivers
using readb et al in wrong sitatations?

Best regards
Uwe

-- 
Pengutronix e.K.                              | Uwe Kleine-K?nig            |
Industrial Linux Solutions                    | http://www.pengutronix.de/  |

  parent reply	other threads:[~2009-11-17 10:02 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-11  9:30 drivers/rtc/rtc-pl031.c uses __raw_readl()? Linus Walleij
2009-11-12  8:43 ` Linus Walleij
2009-11-13 23:26   ` Russell King - ARM Linux
2009-11-19  9:43     ` Russell King - ARM Linux
2009-11-19 10:49       ` Russell King - ARM Linux
2009-11-17 10:02   ` Uwe Kleine-König [this message]
2009-11-18 22:19     ` Leo (Hao) Chen

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=20091117100256.GC7407@pengutronix.de \
    --to=u.kleine-koenig@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.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).