Skip to content

Commit

Permalink
[S390] Enable flexible mmap layout for 64 bit processes
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Heiko Carstens authored and Martin Schwidefsky committed Jan 12, 2011
1 parent e7828bb commit 7e0d485
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions arch/s390/mm/mmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7e0d485

Please sign in to comment.