get_unmapped_area handles MAP_FIXED on frv
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Sun, 6 May 2007 21:50:07 +0000 (14:50 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Mon, 7 May 2007 19:12:56 +0000 (12:12 -0700)
Handle MAP_FIXED in arch_get_unmapped_area on frv.  Trivial case, just return
the address.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/frv/mm/elf-fdpic.c

index 9477ccce070eb67a808fc7b31de1638f8a40339b..cac2c01a3a561d3545bdd58a52768e4445e75497 100644 (file)
@@ -64,6 +64,10 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr, unsi
        if (len > TASK_SIZE)
                return -ENOMEM;
 
+       /* handle MAP_FIXED */
+       if (flags & MAP_FIXED)
+               return addr;
+
        /* only honour a hint if we're not going to clobber something doing so */
        if (addr) {
                addr = PAGE_ALIGN(addr);