Re: [PATCH] x86: Remove readq()/writeq() on 32-bit

From: Jeff Garzik
Date: Wed May 13 2009 - 18:40:13 EST


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.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/