From: Michalis Pappas Date: Wed, 12 Jul 2023 13:36:29 +0000 (+0200) Subject: plat/common/arm: Do not use a barrier on every invalidation X-Git-Tag: RELEASE-0.14.0~16 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=08db3e412c0a1367d22e7f03d4f98aa46233a6ca;p=unikraft%2Funikraft.git plat/common/arm: Do not use a barrier on every invalidation The current implementation of clean and invalidate by region uses a barrier after every cache line. This is unnecessary and expensive. Use a barrier once, at the end of the operation. Signed-off-by: Michalis Pappas Reviewed-by: Sergiu Moga Approved-by: Razvan Deaconescu Tested-by: Unikraft CI GitHub-Closes: #1049 --- diff --git a/plat/common/arm/cache64.S b/plat/common/arm/cache64.S index 8b5e644fe..498979a60 100644 --- a/plat/common/arm/cache64.S +++ b/plat/common/arm/cache64.S @@ -60,7 +60,6 @@ ENTRY(clean_and_invalidate_dcache_range) 1: /* clean and invalidate D cache by D cache line size */ dc civac, x0 - dsb nsh /* Move to next line and reduce the size */ add x0, x0, x3 @@ -68,9 +67,7 @@ ENTRY(clean_and_invalidate_dcache_range) /* Check if all range has been invalidated */ b.hi 1b - - isb - + dsb sy ret END(clean_and_invalidate_dcache_range) @@ -99,8 +96,6 @@ ENTRY(invalidate_dcache_range) /* Check if all range has been invalidated */ b.hi 1b - - isb - + dsb sy ret END(invalidate_dcache_range)