mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
Remove unused function reserve_boot_memory() and alloc_boot_low_page().
Signed-off-by: Keir Fraser <keir@xensource.com>
This commit is contained in:
1 parent
c3d1e4b95d
commit
4f5db4762c
3 files changed
+1
-43
No files matched your search
@@ -64,8 +64,7 @@ void *alloc_xen_pagetable(void)
|
||||
return page_to_virt(pg);
|
||||
}
|
||||
|
||||
/* Early pagetables must come from low 1GB of memory. */
|
||||
mfn = alloc_boot_low_pages(1, 1); /* 0x0 - 0x40000000 */
|
||||
mfn = alloc_boot_pages(1, 1);
|
||||
BUG_ON(mfn == 0);
|
||||
return mfn_to_virt(mfn);
|
||||
}
|
||||
|
||||
@@ -249,44 +249,6 @@ void __init init_boot_pages(paddr_t ps, paddr_t pe)
|
||||
}
|
||||
}
|
||||
|
||||
int __init reserve_boot_pages(unsigned long first_pfn, unsigned long nr_pfns)
|
||||
{
|
||||
unsigned long i;
|
||||
|
||||
for ( i = 0; i < nr_pfns; i++ )
|
||||
if ( allocated_in_map(first_pfn + i) )
|
||||
break;
|
||||
|
||||
if ( i != nr_pfns )
|
||||
return 0;
|
||||
|
||||
map_alloc(first_pfn, nr_pfns);
|
||||
return 1;
|
||||
}
|
||||
|
||||
unsigned long __init alloc_boot_low_pages(
|
||||
unsigned long nr_pfns, unsigned long pfn_align)
|
||||
{
|
||||
unsigned long pg, i;
|
||||
|
||||
/* Search forwards to obtain lowest available range. */
|
||||
for ( pg = first_valid_mfn & ~(pfn_align - 1);
|
||||
(pg + nr_pfns) <= max_page;
|
||||
pg = (pg + i + pfn_align) & ~(pfn_align - 1) )
|
||||
{
|
||||
for ( i = 0; i < nr_pfns; i++ )
|
||||
if ( allocated_in_map(pg+i) )
|
||||
break;
|
||||
if ( i == nr_pfns )
|
||||
{
|
||||
map_alloc(pg, nr_pfns);
|
||||
return pg;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
unsigned long __init alloc_boot_pages(
|
||||
unsigned long nr_pfns, unsigned long pfn_align)
|
||||
{
|
||||
|
||||
@@ -41,9 +41,6 @@ paddr_t init_boot_allocator(paddr_t bitmap_start);
|
||||
void init_boot_pages(paddr_t ps, paddr_t pe);
|
||||
unsigned long alloc_boot_pages(
|
||||
unsigned long nr_pfns, unsigned long pfn_align);
|
||||
unsigned long alloc_boot_low_pages(
|
||||
unsigned long nr_pfns, unsigned long pfn_align);
|
||||
int reserve_boot_pages(unsigned long first_pfn, unsigned long nr_pfns);
|
||||
void end_boot_allocator(void);
|
||||
|
||||
/* Xen suballocator. These functions are interrupt-safe. */
|
||||
|
||||