[PATCH 09/10] ARM: dma-mapping: get rid of setting/clearing the reserved page bit
Russell King - ARM Linux
linux at arm.linux.org.uk
Sat Nov 21 14:39:14 EST 2009
It's unnecessary; x86 doesn't do it, and ALSA doesn't require it
anymore.
Signed-off-by: Russell King <rmk+kernel at arm.linux.org.uk>
---
arch/arm/mm/dma-mapping.c | 22 +++-------------------
1 files changed, 3 insertions(+), 19 deletions(-)
diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c
index f3c0fc8..9807035 100644
--- a/arch/arm/mm/dma-mapping.c
+++ b/arch/arm/mm/dma-mapping.c
@@ -209,10 +209,6 @@ __dma_alloc_remap(struct page *page, size_t size, gfp_t gfp, pgprot_t prot)
do {
BUG_ON(!pte_none(*pte));
- /*
- * x86 does not mark the pages reserved...
- */
- SetPageReserved(page);
set_pte_ext(pte, mk_pte(page, prot), 0);
page++;
pte++;
@@ -267,21 +263,9 @@ static void __dma_free_remap(void *cpu_addr, size_t size)
ptep = consistent_pte[++idx];
}
- if (!pte_none(pte) && pte_present(pte)) {
- pfn = pte_pfn(pte);
-
- if (pfn_valid(pfn)) {
- struct page *page = pfn_to_page(pfn);
-
- /*
- * x86 does not mark the pages reserved...
- */
- ClearPageReserved(page);
- continue;
- }
- }
- printk(KERN_CRIT "%s: bad page in kernel page table\n",
- __func__);
+ if (pte_none(pte) || !pte_present(pte))
+ printk(KERN_CRIT "%s: bad page in kernel page table\n",
+ __func__);
} while (size -= PAGE_SIZE);
flush_tlb_kernel_range(c->vm_start, c->vm_end);
--
1.6.2.5
More information about the linux-arm-kernel
mailing list