diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-07-08 06:24:29 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-07-08 06:24:29 -0400 |
commit | 6236af82d8a989e150a02800c210eb61cb1e17be (patch) | |
tree | d5e83e66b09fc405ac70925f9b83152abaf48a03 /arch/x86/mm/pgtable.c | |
parent | e3ae0acf59244ecf5b023ec99cef4b6b29d649bc (diff) | |
parent | 8b7ef4ec5b1ac8b6feebf5ae9cda85a7514728f8 (diff) |
Merge branch 'x86/fixmap' into x86/devel
Conflicts:
arch/x86/mm/init_64.c
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/mm/pgtable.c')
-rw-r--r-- | arch/x86/mm/pgtable.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/arch/x86/mm/pgtable.c b/arch/x86/mm/pgtable.c index ee1d6d39edd4..45b99ac39480 100644 --- a/arch/x86/mm/pgtable.c +++ b/arch/x86/mm/pgtable.c | |||
@@ -2,6 +2,7 @@ | |||
2 | #include <asm/pgalloc.h> | 2 | #include <asm/pgalloc.h> |
3 | #include <asm/pgtable.h> | 3 | #include <asm/pgtable.h> |
4 | #include <asm/tlb.h> | 4 | #include <asm/tlb.h> |
5 | #include <asm/fixmap.h> | ||
5 | 6 | ||
6 | pte_t *pte_alloc_one_kernel(struct mm_struct *mm, unsigned long address) | 7 | pte_t *pte_alloc_one_kernel(struct mm_struct *mm, unsigned long address) |
7 | { | 8 | { |
@@ -274,3 +275,22 @@ int ptep_clear_flush_young(struct vm_area_struct *vma, | |||
274 | 275 | ||
275 | return young; | 276 | return young; |
276 | } | 277 | } |
278 | |||
279 | int fixmaps_set; | ||
280 | |||
281 | void __native_set_fixmap(enum fixed_addresses idx, pte_t pte) | ||
282 | { | ||
283 | unsigned long address = __fix_to_virt(idx); | ||
284 | |||
285 | if (idx >= __end_of_fixed_addresses) { | ||
286 | BUG(); | ||
287 | return; | ||
288 | } | ||
289 | set_pte_vaddr(address, pte); | ||
290 | fixmaps_set++; | ||
291 | } | ||
292 | |||
293 | void native_set_fixmap(enum fixed_addresses idx, unsigned long phys, pgprot_t flags) | ||
294 | { | ||
295 | __native_set_fixmap(idx, pfn_pte(phys >> PAGE_SHIFT, flags)); | ||
296 | } | ||