x86: move reservetop and vmalloc parsing to pgtable_32.c
also change reserve_top_address to __init attibute Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
parent
90d967e0ef
commit
bef1568d97
@ -184,39 +184,6 @@ static inline void copy_edd(void)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
|
||||||
* vmalloc=size forces the vmalloc area to be exactly 'size'
|
|
||||||
* bytes. This can be used to increase (or decrease) the
|
|
||||||
* vmalloc area - the default is 128m.
|
|
||||||
*/
|
|
||||||
static int __init parse_vmalloc(char *arg)
|
|
||||||
{
|
|
||||||
if (!arg)
|
|
||||||
return -EINVAL;
|
|
||||||
|
|
||||||
__VMALLOC_RESERVE = memparse(arg, &arg);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
early_param("vmalloc", parse_vmalloc);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* reservetop=size reserves a hole at the top of the kernel address space which
|
|
||||||
* a hypervisor can load into later. Needed for dynamically loaded hypervisors,
|
|
||||||
* so relocating the fixmap can be done before paging initialization.
|
|
||||||
*/
|
|
||||||
static int __init parse_reservetop(char *arg)
|
|
||||||
{
|
|
||||||
unsigned long address;
|
|
||||||
|
|
||||||
if (!arg)
|
|
||||||
return -EINVAL;
|
|
||||||
|
|
||||||
address = memparse(arg, &arg);
|
|
||||||
reserve_top_address(address);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
early_param("reservetop", parse_reservetop);
|
|
||||||
|
|
||||||
#ifdef CONFIG_BLK_DEV_INITRD
|
#ifdef CONFIG_BLK_DEV_INITRD
|
||||||
|
|
||||||
static bool do_relocate_initrd = false;
|
static bool do_relocate_initrd = false;
|
||||||
|
@ -152,7 +152,7 @@ EXPORT_SYMBOL(__FIXADDR_TOP);
|
|||||||
* Can be used to relocate the fixmap area and poke a hole in the top
|
* 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.
|
* of kernel address space to make room for a hypervisor.
|
||||||
*/
|
*/
|
||||||
void reserve_top_address(unsigned long reserve)
|
void __init reserve_top_address(unsigned long reserve)
|
||||||
{
|
{
|
||||||
BUG_ON(fixmaps_set > 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",
|
||||||
@ -160,3 +160,36 @@ void reserve_top_address(unsigned long reserve)
|
|||||||
__FIXADDR_TOP = -reserve - PAGE_SIZE;
|
__FIXADDR_TOP = -reserve - PAGE_SIZE;
|
||||||
__VMALLOC_RESERVE += reserve;
|
__VMALLOC_RESERVE += reserve;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* vmalloc=size forces the vmalloc area to be exactly 'size'
|
||||||
|
* bytes. This can be used to increase (or decrease) the
|
||||||
|
* vmalloc area - the default is 128m.
|
||||||
|
*/
|
||||||
|
static int __init parse_vmalloc(char *arg)
|
||||||
|
{
|
||||||
|
if (!arg)
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
|
__VMALLOC_RESERVE = memparse(arg, &arg);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
early_param("vmalloc", parse_vmalloc);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* reservetop=size reserves a hole at the top of the kernel address space which
|
||||||
|
* a hypervisor can load into later. Needed for dynamically loaded hypervisors,
|
||||||
|
* so relocating the fixmap can be done before paging initialization.
|
||||||
|
*/
|
||||||
|
static int __init parse_reservetop(char *arg)
|
||||||
|
{
|
||||||
|
unsigned long address;
|
||||||
|
|
||||||
|
if (!arg)
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
|
address = memparse(arg, &arg);
|
||||||
|
reserve_top_address(address);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
early_param("reservetop", parse_reservetop);
|
||||||
|
Loading…
Reference in New Issue
Block a user