diff options
author | Jeremy Fitzhardinge <jeremy@goop.org> | 2008-01-30 07:32:57 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-01-30 07:32:57 -0500 |
commit | 6fdc05d4794056e0b98901646c4b68c60a01d5eb (patch) | |
tree | a6cfb308becd6fe47c549084b29c3e9db3a07f68 /include/asm-x86/pgtable-3level.h | |
parent | c3bcfb57e1e64b9b2f8b2d90564826637e21c5ea (diff) |
x86: unify pgtable accessors which use
Make users of supported_pte_mask common. This has the side-effect of
introducing the variable for 32-bit non-PAE, but I think its a pretty
small cost to simplify the code.
Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include/asm-x86/pgtable-3level.h')
-rw-r--r-- | include/asm-x86/pgtable-3level.h | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/include/asm-x86/pgtable-3level.h b/include/asm-x86/pgtable-3level.h index 9816346f7df6..61a7d0029f60 100644 --- a/include/asm-x86/pgtable-3level.h +++ b/include/asm-x86/pgtable-3level.h | |||
@@ -158,20 +158,6 @@ static inline unsigned long pte_pfn(pte_t pte) | |||
158 | return (pte_val(pte) & ~_PAGE_NX) >> PAGE_SHIFT; | 158 | return (pte_val(pte) & ~_PAGE_NX) >> PAGE_SHIFT; |
159 | } | 159 | } |
160 | 160 | ||
161 | extern unsigned long long __supported_pte_mask; | ||
162 | |||
163 | static inline pte_t pfn_pte(unsigned long page_nr, pgprot_t pgprot) | ||
164 | { | ||
165 | return __pte((((unsigned long long)page_nr << PAGE_SHIFT) | | ||
166 | pgprot_val(pgprot)) & __supported_pte_mask); | ||
167 | } | ||
168 | |||
169 | static inline pmd_t pfn_pmd(unsigned long page_nr, pgprot_t pgprot) | ||
170 | { | ||
171 | return __pmd((((unsigned long long)page_nr << PAGE_SHIFT) | | ||
172 | pgprot_val(pgprot)) & __supported_pte_mask); | ||
173 | } | ||
174 | |||
175 | /* | 161 | /* |
176 | * Bits 0, 6 and 7 are taken in the low part of the pte, | 162 | * Bits 0, 6 and 7 are taken in the low part of the pte, |
177 | * put the 32 bits of offset into the high part. | 163 | * put the 32 bits of offset into the high part. |