[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <200609132234.59419.arnd@arndb.de>
Date: Wed, 13 Sep 2006 22:34:59 +0200
From: Arnd Bergmann <arnd@...db.de>
To: Robert Hancock <hancockr@...w.ca>
Cc: Rolf Eike Beer <eike-kernel@...tec.de>,
linux-kernel@...r.kernel.org,
Jan-Bernd Themann <ossthema@...ibm.com>
Subject: Re: ioread64()?
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 <><
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists