Messages in this thread | | | Date | Wed, 13 May 2009 18:39:24 -0400 | From | Jeff Garzik <> | Subject | Re: [PATCH] x86: Remove readq()/writeq() on 32-bit |
| |
H. Peter Anvin wrote: > #include <linux/io64_lh.h> > > linux/io64_lh.h would then look like: > > #ifndef _LINUX_IO64_LH_H > #define _LINUX_IO64_LH_H > > #include <linux/io.h> > > #ifndef HAVE_READQ > > /* Low-High nonatomic readq() */ > > #endif > > #ifndef HAVE_WRITEQ > > /* Low-High nonatomic writeq() */
Judging from this thread and past, I think people will continue to complain and get confused, even with the above.
How about
1) tree-wide rename: readq -> readq_na, writeq -> writeq_na
2) make all PCI writel-enabled arches provide readq_na and writeq_na
3) 64-bit PCI writel-enabled arches provide readq and HAVE_READQ, ditto for writeq. 32-bit provides neither readq nor HAVE_READQ.
4) If your hardware has non-standard ordering, handle it the obvious way in the driver, as you would do with any other special case.
Jeff
P.S. I use "writel-enabled" to note that some platforms do not provide PCI read*/write* functions at all.
| |