From: kfx Date: Fri, 9 Mar 2012 01:11:20 +0000 (+0800) Subject: ion: invalide cache, L1 first X-Git-Tag: firefly_0821_release~9604 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=aa2d99e76ecc618bb0c05d64bda77790703fa0c4;p=firefly-linux-kernel-4.4.55.git ion: invalide cache, L1 first --- diff --git a/drivers/gpu/ion/ion_carveout_heap.c b/drivers/gpu/ion/ion_carveout_heap.c index 5677e9577811..ec355c7da546 100755 --- a/drivers/gpu/ion/ion_carveout_heap.c +++ b/drivers/gpu/ion/ion_carveout_heap.c @@ -192,12 +192,18 @@ int ion_carveout_cache_op(struct ion_heap *heap, struct ion_buffer *buffer, outer_flush_range(buffer->priv_phys,buffer->priv_phys + size); break; case ION_CACHE_CLEAN: + /* When cleaning, always clean the innermost (L1) cache first + * and then clean the outer cache(s). + */ dmac_clean_range((void *)start, (void *)end); outer_clean_range(buffer->priv_phys,buffer->priv_phys + size); break; case ION_CACHE_INVALID: - dmac_inv_range((void *)start, (void *)end); + /* When invalidating, always invalidate the outermost cache first + * and the L1 cache last. + */ outer_inv_range(buffer->priv_phys,buffer->priv_phys + size); + dmac_inv_range((void *)start, (void *)end); break; default: return -EINVAL;