]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commit
mm/arch: use __free_reserved_page() to simplify the code
authorXishi Qiu <qiuxishi@huawei.com>
Tue, 12 Nov 2013 23:07:13 +0000 (15:07 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 13 Nov 2013 03:09:03 +0000 (12:09 +0900)
commitc1ce4b375fa7b76d8b553d4f8d6cc5a09f063691
tree50ed8b8cdfbbd6ae59c99f9650a24192be3aa34b
parent9e4be4708e9e88da46ae1f0bb1054c3619cc476e
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>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/metag/kernel/dma.c
arch/microblaze/mm/consistent.c
arch/powerpc/mm/dma-noncoherent.c