Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 230787
b: refs/heads/master
c: c489f12
h: refs/heads/master
i:
  230785: cb30b9d
  230783: 0bb77c6
v: v3
  • Loading branch information
Johannes Weiner authored and Linus Torvalds committed Jan 14, 2011
1 parent 7219c6b commit 21ecd75
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0ca1634d4143c3579273ca53b993df19f5c98e92
refs/heads/master: c489f1257b8cacd4881a18da1e93659f934a8e98
10 changes: 10 additions & 0 deletions trunk/arch/x86/include/asm/pgtable.h
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,16 @@ static inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
return __pte(val);
}

static inline pmd_t pmd_modify(pmd_t pmd, pgprot_t newprot)
{
pmdval_t val = pmd_val(pmd);

val &= _HPAGE_CHG_MASK;
val |= massage_pgprot(newprot) & ~_HPAGE_CHG_MASK;

return __pmd(val);
}

/* mprotect needs to preserve PAT bits when updating vm_page_prot */
#define pgprot_modify pgprot_modify
static inline pgprot_t pgprot_modify(pgprot_t oldprot, pgprot_t newprot)
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/x86/include/asm/pgtable_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
/* Set of bits not changed in pte_modify */
#define _PAGE_CHG_MASK (PTE_PFN_MASK | _PAGE_PCD | _PAGE_PWT | \
_PAGE_SPECIAL | _PAGE_ACCESSED | _PAGE_DIRTY)
#define _HPAGE_CHG_MASK (_PAGE_CHG_MASK | _PAGE_PSE)

#define _PAGE_CACHE_MASK (_PAGE_PCD | _PAGE_PWT)
#define _PAGE_CACHE_WB (0)
Expand Down

0 comments on commit 21ecd75

Please sign in to comment.