Subject: Re: pcitoh() and htopci()
To: Lennart Augustsson <lennart@augustsson.net>
From: Eduardo E. Horvath <eeh@one-o.com>
List: tech-kern
Date: 11/03/1999 10:32:30
> 
> Just about every PCI device driver that is converted to work
> on big-endian machines will need to do byte swapping.
> 
> Should we define pcitoh() and htopci() macros in pci.h?
> Currently each driver has its own homegrown definitions
> (possibly with different names).

Sounds good, but could we define them as direct loads/stores for
machines that can do this in load/store unit in hardware but don't
have a hardware bswap()?  How about something like this:

	int pcitoh32(int *loc);
	void htopci32(int *loc, int val);

etc.

=========================================================================
Eduardo Horvath				eeh@one-o.com
	"I need to find a pithy new quote." -- me