static int ion_heap_clear_pages(struct page **pages, int num, pgprot_t pgprot) { void *addr = vm_map_ram(pages, num, -1, pgprot);
if (!addr) return -ENOMEM; memset(addr, 0, PAGE_SIZE * num); vm_unmap_ram(addr, num);
return 0; }