linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: leochen@broadcom.com (Leo (Hao) Chen)
To: linux-arm-kernel@lists.infradead.org
Subject: drivers/rtc/rtc-pl031.c uses __raw_readl()?
Date: Wed, 18 Nov 2009 14:19:48 -0800	[thread overview]
Message-ID: <20091118221948.GA11579@broadcom.com> (raw)
In-Reply-To: <20091117100256.GC7407@pengutronix.de>

On Tue, Nov 17, 2009 at 02:02:56AM -0800, Uwe Kleine-K?nig wrote:
> 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?

Our code was based on older io.h. No need to keep our own readb
definition any more. We'll clean them up by using the
generic readb defined in asm/io.h.

-- 

Leo Hao Chen

------------------------
Life is short, run long.

      reply	other threads:[~2009-11-18 22:19 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
2009-11-18 22:19     ` Leo (Hao) Chen [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:
  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=20091118221948.GA11579@broadcom.com \
    --to=leochen@broadcom.com \
    --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).