Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8478d7f0 authored by Christophe Leroy's avatar Christophe Leroy Committed by Scott Wood
Browse files

powerpc: Simplify test in __dma_sync()



This simplification helps the compiler. We now have only one test
instead of two, so it reduces the number of branches.

Signed-off-by: default avatarChristophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: default avatarScott Wood <oss@buserror.net>
parent affe587b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -327,7 +327,7 @@ void __dma_sync(void *vaddr, size_t size, int direction)
		 * invalidate only when cache-line aligned otherwise there is
		 * the potential for discarding uncommitted data from the cache
		 */
		if ((start & (L1_CACHE_BYTES - 1)) || (size & (L1_CACHE_BYTES - 1)))
		if ((start | end) & (L1_CACHE_BYTES - 1))
			flush_dcache_range(start, end);
		else
			invalidate_dcache_range(start, end);