/* This must only be called for memory allocated or reserved via the boot memory allocator.  */
void platform_release_memory(void *ptr, int size)
/* This must only be called for memory allocated or reserved via the boot memory allocator.  */
void platform_release_memory(void *ptr, int size)
{
	unsigned long addr;
	unsigned long end;
	addr = ((unsigned long)ptr + (PAGE_SIZE - 1)) & PAGE_MASK;
	end = ((unsigned long)ptr + size) & PAGE_MASK;
	for (; addr < end; addr += PAGE_SIZE) {
		ClearPageReserved(virt_to_page(__va(addr)));
		init_page_count(virt_to_page(__va(addr)));
		free_page((unsigned long)__va(addr));
	}
}