~ubuntu-branches/ubuntu/lucid/linux-rt/lucid

« back to all changes in this revision

Viewing changes to arch/s390/mm/mmap.c

  • Committer: Bazaar Package Importer
  • Author(s): Luke Yelavich
  • Date: 2009-08-05 23:00:52 UTC
  • Revision ID: james.westby@ubuntu.com-20090805230052-7xedvqcyk9dnnxb2
Tags: 2.6.31-1.1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
#include <linux/mm.h>
29
29
#include <linux/module.h>
30
30
#include <asm/pgalloc.h>
 
31
#include <asm/compat.h>
31
32
 
32
33
/*
33
34
 * Top of mmap area (just below the process stack).
55
56
        /*
56
57
         * Force standard allocation for 64 bit programs.
57
58
         */
58
 
        if (!test_thread_flag(TIF_31BIT))
 
59
        if (!is_compat_task())
59
60
                return 1;
60
61
#endif
61
62
        return sysctl_legacy_va_layout ||
91
92
 
92
93
int s390_mmap_check(unsigned long addr, unsigned long len)
93
94
{
94
 
        if (!test_thread_flag(TIF_31BIT) &&
 
95
        if (!is_compat_task() &&
95
96
            len >= TASK_SIZE && TASK_SIZE < (1UL << 53))
96
97
                return crst_table_upgrade(current->mm, 1UL << 53);
97
98
        return 0;
108
109
        area = arch_get_unmapped_area(filp, addr, len, pgoff, flags);
109
110
        if (!(area & ~PAGE_MASK))
110
111
                return area;
111
 
        if (area == -ENOMEM &&
112
 
            !test_thread_flag(TIF_31BIT) && TASK_SIZE < (1UL << 53)) {
 
112
        if (area == -ENOMEM && !is_compat_task() && TASK_SIZE < (1UL << 53)) {
113
113
                /* Upgrade the page table to 4 levels and retry. */
114
114
                rc = crst_table_upgrade(mm, 1UL << 53);
115
115
                if (rc)
131
131
        area = arch_get_unmapped_area_topdown(filp, addr, len, pgoff, flags);
132
132
        if (!(area & ~PAGE_MASK))
133
133
                return area;
134
 
        if (area == -ENOMEM &&
135
 
            !test_thread_flag(TIF_31BIT) && TASK_SIZE < (1UL << 53)) {
 
134
        if (area == -ENOMEM && !is_compat_task() && TASK_SIZE < (1UL << 53)) {
136
135
                /* Upgrade the page table to 4 levels and retry. */
137
136
                rc = crst_table_upgrade(mm, 1UL << 53);
138
137
                if (rc)