[klibc] Re: [PATCH] get rid of asm/page.h usage

H. Peter Anvin hpa at zytor.com
Mon Feb 21 01:28:49 PST 2005


Olaf Hering wrote:
> I think there is no need to special case some archs, just get the thing
> during runtime on all archs.

The problem is that MMAP2_SHIFT != __getpageshift() on sparc32, that is 
at least my understanding.

	-hpa

> ===================================================================
> --- klibc/mmap.c	(revision 1010)
> +++ klibc/mmap.c	(working copy)
> @@ -7,15 +7,8 @@
>  #include <sys/syscall.h>
>  #include <sys/mman.h>
>  #include <unistd.h>
> -#include <asm/page.h>		/* For PAGE_SHIFT */
>  
> -#if defined(__sparc__)
> -# define MMAP2_SHIFT	12	/* Fixed by syscall definition */
> -#elif defined(__mips__) || defined(__powerpc__)
>  # define MMAP2_SHIFT	__getpageshift() /* Variable */
> -#else
> -# define MMAP2_SHIFT	PAGE_SHIFT
> -#endif
>  



More information about the klibc mailing list