* ioread64()?
@ 2006-09-07 14:41 Rolf Eike Beer
0 siblings, 0 replies; 3+ messages in thread
From: Rolf Eike Beer @ 2006-09-07 14:41 UTC (permalink / raw)
To: linux-kernel
[-- Attachment #1: Type: text/plain, Size: 318 bytes --]
Hi,
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?
Greetings,
Eike
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: ioread64()?
[not found] <fa.zgAWvZQAAp+6nKV9Kd93QR7HZHw@ifi.uio.no>
@ 2006-09-07 23:23 ` Robert Hancock
2006-09-13 20:34 ` ioread64()? Arnd Bergmann
0 siblings, 1 reply; 3+ messages in thread
From: Robert Hancock @ 2006-09-07 23:23 UTC (permalink / raw)
To: Rolf Eike Beer; +Cc: linux-kernel
Rolf Eike Beer wrote:
> Hi,
>
> 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?
>
> Greetings,
>
> Eike
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..
--
Robert Hancock Saskatoon, SK, Canada
To email, remove "nospam" from hancockr@nospamshaw.ca
Home Page: http://www.roberthancock.com/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: ioread64()?
2006-09-07 23:23 ` ioread64()? Robert Hancock
@ 2006-09-13 20:34 ` Arnd Bergmann
0 siblings, 0 replies; 3+ messages in thread
From: Arnd Bergmann @ 2006-09-13 20:34 UTC (permalink / raw)
To: Robert Hancock; +Cc: Rolf Eike Beer, linux-kernel, Jan-Bernd Themann
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 <><
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-09-13 20:34 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-07 14:41 ioread64()? Rolf Eike Beer
[not found] <fa.zgAWvZQAAp+6nKV9Kd93QR7HZHw@ifi.uio.no>
2006-09-07 23:23 ` ioread64()? Robert Hancock
2006-09-13 20:34 ` ioread64()? Arnd Bergmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox