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 <michalis@unikraft.io>
Reviewed-by: Sergiu Moga <sergiu@unikraft.io>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
Tested-by: Unikraft CI <monkey@unikraft.io>
GitHub-Closes: #1049
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
/* Check if all range has been invalidated */
b.hi 1b
-
- isb
-
+ dsb sy
ret
END(clean_and_invalidate_dcache_range)
/* Check if all range has been invalidated */
b.hi 1b
-
- isb
-
+ dsb sy
ret
END(invalidate_dcache_range)