From: benh@kernel.crashing.org (Benjamin Herrenschmidt)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] arm/io.h: add macros to read/write big/little endian register
Date: Fri, 24 Feb 2012 07:27:37 +1100 [thread overview]
Message-ID: <1330028857.20389.36.camel@pasglop> (raw)
In-Reply-To: <201202231335.04923.arnd@arndb.de>
On Thu, 2012-02-23 at 13:35 +0000, Arnd Bergmann wrote:
>
> This would mean going through an indirect function call for platforms
> where PCI is fundamentally different in hardware. We already do this
> for CONFIG_PPC_INDIRECT_PCI, but I'd hope we can avoid this on ARM.
On PPC we do it a bit more sneakily using a bit in the address. It
causes the inline accessor to be a big bigger but avoids the cost of the
indirect call for the "normal" case.
> Since devices that can bei either PCI or not are relatively rare, I'd
> rather put them in the same category as those that can either use
> PCI I/O space or some form of memory space and require that the
> drivers use the "I don't care what you are, just do what I want"
> accessors in the ioread/iowrite family that are already going through
> an indirect function call on most architectures.
>
> Also, the PCI aware readl/writel functions are already more
> heavyweight
> on most architectures (not on x86 though) than we want them to be,
> because they have to do extra synchronizing operations against DMA
> and/or spinlocks on weakly ordered architectures. We now have
> the readl_relaxed family here, but I believe they are only used
> for on-chip components at the moment.
On-chip have the same issue vs. DMA and we wouldn't want the defaults to
let them leak out of locks etc...
Cheers,
Ben.
next prev parent reply other threads:[~2012-02-23 20:27 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-23 9:17 [PATCH] arm/io.h: add macros to read/write big/little endian register Viresh Kumar
2012-02-23 9:53 ` Russell King - ARM Linux
2012-02-23 10:53 ` Viresh Kumar
2012-02-23 11:19 ` Russell King - ARM Linux
2012-02-23 11:30 ` Russell King - ARM Linux
2012-02-23 11:34 ` Pratyush Anand
2012-02-23 11:38 ` Russell King - ARM Linux
2012-02-23 12:33 ` Arnd Bergmann
2012-02-23 12:50 ` Russell King - ARM Linux
2012-02-23 13:35 ` Arnd Bergmann
2012-02-23 14:14 ` Russell King - ARM Linux
2012-02-23 20:27 ` Benjamin Herrenschmidt [this message]
2012-02-23 20:25 ` Benjamin Herrenschmidt
2012-02-24 16:22 ` Arnd Bergmann
2012-02-24 21:03 ` Benjamin Herrenschmidt
2012-02-23 12:01 ` Stefan Roese
2012-02-24 4:22 ` Pratyush Anand
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=1330028857.20389.36.camel@pasglop \
--to=benh@kernel.crashing.org \
--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).