Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 80478
b: refs/heads/master
c: a5f5503
h: refs/heads/master
v: v3
  • Loading branch information
Ingo Molnar committed Jan 30, 2008
1 parent ce17dd9 commit 045eb8c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 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: bbb09f5cfcde7e4cf1466111d671ac4a62931148
refs/heads/master: a5f55035f63cf040b4a7161226ec35520cc10daa
11 changes: 3 additions & 8 deletions trunk/arch/x86/mm/pageattr_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,26 +19,21 @@ pte_t *lookup_address(unsigned long address, int *level)
pgd_t *pgd = pgd_offset_k(address);
pud_t *pud;
pmd_t *pmd;
pte_t *pte;

if (pgd_none(*pgd))
return NULL;
pud = pud_offset(pgd, address);
if (!pud_present(*pud))
if (pud_none(*pud))
return NULL;
pmd = pmd_offset(pud, address);
if (!pmd_present(*pmd))
if (pmd_none(*pmd))
return NULL;
*level = 3;
if (pmd_large(*pmd))
return (pte_t *)pmd;
*level = 4;

pte = pte_offset_kernel(pmd, address);
if (pte && !pte_present(*pte))
pte = NULL;

return pte;
return pte_offset_kernel(pmd, address);
}

static struct page *
Expand Down

0 comments on commit 045eb8c

Please sign in to comment.