From mboxrd@z Thu Jan 1 00:00:00 1970 From: marc.zyngier@arm.com (Marc Zyngier) Date: Sat, 09 Dec 2017 19:37:43 +0000 Subject: [PATCH v2 08/36] KVM: arm64: Slightly improve debug save/restore functions In-Reply-To: <20171207170630.592-9-christoffer.dall@linaro.org> References: <20171207170630.592-1-christoffer.dall@linaro.org> <20171207170630.592-9-christoffer.dall@linaro.org> Message-ID: <861sk3sneg.wl-marc.zyngier@arm.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org 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 Reviewed-by: Marc Zyngier M. -- Jazz is not dead, it just smell funny.