On Tue, 10 May 2011, Jan Andersson wrote: > > Shouldn't these things already be defined in an arch-specific header > > file? Just like readl(), __raw_readl(), ... ? > > > > If there is call to make a big endian access that works on all > architectures that would be a better choice. > > I could have used __raw_readl() directly but I didn't since the above is > what is done in ehci.h. IMHO it makes sense to have it like this because > (again assuming that read/write() always is defined to work with LE > memory) a read/write*_be is what we need to do and then people can > define the appropriate function/macro for their arch here locally. > > (It is possible that I have missed or misunderstood how these io > routines are intended work, to me it seems like much has been based on > the assumption that I/O will always be connected over PCI or some other > LE bus). > > I propose that the current solution is kept. If that is not acceptable I > suggest that the calls are changed to use the __raw versions of > read/write (but that could break in case the __raw versions are defined > to be native endian and someone wants to use a BE controller together > with a LE processor). Yes, keeping the current solution is easiest. But the whole situation is a mess; some architectures define readl_be() and others don't. It needs to be solved at a higher level. Alan Stern -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html