The flush sequence is a marker that the page tables have been changed
and any affected TLBs need to be flushed. Move the flush_seq increment
a little further down the call stack to place it next to the actual
page table manipulation. Not functional change.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Tested-by: Guido Günther <agx@sigxcpu.org>
Acked-by: Guido Günther <agx@sigxcpu.org>
                da += bytes;
        }
 
+       context->flush_seq++;
+
        return 0;
 
 fail:
 
                da += bytes;
        }
+
+       context->flush_seq++;
 }
 
 static void etnaviv_iommu_remove_mapping(struct etnaviv_iommu_context *context,
 
        mapping->context = etnaviv_iommu_context_get(context);
        list_add_tail(&mapping->mmu_node, &context->mappings);
-       context->flush_seq++;
 unlock:
        mutex_unlock(&context->lock);
 
                etnaviv_iommu_remove_mapping(context, mapping);
 
        list_del(&mapping->mmu_node);
-       context->flush_seq++;
        mutex_unlock(&context->lock);
        etnaviv_iommu_context_put(context);
 }