]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mm/arch: use __free_reserved_page() to simplify the code
authorXishi Qiu <qiuxishi@huawei.com>
Tue, 5 Nov 2013 05:55:24 +0000 (16:55 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 5 Nov 2013 05:55:24 +0000 (16:55 +1100)
commitc7e34efa549dff3c250b51b605196190596666d1
tree0285adb7efaa7509f2b945735c164644d9d7b35e
parent855a9e16fbbcdd5e3c1f7b211c17defbc5890c56
mm/arch: use __free_reserved_page() to simplify the code

Use __free_reserved_page() to simplify the code in arch.

It used split_page() in consistent_alloc()/__dma_alloc_coherent()/dma_alloc_coherent(),
so page->_count == 1, and we can free it safely.

__free_reserved_page()
ClearPageReserved()
init_page_count()  // it won't change the value
__free_page()

Signed-off-by: Xishi Qiu <qiuxishi@huawei.com>
Cc: James Hogan <james.hogan@imgtec.com>
Cc: Michal Simek <monstr@monstr.eu>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
arch/metag/kernel/dma.c
arch/microblaze/mm/consistent.c
arch/powerpc/mm/dma-noncoherent.c