Linus Torvalds wrote: > > Grr. That may make sense on 32-bit architectures, but makes no sense > what-so-ever on 64-bit ones. > > Why not just say that it's two "unsigned long" arguments, and split it by > "sizeof unsigned long". And then, on 64-bit architectures, the high bits > can be ignored. You can even get gcc to optimize it all away by doing > something like > > #define HALF_LONG (BITS_IN_LONG / 2) > > offset = (((loff_t)high << HALF_LONG) << HALF_LONG) | low; > > and then gcc should automaticaly notice that shifting up that way is just > a fancy way of saying "0", and ignore the high bits. > > How married are people to this crazy 2x "32 bits" model? > I certainly am *not* happy with it, and said so when it was first posted. My main complaint with it is that it introduces yet another special case in the kernel<->userspace ABI, because although we've had this problem before, it has been hacked around a different way every time. -hpa -- H. Peter Anvin, Intel Open Source Technology Center I work for Intel. I don't speak on their behalf. -- To unsubscribe from this list: send the line "unsubscribe linux-arch" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html