]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
arm64: entry-ftrace.S: avoid open-coded {adr,ldr}_l
authorMark Rutland <mark.rutland@arm.com>
Tue, 17 Jan 2017 16:10:58 +0000 (16:10 +0000)
committerWill Deacon <will.deacon@arm.com>
Tue, 17 Jan 2017 17:41:19 +0000 (17:41 +0000)
commit829d2bd1339220b742e5e61a5f1975eb6f74cad3
tree1011a9a96444329a4617d841abf8794244c729c7
parent526d10ae022c36722ce5b2db22b02f9353281875
arm64: entry-ftrace.S: avoid open-coded {adr,ldr}_l

Some places in the kernel open-code sequences using ADRP for a symbol
another instruction using a :lo12: relocation for that same symbol.
These sequences are easy to get wrong, and more painful to read than is
necessary. For these reasons, it is preferable to use the
{adr,ldr,str}_l macros for these cases.

This patch makes use of these in entry-ftrace.S, removing open-coded
sequences using adrp. This results in a minor code change, since a
temporary register is not used when generating the address for some
symbols, but this is fine, as the value of the temporary register is not
used elsewhere.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: AKASHI Takahiro <takahiro.akashi@linaro.org>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
arch/arm64/kernel/entry-ftrace.S