arm/arm64: assembler.h: Replace size with end address for dcache_by_line_op
Commit b5f659be ("arm/arm64: Remove dcache_line_size global variable") moved the dcache_by_line_op macro to assembler.h and changed it to take the size of the regions instead of the end address as parameter. This was done to keep the file in sync with the upstream Linux kernel implementation at the time. But in both places where the macro is used, the code has the start and end address of the region, and it has to compute the size to pass it to dcache_by_line_op. Then the macro itsef computes the end by adding size to start. Get rid of this massaging of parameters and change the macro to the end address as parameter directly. Besides slightly simplyfing the code by remove two unneeded arithmetic operations, this makes the macro compatible with the current upstream version of Linux (which was similarly changed to take the end address in commit 163d3f80695e ("arm64: dcache_by_line_op to take end parameter instead of size")), which will allow us to reuse (part of) the Linux C wrappers over the assembly macro. The change has been tested with the same snippet of code used to test commit 410b3bf0 ("arm/arm64: Perform dcache clean + invalidate after turning MMU off"). Signed-off-by:Alexandru Elisei <alexandru.elisei@arm.com>
Loading
Please register or sign in to comment