]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
x86: unify __set_fixmap
authorJeremy Fitzhardinge <jeremy@goop.org>
Tue, 17 Jun 2008 18:41:54 +0000 (11:41 -0700)
committerIngo Molnar <mingo@elte.hu>
Fri, 20 Jun 2008 13:09:51 +0000 (15:09 +0200)
In both cases, I went with the 32-bit behaviour.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/mm/init_64.c
arch/x86/mm/pgtable.c
arch/x86/mm/pgtable_32.c
include/asm-x86/fixmap.h

index 156e6d7b0e329cd84b06342dffd37e46ec28ac9a..e5f5319498573c6033ef93e4bb0617489a4480ed 100644 (file)
@@ -213,18 +213,6 @@ void __init cleanup_highmap(void)
        }
 }
 
-/* NOTE: this is meant to be run only at boot */
-void __set_fixmap(enum fixed_addresses idx, unsigned long phys, pgprot_t prot)
-{
-       unsigned long address = __fix_to_virt(idx);
-
-       if (idx >= __end_of_fixed_addresses) {
-               printk(KERN_ERR "Invalid __set_fixmap\n");
-               return;
-       }
-       set_pte_phys(address, phys, prot);
-}
-
 static unsigned long __initdata table_start;
 static unsigned long __meminitdata table_end;
 
index 50159764f694e91dc0b9a3884290d52233219953..3ebebe480b539d5c67f3a97e6ceca27f3800482d 100644 (file)
@@ -274,3 +274,17 @@ int ptep_clear_flush_young(struct vm_area_struct *vma,
 
        return young;
 }
+
+int fixmaps_set;
+
+void __set_fixmap (enum fixed_addresses idx, unsigned long phys, pgprot_t flags)
+{
+       unsigned long address = __fix_to_virt(idx);
+
+       if (idx >= __end_of_fixed_addresses) {
+               BUG();
+               return;
+       }
+       set_pte_pfn(address, phys >> PAGE_SHIFT, flags);
+       fixmaps_set++;
+}
index 369cf065b6a48f78f9870ddaf9f27e59b6980c0c..3f97c3c87288c3afee83609af3f80d8bd04f4e27 100644 (file)
@@ -145,18 +145,6 @@ static int fixmaps;
 unsigned long __FIXADDR_TOP = 0xfffff000;
 EXPORT_SYMBOL(__FIXADDR_TOP);
 
-void __set_fixmap (enum fixed_addresses idx, unsigned long phys, pgprot_t flags)
-{
-       unsigned long address = __fix_to_virt(idx);
-
-       if (idx >= __end_of_fixed_addresses) {
-               BUG();
-               return;
-       }
-       set_pte_pfn(address, phys >> PAGE_SHIFT, flags);
-       fixmaps++;
-}
-
 /**
  * reserve_top_address - reserves a hole in the top of kernel address space
  * @reserve - size of hole to reserve
@@ -166,7 +154,7 @@ void __set_fixmap (enum fixed_addresses idx, unsigned long phys, pgprot_t flags)
  */
 void reserve_top_address(unsigned long reserve)
 {
-       BUG_ON(fixmaps > 0);
+       BUG_ON(fixmaps_set > 0);
        printk(KERN_INFO "Reserving virtual address space above 0x%08x\n",
               (int)-reserve);
        __FIXADDR_TOP = -reserve - PAGE_SIZE;
index 01b0f98f9929c84f30015b8bc906e87eabc53543..934d6b49b530e74c4514bfe650e34c3a4eee5d53 100644 (file)
@@ -7,6 +7,8 @@
 # include "fixmap_64.h"
 #endif
 
+extern int fixmaps_set;
+
 extern void __set_fixmap(enum fixed_addresses idx,
                         unsigned long phys, pgprot_t flags);
 #define set_fixmap(idx, phys)                          \