Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 137019
b: refs/heads/master
c: fd862dd
h: refs/heads/master
i:
  137017: 505047f
  137015: 0edbb79
v: v3
  • Loading branch information
Gustavo F. Padovan authored and H. Peter Anvin committed Feb 28, 2009
1 parent 8f2cdee commit 8030fad
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 17 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ab93e3c45dbac66c2e8e24fd560c052a3907903e
refs/heads/master: fd862dde18c3e360f510780e1d1bf615866b11c2
2 changes: 2 additions & 0 deletions trunk/arch/x86/include/asm/fixmap_64.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ enum fixed_addresses {
__end_of_fixed_addresses
};

extern void reserve_top_address(unsigned long reserve);

#define FIXADDR_TOP (VSYSCALL_END-PAGE_SIZE)

#define FIXADDR_SIZE (__end_of_permanent_fixed_addresses << PAGE_SHIFT)
Expand Down
18 changes: 18 additions & 0 deletions trunk/arch/x86/mm/pgtable.c
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,24 @@ int ptep_clear_flush_young(struct vm_area_struct *vma,
return young;
}

/**
* reserve_top_address - reserves a hole in the top of kernel address space
* @reserve - size of hole to reserve
*
* Can be used to relocate the fixmap area and poke a hole in the top
* of kernel address space to make room for a hypervisor.
*/
void __init reserve_top_address(unsigned long reserve)
{
#ifdef CONFIG_X86_32
BUG_ON(fixmaps_set > 0);
printk(KERN_INFO "Reserving virtual address space above 0x%08x\n",
(int)-reserve);
__FIXADDR_TOP = -reserve - PAGE_SIZE;
__VMALLOC_RESERVE += reserve;
#endif
}

int fixmaps_set;

void __native_set_fixmap(enum fixed_addresses idx, pte_t pte)
Expand Down
16 changes: 0 additions & 16 deletions trunk/arch/x86/mm/pgtable_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,22 +97,6 @@ void set_pmd_pfn(unsigned long vaddr, unsigned long pfn, pgprot_t flags)
unsigned long __FIXADDR_TOP = 0xfffff000;
EXPORT_SYMBOL(__FIXADDR_TOP);

/**
* reserve_top_address - reserves a hole in the top of kernel address space
* @reserve - size of hole to reserve
*
* Can be used to relocate the fixmap area and poke a hole in the top
* of kernel address space to make room for a hypervisor.
*/
void __init reserve_top_address(unsigned long reserve)
{
BUG_ON(fixmaps_set > 0);
printk(KERN_INFO "Reserving virtual address space above 0x%08x\n",
(int)-reserve);
__FIXADDR_TOP = -reserve - PAGE_SIZE;
__VMALLOC_RESERVE += reserve;
}

/*
* vmalloc=size forces the vmalloc area to be exactly 'size'
* bytes. This can be used to increase (or decrease) the
Expand Down

0 comments on commit 8030fad

Please sign in to comment.