/* Find a free memory region large enough for storing the bootmem bitmap.  */
static unsigned long __init find_bootmap_pfn(const struct resource *mem)
/* Find a free memory region large enough for storing the bootmem bitmap.  */
static unsigned long __init find_bootmap_pfn(const struct resource *mem)
{
	unsigned long bootmap_pages, bootmap_len;
	unsigned long node_pages = PFN_UP(mem->end - mem->start + 1);
	unsigned long bootmap_start;
	bootmap_pages = bootmem_bootmap_pages(node_pages);
	bootmap_len = bootmap_pages << PAGE_SHIFT;
	bootmap_start = find_free_region(mem, bootmap_len, PAGE_SIZE);
	return bootmap_start >> PAGE_SHIFT;
}