Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 317751
b: refs/heads/master
c: a454ad1
h: refs/heads/master
i:
  317749: 78aaca6
  317747: b7864ae
  317743: f1d8e08
v: v3
  • Loading branch information
Omar Ramirez Luna authored and Greg Kroah-Hartman committed Jul 6, 2012
1 parent 28d1f69 commit 5965d01
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 11 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: 0e7e10fe49213ba4e9dc8a74615b81dd8a57ba2a
refs/heads/master: a454ad15e015526ca84f15460bf8a56fccfffeea
27 changes: 17 additions & 10 deletions trunk/drivers/staging/tidspbridge/core/tiomap3430.c
Original file line number Diff line number Diff line change
Expand Up @@ -1547,20 +1547,27 @@ static int bridge_brd_mem_un_map(struct bridge_dev_context *dev_ctxt,
static u32 user_va2_pa(struct mm_struct *mm, u32 address)
{
pgd_t *pgd;
pud_t *pud;
pmd_t *pmd;
pte_t *ptep, pte;

pgd = pgd_offset(mm, address);
if (!(pgd_none(*pgd) || pgd_bad(*pgd))) {
pmd = pmd_offset(pgd, address);
if (!(pmd_none(*pmd) || pmd_bad(*pmd))) {
ptep = pte_offset_map(pmd, address);
if (ptep) {
pte = *ptep;
if (pte_present(pte))
return pte & PAGE_MASK;
}
}
if (pgd_none(*pgd) || pgd_bad(*pgd))
return 0;

pud = pud_offset(pgd, address);
if (pud_none(*pud) || pud_bad(*pud))
return 0;

pmd = pmd_offset(pud, address);
if (pmd_none(*pmd) || pmd_bad(*pmd))
return 0;

ptep = pte_offset_map(pmd, address);
if (ptep) {
pte = *ptep;
if (pte_present(pte))
return pte & PAGE_MASK;
}

return 0;
Expand Down

0 comments on commit 5965d01

Please sign in to comment.