]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: arm64: vgic-v3: Convert userspace accessors over to FIELD_GET/FIELD_PREP
authorMarc Zyngier <maz@kernel.org>
Tue, 5 Jul 2022 07:11:54 +0000 (08:11 +0100)
committerMarc Zyngier <maz@kernel.org>
Sun, 17 Jul 2022 10:55:33 +0000 (11:55 +0100)
commitf48b6464eb929d8461bd575945227f4436f56cf2
treecd814ac5d512fe3fefc395a8de66967ef4dedab0
parentc1ed9bbec7d3828488c667f3851de5846eed4969
KVM: arm64: vgic-v3: Convert userspace accessors over to FIELD_GET/FIELD_PREP

The GICv3 userspace accessors are all about dealing with conversion
between fields from architectural registers and internal representations.

However, and owing to the age of this code, the accessors use
a combination of shift/mask that is hard to read. It is nonetheless
easy to make it better by using the FIELD_{GET,PREP} macros that solely
rely on a mask.

This results in somewhat nicer looking code, and is probably easier
to maintain.

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