Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 172401
b: refs/heads/master
c: acaac25
h: refs/heads/master
i:
  172399: cb63625
v: v3
  • Loading branch information
Russell King committed Nov 24, 2009
1 parent f1aebfa commit c271fba
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 21 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 31ebf94435f74294523683867fe0b89000e61521
refs/heads/master: acaac256b3a14a09ab278409a72d119f2d75b02b
23 changes: 3 additions & 20 deletions trunk/arch/arm/mm/dma-mapping.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++;
Expand Down Expand Up @@ -257,7 +253,6 @@ static void __dma_free_remap(void *cpu_addr, size_t size)
addr = c->vm_start;
do {
pte_t pte = ptep_get_and_clear(&init_mm, addr, ptep);
unsigned long pfn;

ptep++;
addr += PAGE_SIZE;
Expand All @@ -267,21 +262,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);
Expand Down

0 comments on commit c271fba

Please sign in to comment.