[S390] Enable flexible mmap layout for 64 bit processes
authorHeiko Carstens <heiko.carstens@de.ibm.com>
Wed, 12 Jan 2011 08:55:25 +0000 (09:55 +0100)
committerMartin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com>
Wed, 12 Jan 2011 08:55:24 +0000 (09:55 +0100)
Historically 64 bit processes use the legacy address layout. However
there is no reason why 64 bit processes shouldn't benefit from the
flexible mmap layout advantages.
Therefore just enable it.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/mm/mmap.c

index 89eff9e7b0b53267f433bdd89ad1fa2b495de002..ab7e08a01b6c053a41a71a9c5d7d6007ac3f7f79 100644 (file)
@@ -61,16 +61,11 @@ static inline unsigned long mmap_base(void)
 
 static inline int mmap_is_legacy(void)
 {
-#ifdef CONFIG_64BIT
-       /*
-        * Force standard allocation for 64 bit programs.
-        */
-       if (!is_compat_task())
+       if (current->personality & ADDR_COMPAT_LAYOUT)
                return 1;
-#endif
-       return sysctl_legacy_va_layout ||
-           (current->personality & ADDR_COMPAT_LAYOUT) ||
-           rlimit(RLIMIT_STACK) == RLIM_INFINITY;
+       if (rlimit(RLIMIT_STACK) == RLIM_INFINITY)
+               return 1;
+       return sysctl_legacy_va_layout;
 }
 
 #ifndef CONFIG_64BIT