Re: ioread64()?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux