sparc64: Use free_bootmem_late() in mdesc_lmb_free().

Signed-off-by: David S. Miller <davem@davemloft.net>

+6 -15
+6 -15
arch/sparc/kernel/mdesc.c
··· 10 10 #include <linux/slab.h> 11 11 #include <linux/mm.h> 12 12 #include <linux/miscdevice.h> 13 + #include <linux/bootmem.h> 13 14 14 15 #include <asm/cpudata.h> 15 16 #include <asm/hypervisor.h> ··· 109 108 110 109 static void mdesc_lmb_free(struct mdesc_handle *hp) 111 110 { 112 - unsigned int alloc_size, handle_size = hp->handle_size; 113 - unsigned long start, end; 111 + unsigned int alloc_size; 112 + unsigned long start; 114 113 115 114 BUG_ON(atomic_read(&hp->refcnt) != 0); 116 115 BUG_ON(!list_empty(&hp->list)); 117 116 118 - alloc_size = PAGE_ALIGN(handle_size); 119 - 120 - start = (unsigned long) hp; 121 - end = start + alloc_size; 122 - 123 - while (start < end) { 124 - struct page *p; 125 - 126 - p = virt_to_page(start); 127 - ClearPageReserved(p); 128 - __free_page(p); 129 - start += PAGE_SIZE; 130 - } 117 + alloc_size = PAGE_ALIGN(hp->handle_size); 118 + start = __pa(hp); 119 + free_bootmem_late(start, alloc_size); 131 120 } 132 121 133 122 static struct mdesc_mem_ops lmb_mdesc_ops = {