Really many places in Linux mm do the same, especially the generic mm/ code.
You cannot e.g. have user task VA space from 0 to ~0, as a lot of such tests
fail. It turned out the highest possible VA address for user tasks the Linux
MMU allows is (unsigned long)(-PGDIR_SIZE). That's a little bit pitty, as
e.g. Linux will not ever be able to test the sparcv9 ABI medhigh model, as
highest task address needs to be 0xfffffffc00000000.
On the other side, it is not that big pain for the sake of speed and
readability of generic MM code.
Cheers,
Jakub
___________________________________________________________________
Jakub Jelinek | jj@sunsite.mff.cuni.cz | http://sunsite.mff.cuni.cz
Administrator of SunSITE Czech Republic, MFF, Charles University
___________________________________________________________________
Ultralinux - first 64bit OS to take full power of the UltraSparc
Linux version 2.1.79 on a sparc64 machine (494.80 BogoMips).
___________________________________________________________________