From: Arnd Bergmann <arnd@arndb.de>
To: Robert Hancock <hancockr@shaw.ca>
Cc: Rolf Eike Beer <eike-kernel@sf-tec.de>,
linux-kernel@vger.kernel.org,
Jan-Bernd Themann <ossthema@de.ibm.com>
Subject: Re: ioread64()?
Date: Wed, 13 Sep 2006 22:34:59 +0200 [thread overview]
Message-ID: <200609132234.59419.arnd@arndb.de> (raw)
In-Reply-To: <4500A9EF.40807@shaw.ca>
Am Friday 08 September 2006 01:23 schrieb Robert Hancock:
> > I'm looking for a way to access 64 or 128 bit of device space in a single
> > access. For smaller accesses I use ioread32() and friends. But which way
> > should I do it for the next bigger accesses? Casting the iospace to
> > something like u64* looks very suspicious to me. Any better ideas?
>
> There's no portable way to do this as far as I'm aware, for the likely
> reason that on many architectures it's impossible to do it in one access..
Jan-Bernd has stumbled over this as well. There is some hardware that
actually requires atomic 64 bit accesses and is only available on 64 bit
systems, and not for PCI devices.
I'd prefer to have an ioread64 function that is only provided on CONFIG_64BIT
systems, which will mean that any driver using it needs to depend on that
option in Kconfig.
As an alternative, you can already use the readq() function that some
architectures provide. Since linux doesn't run on 128 bit architectures,
you will not see one that can do an atomic read of that size.
Arnd <><
next prev parent reply other threads:[~2006-09-13 20:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <fa.zgAWvZQAAp+6nKV9Kd93QR7HZHw@ifi.uio.no>
2006-09-07 23:23 ` ioread64()? Robert Hancock
2006-09-13 20:34 ` Arnd Bergmann [this message]
2006-09-07 14:41 ioread64()? Rolf Eike Beer
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=200609132234.59419.arnd@arndb.de \
--to=arnd@arndb.de \
--cc=eike-kernel@sf-tec.de \
--cc=hancockr@shaw.ca \
--cc=linux-kernel@vger.kernel.org \
--cc=ossthema@de.ibm.com \
/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