Re: sys_mmap2 on different architectures

From: H. Peter Anvin
Date: Wed Feb 22 2006 - 19:03:27 EST


David S. Miller wrote:

Right.

On sparc32 we had the issue where we had a 8K page size
platform (sun4) and the rest were using 4K page size.

I can't even think why we do that fixed shift actually. I think Jakub
Jalinek thought this might be a way to make applications assuming
4K page size work on the 8K page size machines.

I'm going to say that you can feel free to fix this to use PAGE_SHIFT
correctly all the time. Applications should be calling getpagesize()
and not assume what that value might be.


Okay, what I'll do is that I'll hard-code 12 on i386, SPARC and ARM; on other architectures I'll use getpagesize(). Of course, on 64-bit architectures this is not an issue; there I just call sys_mmap.

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