Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 48488
b: refs/heads/master
c: 126b192
h: refs/heads/master
v: v3
  • Loading branch information
Andi Kleen authored and Andi Kleen committed Feb 13, 2007
1 parent ff0d9c5 commit 9684835
Show file tree
Hide file tree
Showing 3 changed files with 4 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: 22c5ace7290b792faf64ffe90cf933950fbf52db
refs/heads/master: 126b1922367fbe5513daa675a2abd13ed3917f4e
4 changes: 3 additions & 1 deletion trunk/arch/x86_64/mm/pageattr.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,14 +107,16 @@ static void revert_page(unsigned long address, pgprot_t ref_prot)
pud_t *pud;
pmd_t *pmd;
pte_t large_pte;
unsigned long pfn;

pgd = pgd_offset_k(address);
BUG_ON(pgd_none(*pgd));
pud = pud_offset(pgd,address);
BUG_ON(pud_none(*pud));
pmd = pmd_offset(pud, address);
BUG_ON(pmd_val(*pmd) & _PAGE_PSE);
large_pte = mk_pte_phys(__pa(address) & LARGE_PAGE_MASK, ref_prot);
pfn = (__pa(address) & LARGE_PAGE_MASK) >> PAGE_SHIFT;
large_pte = pfn_pte(pfn, ref_prot);
large_pte = pte_mkhuge(large_pte);
set_pte((pte_t *)pmd, large_pte);
}
Expand Down
9 changes: 0 additions & 9 deletions trunk/include/asm-x86_64/pgtable.h
Original file line number Diff line number Diff line change
Expand Up @@ -359,15 +359,6 @@ static inline int pmd_large(pmd_t pte) {
#define mk_pte(page, pgprot) pfn_pte(page_to_pfn(page), (pgprot))
#define mk_pte_huge(entry) (pte_val(entry) |= _PAGE_PRESENT | _PAGE_PSE)

/* physical address -> PTE */
static inline pte_t mk_pte_phys(unsigned long physpage, pgprot_t pgprot)
{
pte_t pte;
pte_val(pte) = physpage | pgprot_val(pgprot);
pte_val(pte) &= __supported_pte_mask;
return pte;
}

/* Change flags of a PTE */
static inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
{
Expand Down

0 comments on commit 9684835

Please sign in to comment.