]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: setup: name `mair` register
authorMark Rutland <mark.rutland@arm.com>
Fri, 26 Mar 2021 18:01:36 +0000 (18:01 +0000)
committerCatalin Marinas <catalin.marinas@arm.com>
Sun, 28 Mar 2021 17:23:01 +0000 (18:23 +0100)
commitd9e930b3e1ee52ba0de3a339901cb448b243e971
treeb2e141fa254242f1d7922dce307f8404c6cbce18
parent76b594d6d900e4757260199abbcbd8fafbf6775e
arm64: setup: name `mair` register

In __cpu_setup we conditionally manipulate the MAIR_EL1 value in x5
before later reusing x5 as a scratch register for unrelated temporary
variables.

To make this a bit clearer, let's move the MAIR_EL1 value into a named
register `mair`. To simplify the register allocation, this is placed in
the highest available caller-saved scratch register, x17. As it is no
longer clobbered by other usage, we can write the value to MAIR_EL1 at
the end of the function as we do for TCR_EL1 rather than part-way though
feature discovery.

There should be no functional change as as a result of this patch.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Marc Zyngier <maz@kernel.org>
Cc: Will Deacon <will@kernel.org>
Link: https://lore.kernel.org/r/20210326180137.43119-2-mark.rutland@arm.com
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/mm/proc.S