Commit 7c7e6e07 authored by Jeremy Fitzhardinge's avatar Jeremy Fitzhardinge Committed by Ingo Molnar

x86: unify __set_fixmap

In both cases, I went with the 32-bit behaviour.
Signed-off-by: default avatarJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 944256e0
...@@ -213,18 +213,6 @@ void __init cleanup_highmap(void) ...@@ -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 __initdata table_start;
static unsigned long __meminitdata table_end; static unsigned long __meminitdata table_end;
......
...@@ -274,3 +274,17 @@ int ptep_clear_flush_young(struct vm_area_struct *vma, ...@@ -274,3 +274,17 @@ int ptep_clear_flush_young(struct vm_area_struct *vma,
return young; 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++;
}
...@@ -145,18 +145,6 @@ static int fixmaps; ...@@ -145,18 +145,6 @@ static int fixmaps;
unsigned long __FIXADDR_TOP = 0xfffff000; unsigned long __FIXADDR_TOP = 0xfffff000;
EXPORT_SYMBOL(__FIXADDR_TOP); 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_top_address - reserves a hole in the top of kernel address space
* @reserve - size of hole to reserve * @reserve - size of hole to reserve
...@@ -166,7 +154,7 @@ void __set_fixmap (enum fixed_addresses idx, unsigned long phys, pgprot_t flags) ...@@ -166,7 +154,7 @@ void __set_fixmap (enum fixed_addresses idx, unsigned long phys, pgprot_t flags)
*/ */
void reserve_top_address(unsigned long reserve) 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", printk(KERN_INFO "Reserving virtual address space above 0x%08x\n",
(int)-reserve); (int)-reserve);
__FIXADDR_TOP = -reserve - PAGE_SIZE; __FIXADDR_TOP = -reserve - PAGE_SIZE;
......
...@@ -7,6 +7,8 @@ ...@@ -7,6 +7,8 @@
# include "fixmap_64.h" # include "fixmap_64.h"
#endif #endif
extern int fixmaps_set;
extern void __set_fixmap(enum fixed_addresses idx, extern void __set_fixmap(enum fixed_addresses idx,
unsigned long phys, pgprot_t flags); unsigned long phys, pgprot_t flags);
#define set_fixmap(idx, phys) \ #define set_fixmap(idx, phys) \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment