{
phys_addr_t addr;
- if (h->heap_pgalloc && h->pgalloc.contig) {
- addr = page_to_phys(h->pgalloc.pages[0]);
- } else if (h->heap_pgalloc) {
+ if (h->heap_pgalloc) {
BUG_ON(!h->attachment->priv);
addr = sg_dma_address(
((struct sg_table *)h->attachment->priv)->sgl);
rb_erase(&ref->node, &client->handle_refs);
client->handle_count--;
- if (h->alloc && h->heap_pgalloc && !h->pgalloc.contig)
- atomic_sub_return(h->size, &client->iovm_commit);
+ if (h->alloc && h->heap_pgalloc)
+ atomic_sub(h->size, &client->iovm_commit);
if (h->alloc && !h->heap_pgalloc) {
mutex_lock(&h->lock);
nvmap_heap_to_arg(nvmap_block_to_heap(h->carveout)),
h->size);
mutex_unlock(&h->lock);
- } else if (!h->pgalloc.contig) {
+ } else {
atomic_add(h->size, &client->iovm_commit);
}
mutex_lock(&h->lock);
*result = h->carveout->base;
mutex_unlock(&h->lock);
- } else if (h->pgalloc.contig)
- *result = page_to_phys(h->pgalloc.pages[0]);
- else if (h->attachment->priv)
+ } else if (h->attachment->priv)
*result = sg_dma_address(
((struct sg_table *)h->attachment->priv)->sgl);
else
unsigned long addr;
h = refs[i];
- if (h->heap_pgalloc && h->pgalloc.contig)
- addr = page_to_phys(h->pgalloc.pages[0]);
- else if (h->heap_pgalloc)
+ if (h->heap_pgalloc)
addr = sg_dma_address(
((struct sg_table *)h->attachment->priv)->sgl);
else