]> git.baikalelectronics.ru Git - kernel.git/commit
dma-coherent: per-device coherent area is in pages, not bytes.
authorAdrian McMenamin <adrian@mcmen.demon.co.uk>
Wed, 21 Jan 2009 09:47:38 +0000 (18:47 +0900)
committerPaul Mundt <lethal@linux-sh.org>
Wed, 21 Jan 2009 09:47:38 +0000 (18:47 +0900)
commit5c7d9eda905082fbf0fb08c1373644f2737ec430
tree86226edbbe82c3f3ddca7e1ad929037e2f0ea6ad
parentffdbc18c517239960800ea5e7a8cacd0b64b41d9
dma-coherent: per-device coherent area is in pages, not bytes.

Commit de8eaf49781b3727fa18a6e35a0f3cb49fba3c94 ("dma-coherent: catch
oversized requests to dma_alloc_from_coherent()") attempted to add a
sanity check to bail out on allocations larger than the coherent area.

Unfortunately when this was implemented, the fact the coherent area
is tracked in pages rather than bytes was overlooked, which subsequently
broke every single dma_alloc_from_coherent() user, forcing the allocation
silently through generic memory instead.

Signed-off-by: Adrian McMenamin <adrian@mcmen.demon.co.uk >
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
kernel/dma-coherent.c