From: Benjamin Herrenschmidt Date: Sun, 6 May 2007 21:50:09 +0000 (-0700) Subject: get_unmapped_area handles MAP_FIXED on parisc X-Git-Tag: v2.6.22-rc1~932 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=869e5101728fe2f307f0a3c3cf599c184f81f0ee;p=linux-2.6-omap-h63xx.git get_unmapped_area handles MAP_FIXED on parisc Handle MAP_FIXED in parisc arch_get_unmapped_area(), just return the address. We might want to also check for possible cache aliasing issues now that we get called in that case (like ARM or MIPS), leave a comment for the maintainers to pick up. Signed-off-by: Benjamin Herrenschmidt Cc: Kyle McMartin Cc: Grant Grundler Cc: Matthew Wilcox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/arch/parisc/kernel/sys_parisc.c b/arch/parisc/kernel/sys_parisc.c index 512642d8f70..6fed0803c59 100644 --- a/arch/parisc/kernel/sys_parisc.c +++ b/arch/parisc/kernel/sys_parisc.c @@ -106,6 +106,11 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr, { if (len > TASK_SIZE) return -ENOMEM; + /* Might want to check for cache aliasing issues for MAP_FIXED case + * like ARM or MIPS ??? --BenH. + */ + if (flags & MAP_FIXED) + return addr; if (!addr) addr = TASK_UNMAPPED_BASE;