]> git.proxmox.com Git - mirror_edk2.git/commit
ArmPkg: reduce sysreg access count in GIC revision probe
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Tue, 9 Jun 2015 09:28:06 +0000 (09:28 +0000)
committerabiesheuvel <abiesheuvel@Edk2>
Tue, 9 Jun 2015 09:28:06 +0000 (09:28 +0000)
commiteadbec01094cddc4052e73ea06743d5c6761e9f7
tree30a38f7e67559d7f37a3251f65243e7249f239e8
parentfd0618c1f27e07edb0f2f5e3d8b134a4e11ff334
ArmPkg: reduce sysreg access count in GIC revision probe

Accesses to system registers are disproportionately heavy-weight
when executed under virtualization, since each one involves two
world switches (from guest to host and back again).

So change the sequence that enables the GIC SRE interface so that
it performs only a single sysreg read to test whether the SRE
interface is enabled already, and only performs a write and an
additional read if that turns out not to be the case.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Olivier Martin <olivier.martin@arm.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17596 6f19259b-4bc3-4df7-8a09-765794883524
ArmPkg/Drivers/ArmGic/AArch64/ArmGicArchLib.c
ArmPkg/Drivers/ArmGic/Arm/ArmGicArchLib.c