+ mm-arch-use-__free_reserved_page-to-simplify-the-code.patch added to -mm tree
Subsystems (2)
Subject: + mm-arch-use-__free_reserved_page-to-simplify-the-code.patch added to -mm tree
To: [email protected],[email protected],[email protected],[email protected],[email protected]
From: [email protected]
Date: Wed, 18 Sep 2013 14:06:16 -0700
The patch titled
Subject: mm/arch: use __free_reserved_page() to simplify the code
has been added to the -mm tree. Its filename is
mm-arch-use-__free_reserved_page-to-simplify-the-code.patch
This patch should soon appear at
http://ozlabs.org/~akpm/mmots/broken-out/mm-arch-use-__free_reserved_page-to-simplify-the-code.patch
and later at
http://ozlabs.org/~akpm/mmotm/broken-out/mm-arch-use-__free_reserved_page-to-simplify-the-code.patch
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/SubmitChecklist when testing your code ***
The -mm tree is included into linux-next and is updated there every 3-4 working days
------------------------------------------------------
From: Xishi Qiu <[email protected]>
Subject: 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()
---
arch/metag/kernel/dma.c | 4 +--- arch/microblaze/mm/consistent.c | 7 ++----- arch/powerpc/mm/dma-noncoherent.c | 4 +--- 3 files changed, 4 insertions(+), 11 deletions(-)
arch/metag/kernel/dma.c renamed from arch/metag/kernel/dma.c~mm-arch-use-__free_reserved_page-to-simplify-the-code +1 -3
@@ -305,9 +305,7 @@ void dma_free_coherent(struct device *deif (pfn_valid (pfn)) {struct page *page =pfn_to_page (pfn); -ClearPageReserved (page); - -__free_page (page); +__free_reserved_page (page);continue ; } }
arch/microblaze/mm/consistent.c renamed from arch/microblaze/mm/consistent.c~mm-arch-use-__free_reserved_page-to-simplify-the-code +2 -5
@@ -176,8 +176,7 @@ void consistent_free(size_t size, void * page =virt_to_page (vaddr);do { -ClearPageReserved (page); -__free_page (page); +__free_reserved_page (page); page++; }while (size -=PAGE_SIZE );#else
@@ -194,9 +193,7 @@ void consistent_free(size_t size, void *pte_clear (&init_mm, (unsigned int )vaddr, ptep);if (pfn_valid (pfn)) { page =pfn_to_page (pfn); - -ClearPageReserved (page); -__free_page (page); +__free_reserved_page (page); } } vaddr +=PAGE_SIZE ;
arch/powerpc/mm/dma-noncoherent.c renamed from arch/powerpc/mm/dma-noncoherent.c~mm-arch-use-__free_reserved_page-to-simplify-the-code +0 -0
@@ -287,9 +287,7 @@ void __dma_free_coherent(size_t size, vopte_clear (&init_mm, addr, ptep);if (pfn_valid (pfn)) {struct page *page =pfn_to_page (pfn);