[PATCH v2 08/36] KVM: arm64: Slightly improve debug save/restore functions

Marc Zyngier marc.zyngier at arm.com
Sat Dec 9 11:37:43 PST 2017


On Thu, 07 Dec 2017 17:06:02 +0000,
Christoffer Dall wrote:
> 
> The debug save/restore functions can be improved by using the has_vhe()
> static key instead of the instruction alternative.  Using the static key
> uses the same paradigm as we're going to use elsewhere, it makes the
> code more readable, and it generates slightly better code (no
> stack setups and function calls unless necessary).
> 
> We also use a static key on the restore path, because it will be
> marginally faster than loading a value from memory.
> 
> Finally, we don't have to conditionally clear the debug dirty flag if
> it's set, we can just clear it.
> 
> Signed-off-by: Christoffer Dall <christoffer.dall at linaro.org>

Reviewed-by: Marc Zyngier <marc.zyngier at arm.com>

	M.

-- 
Jazz is not dead, it just smell funny.



More information about the linux-arm-kernel mailing list