From: eric.y.miao@gmail.com (Eric Miao)
To: linux-arm-kernel@lists.infradead.org
Subject: Question: locomo_{read/write}l macros
Date: Thu, 21 Jan 2010 10:06:33 +0800 [thread overview]
Message-ID: <f17812d71001201806n216cf13akbf58a671fb22c8d3@mail.gmail.com> (raw)
In-Reply-To: <BD79186B4FD85F4B8E60E381CAEE1909020E8DFF@mi8nycmail19.Mi8.com>
On Thu, Jan 21, 2010 at 5:33 AM, H Hartley Sweeten
<hartleys@visionengravers.com> wrote:
> Hello all,
>
> Is there a reason why the locomo stuff is using custom
> macros for {read/write}l access?
>
No.
> In arch/arm/include/asm/hardware/locomo.h:
>
> #define locomo_writel(val,addr) ({ *(volatile u16 *)(addr) = (val); })
> #define locomo_readl(addr) ? ? ?(*(volatile u16 *)(addr))
>
> It appears that these are just non-typesafe versions of the
> __raw_{read/write}w macros in arch/arm/include/asm/io.h:
>
> #define __raw_writew(v,a) ? ? ? (__chk_io_ptr(a), *(volatile unsigned short __force *)(a) = (v))
> #define __raw_readw(a) ? ? ? ? ?(__chk_io_ptr(a), *(volatile unsigned short __force *)(a))
>
> Is there any reason not to change them all (other than
> having to then fix all the callers to be typesafe)?
>
> It appears the only users are in:
>
> arch/arm/common/locomo.c
> arch/arm/include/asm/hardware/locomo.h
> drivers/input/keyboard/locomokbd.c
> drivers/leds/leds-locomo.c
> drivers/video/backlight/locomolcd.c
>
They are "many" users instead of "only" I'm afraid. Thomas Cc'ed
may have some additional out-of-tree drivers, but yeah, I'd agree
that we fixed these in-tree driver first.
next prev parent reply other threads:[~2010-01-21 2:06 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-20 21:33 Question: locomo_{read/write}l macros H Hartley Sweeten
2010-01-21 2:06 ` Eric Miao [this message]
[not found] ` <4B581CD2.9010007@ru.mvista.com>
2010-01-21 16:52 ` H Hartley Sweeten
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=f17812d71001201806n216cf13akbf58a671fb22c8d3@mail.gmail.com \
--to=eric.y.miao@gmail.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).