Skip to content

Commit

Permalink
x86/pgtable: unify pagetable accessors, #4
Browse files Browse the repository at this point in the history
add new ops to 32-bit.

based on:

 Subject: x86/pgtable: unify pagetable accessors
 From: Jeremy Fitzhardinge <jeremy@goop.org>

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
  • Loading branch information
Ingo Molnar committed Jan 30, 2008
1 parent 1444d2d commit 7d00a1a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions include/asm-x86/pgtable_32.h
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,14 @@ static inline pte_t pte_mkyoung(pte_t pte) { return __pte(pte_val(pte) | _PAGE_A
static inline pte_t pte_mkwrite(pte_t pte) { return __pte(pte_val(pte) | _PAGE_RW); }
static inline pte_t pte_mkhuge(pte_t pte) { return __pte(pte_val(pte) | _PAGE_PSE); }

static inline pte_t pte_clrhuge(pte_t pte) { return __pte(pte_val(pte) & ~_PAGE_PSE); }
static inline pte_t pte_mkexec(pte_t pte) { return __pte(pte_val(pte) & ~_PAGE_NX); }

static inline int pmd_large(pmd_t pte) {
return (pmd_val(pte) & (_PAGE_PSE|_PAGE_PRESENT)) ==
(_PAGE_PSE|_PAGE_PRESENT);
}

#ifdef CONFIG_X86_PAE
# include <asm/pgtable-3level.h>
#else
Expand Down

0 comments on commit 7d00a1a

Please sign in to comment.