arm64: kexec: arm64_relocate_new_kernel clean-ups and optimizations
authorPavel Tatashin <pasha.tatashin@soleen.com>
Mon, 25 Jan 2021 19:19:16 +0000 (14:19 -0500)
committerWill Deacon <will@kernel.org>
Wed, 27 Jan 2021 15:41:12 +0000 (15:41 +0000)
commitdbd82fee0f258739272349bc87f5841fc1fb982a
tree119fb068cdd6f0ca83e860f32d4553fc7a5945dc
parent77a43be1164852be4b761e4acaf651f986c4e8d7
arm64: kexec: arm64_relocate_new_kernel clean-ups and optimizations

In preparation to bigger changes to arm64_relocate_new_kernel that would
enable this function to do MMU backed memory copy, do few clean-ups and
optimizations. These include:

1. Call raw_dcache_line_size()  only when relocation is actually going to
   happen. i.e. kdump type kexec, does not need it.

2.  copy_page(dest, src, tmps...) increments dest and src by PAGE_SIZE, so
    no need to store dest prior to calling copy_page and increment it
    after. Also, src is not used after a copy, not need to copy either.

3. For consistency use comment on the same line with instruction when it
   describes the instruction itself.

4. Some comment corrections

Signed-off-by: Pavel Tatashin <pasha.tatashin@soleen.com>
Link: https://lore.kernel.org/r/20210125191923.1060122-12-pasha.tatashin@soleen.com
Signed-off-by: Will Deacon <will@kernel.org>
arch/arm64/kernel/relocate_kernel.S