]> git.baikalelectronics.ru Git - kernel.git/commit
Blackfin: fix framebuffer mmap bug for nommu
authorThomas Chou <thomas@wytron.com.tw>
Sun, 27 Sep 2009 07:38:01 +0000 (15:38 +0800)
committerMike Frysinger <vapier@gentoo.org>
Thu, 8 Oct 2009 04:58:15 +0000 (00:58 -0400)
commitc48dff0cea2d924d7a526f78ac7288975a3c7f0b
tree10a6c46f29a6378aadadf143697efcb1e6b55078
parent52c9bfb54c5a74691e4afb7985c23df0c55680c4
Blackfin: fix framebuffer mmap bug for nommu

The patch added a special get_unmapped_area for framebuffer which
was hooked to the file ops in drivers/video/fbmem.c.

This is needed since v2.6.29-rc1 where nommu vma management was
updated, and mmap of framebuffer caused kernel BUG panic. You may turn
on "Debug the global anon/private NOMMU mapping region tree" config to
such message.

As Documentation/nommu-mmap.txt said,
"To provide shareable character device support, a driver must provide
a file->f_op->get_unmapped_area() operation. The mmap() routines will
call this to get a proposed address for the mapping."

With this change, user space should call mmap for framebuffer using
shared map. Or it can try shared map first, then private map if
failed. This shared map usage is now consistent between mmu and nommu.

The sys_ file may not be a good place for this patch. But there is a
similar one for sparc. I tested a similar patch on nios2nommu, though
I don't have a blackfin board to test.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
arch/blackfin/include/asm/pgtable.h
arch/blackfin/kernel/sys_bfin.c