]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/x86/mm/pgtable.c
Merge branch 'x86/fixmap' into x86/devel
[linux-2.6-omap-h63xx.git] / arch / x86 / mm / pgtable.c
index ee1d6d39edd4343e52300a1691049c3976402eb6..45b99ac394802cd28ed9c7014ca8a392a4d5a943 100644 (file)
@@ -2,6 +2,7 @@
 #include <asm/pgalloc.h>
 #include <asm/pgtable.h>
 #include <asm/tlb.h>
+#include <asm/fixmap.h>
 
 pte_t *pte_alloc_one_kernel(struct mm_struct *mm, unsigned long address)
 {
@@ -274,3 +275,22 @@ int ptep_clear_flush_young(struct vm_area_struct *vma,
 
        return young;
 }
+
+int fixmaps_set;
+
+void __native_set_fixmap(enum fixed_addresses idx, pte_t pte)
+{
+       unsigned long address = __fix_to_virt(idx);
+
+       if (idx >= __end_of_fixed_addresses) {
+               BUG();
+               return;
+       }
+       set_pte_vaddr(address, pte);
+       fixmaps_set++;
+}
+
+void native_set_fixmap(enum fixed_addresses idx, unsigned long phys, pgprot_t flags)
+{
+       __native_set_fixmap(idx, pfn_pte(phys >> PAGE_SHIFT, flags));
+}