Skip to contentSkip to conversation

The sys_mmap2 syscall on m68k, cris, and mips

DISCUSSION H. Peter Anvin 1 participant 1 message Feb 23, 2006

lore
Share & tools
lore
#0 lore raw

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