KVM: arm64: vgic-v3: Simplify vgic_v3_has_cpu_sysregs_attr()
authorMarc Zyngier <maz@kernel.org>
Sun, 3 Jul 2022 13:57:29 +0000 (14:57 +0100)
committerMarc Zyngier <maz@kernel.org>
Sun, 17 Jul 2022 10:55:33 +0000 (11:55 +0100)
commitb61fc0857a3ad4cdee44128ad13685033e237367
treea08fc3992d72e47139d9df23ca1915e295fa291d
parent5a420ed9646a934e983358aeba1bf3cd993d1cc5
KVM: arm64: vgic-v3: Simplify vgic_v3_has_cpu_sysregs_attr()

Finding out whether a sysreg exists has little to do with that
register being accessed, so drop the is_write parameter.

Also, the reg pointer is completely unused, and we're better off
just passing the attr pointer to the function.

This result in a small cleanup of the calling site, with a new
helper converting the vGIC view of a sysreg into the canonical
one (this is purely cosmetic, as the encoding is the same).

Reviewed-by: Reiji Watanabe <reijiw@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
arch/arm64/kvm/vgic-sys-reg-v3.c
arch/arm64/kvm/vgic/vgic-mmio-v3.c
arch/arm64/kvm/vgic/vgic.h