On Sat, 4 Jun 2005, Grant Grundler wrote: > Yes, Kyle tracked it down to parisc switching from a parisc asm > definition of get_unaligned() to using the generic ones. > Ie we moved from avoiding kernel traps to exercising them. > But 64-bit kernel worked fine with USB. > And on 32-bit kernels le64() loads degenerate into two 32-bit > loads. Ie the trap handler is still only dealing with 32-bit > misaligned accesses like it would with this patch. So I don't > think the kernel trap support is the problem. > > Regardless, the two functions are badly written and could > be alot clearer.
This is a naive question from someone who doesn't know much about the various implementations of get_unaligned() and put_unaligned(). In spite of the total overall number of changes required, wouldn't it be much simpler to have a suite of routines (inlines or macros) like: get_16, put_16, get_le16, put_le16, get_be16, put_be16 get_32, put_32, get_le32, put_le32, get_be32, put_be32 get_64, put_64, get_le64, put_le64, get_be64, put_be64 in short, {get|put}_{|le|be}{16|32|64} for native, little-endian, and big-endian unaligned accesses? The generic definitions are extremely simple and architecture-specific headers could easily provide optimized versions. I realize this doesn't fit in very well with the current state of the API, but IMHO it would be a big improvement. Alan Stern ------------------------------------------------------- This SF.Net email is sponsored by: NEC IT Guy Games. How far can you shotput a projector? How fast can you ride your desk chair down the office luge track? If you want to score the big prize, get to know the little guy. Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20 _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel