author | Thomas Chou
<thomas@wytron.com.tw> 2009-09-27 07:38:01 UTC |
committer | Mike Frysinger
<vapier@gentoo.org> 2009-10-08 04:58:15 UTC |
parent | 4a7bcb4fe96824f882d126dc39df9ba658a29372 |
arch/blackfin/include/asm/pgtable.h | +6 | -0 |
arch/blackfin/kernel/sys_bfin.c | +11 | -0 |
diff --git a/arch/blackfin/include/asm/pgtable.h b/arch/blackfin/include/asm/pgtable.h index b54cbddf547..821c699c223 100644 --- a/arch/blackfin/include/asm/pgtable.h +++ b/arch/blackfin/include/asm/pgtable.h @@ -98,6 +98,12 @@ extern unsigned int kobjsize(const void *objp); #define VMALLOC_START 0 #define VMALLOC_END 0xffffffff +/* provide a special get_unmapped_area for framebuffer mmaps of nommu */ +extern unsigned long get_fb_unmapped_area(struct file *filp, unsigned long, + unsigned long, unsigned long, + unsigned long); +#define HAVE_ARCH_FB_UNMAPPED_AREA + #include <asm-generic/pgtable.h> #endif /* _BLACKFIN_PGTABLE_H */ diff --git a/arch/blackfin/kernel/sys_bfin.c b/arch/blackfin/kernel/sys_bfin.c index 8b294a1c806..afcef129d4e 100644 --- a/arch/blackfin/kernel/sys_bfin.c +++ b/arch/blackfin/kernel/sys_bfin.c @@ -69,3 +69,14 @@ asmlinkage void *sys_dma_memcpy(void *dest, const void *src, size_t len) { return safe_dma_memcpy(dest, src, len); } + +#if defined(CONFIG_FB) || defined(CONFIG_FB_MODULE) +#include <linux/fb.h> +unsigned long get_fb_unmapped_area(struct file *filp, unsigned long orig_addr, + unsigned long len, unsigned long pgoff, unsigned long flags) +{ + struct fb_info *info = filp->private_data; + return (unsigned long)info->screen_base; +} +EXPORT_SYMBOL(get_fb_unmapped_area); +#endif