]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: Use simpler arithmetics for the linear map macros
authorCatalin Marinas <catalin.marinas@arm.com>
Mon, 1 Feb 2021 19:06:34 +0000 (19:06 +0000)
committerCatalin Marinas <catalin.marinas@arm.com>
Tue, 2 Feb 2021 17:45:09 +0000 (17:45 +0000)
commitceaa53c4c3a0aab70e1c21d1cb82411e976ff246
tree118d08967c89d3e2858310ccc53c7796ea4e6e3b
parent292b286d429fcefc90093dc01bcbd53a961d390d
arm64: Use simpler arithmetics for the linear map macros

Because of the tagged addresses, the __is_lm_address() and
__lm_to_phys() macros grew to some harder to understand bitwise
operations using PAGE_OFFSET. Since these macros only accept untagged
addresses, use a simple subtract operation.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Cc: Will Deacon <will@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Link: https://lore.kernel.org/r/20210201190634.22942-3-catalin.marinas@arm.com
arch/arm64/include/asm/memory.h