diff options
author | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2008-02-05 01:29:16 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-05 12:44:18 -0500 |
commit | 08e7d9b557299ba6ce57165ce8df310780bd681c (patch) | |
tree | 8733b402eaa1de1a6bcdea5ee72ea8655c896dd4 /mm/mmap.c | |
parent | 5e5419734c8719cbc01af959ad9c0844002c0df5 (diff) |
arch_rebalance_pgtables call
In order to change the layout of the page tables after an mmap has crossed the
adress space limit of the current page table layout a architecture hook in
get_unmapped_area is needed. The arguments are the address of the new mapping
and the length of it.
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: <linux-arch@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/mmap.c')
-rw-r--r-- | mm/mmap.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -36,6 +36,10 @@ | |||
36 | #define arch_mmap_check(addr, len, flags) (0) | 36 | #define arch_mmap_check(addr, len, flags) (0) |
37 | #endif | 37 | #endif |
38 | 38 | ||
39 | #ifndef arch_rebalance_pgtables | ||
40 | #define arch_rebalance_pgtables(addr, len) (addr) | ||
41 | #endif | ||
42 | |||
39 | static void unmap_region(struct mm_struct *mm, | 43 | static void unmap_region(struct mm_struct *mm, |
40 | struct vm_area_struct *vma, struct vm_area_struct *prev, | 44 | struct vm_area_struct *vma, struct vm_area_struct *prev, |
41 | unsigned long start, unsigned long end); | 45 | unsigned long start, unsigned long end); |
@@ -1424,7 +1428,7 @@ get_unmapped_area(struct file *file, unsigned long addr, unsigned long len, | |||
1424 | if (addr & ~PAGE_MASK) | 1428 | if (addr & ~PAGE_MASK) |
1425 | return -EINVAL; | 1429 | return -EINVAL; |
1426 | 1430 | ||
1427 | return addr; | 1431 | return arch_rebalance_pgtables(addr, len); |
1428 | } | 1432 | } |
1429 | 1433 | ||
1430 | EXPORT_SYMBOL(get_unmapped_area); | 1434 | EXPORT_SYMBOL(get_unmapped_area); |