From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] dmaengine: fsl-edma: fixup reg offset and hw S/G support in big-endian model
Date: Tue, 23 Sep 2014 20:23:21 +0200 [thread overview]
Message-ID: <4465641.JLAzuEs1O5@wuerfel> (raw)
In-Reply-To: <1411492720444.3205@freescale.com>
On Tuesday 23 September 2014 17:18:43 Jingchang Lu wrote:
> I will reconsider this setting. BTW, why writel() can't be used
> for memory location since it's still mapped and registers space is
> also memory mapped? Thanks.
You cannot rely on an '__iomem' token to actually be a pointer, even
if that is currently the case on ARM.
On other architectures, the bits in the pointer can encode something
completely different, e.g. it may be the physical address on
architectures that have instructions to load/store on that directly,
and ioremap() in that case returns an identity mapping.
If you install sparse and build with 'make C=1', you will in fact
get a warning about the code when you assign a regular pointer to
an __iomem pointer or vice versa.
Arnd
prev parent reply other threads:[~2014-09-23 18:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-23 9:15 [PATCH] dmaengine: fsl-edma: fixup reg offset and hw S/G support in big-endian model Jingchang Lu
2014-09-23 10:37 ` Russell King - ARM Linux
2014-09-23 17:21 ` Jingchang Lu
2014-09-23 12:30 ` Arnd Bergmann
2014-09-23 17:18 ` Jingchang Lu
2014-09-23 18:23 ` Arnd Bergmann [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=4465641.JLAzuEs1O5@wuerfel \
--to=arnd@arndb.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