The sys_mmap2 syscall on m68k, cris, and mips

From: H. Peter Anvin
Date: Thu Feb 23 2006 - 12:20:57 EST


Hello, sorry for the wide distribution;

I am trying to track down the story on the sys_mmap2 system call. Currently, to the best of my knowledge, glibc, ÂClibc, and klibc (haven't looked at newlib recently) all assume that sys_mmap2() is the way to map large files on 32-bit architectures, and that the offset argument is always shifted over by 12.

As indicated by this post, this is the case on most architectures:

http://marc.theaimsgroup.com/?l=linux-kernel&m=114066586932670&w=2

The odd ones out are m68k, cris, and MIPS. Ralf Baechle has indicated that non-4K-pages are currently experimental on MIPS, and that he would be open to changing MIPS to fit the rest of the pattern. That leaves m68k and cris.

Thus, I would like to hear your opinion. One opinion is to define that the shift is fixed, but architecture-specific, and introduce an MMAP2_PAGE_SHIFT #define that libraries can pick up. (That would require m68k to change at least on the Sun3 platform, though. I don't think there is a huge installed base there, though.)

-hpa
-
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/