diff options
author | Vijaya Kumar K <Vijaya.Kumar@cavium.com> | 2017-01-26 15:20:48 +0100 |
---|---|---|
committer | Marc Zyngier <marc.zyngier@arm.com> | 2017-01-30 14:47:16 +0100 |
commit | 4b927b94d5df24381e850dc1a3ecb34b3136d545 (patch) | |
tree | b82f02bbf7024e3795ce330cb96a9d9479bea5a6 /arch/arm64/kvm/sys_regs.h | |
parent | KVM: arm/arm64: vgic: Add distributor and redistributor access (diff) | |
download | linux-4b927b94d5df24381e850dc1a3ecb34b3136d545.tar.xz linux-4b927b94d5df24381e850dc1a3ecb34b3136d545.zip |
KVM: arm/arm64: vgic: Introduce find_reg_by_id()
In order to implement vGICv3 CPU interface access, we will need to perform
table lookup of system registers. We would need both index_to_params() and
find_reg() exported for that purpose, but instead we export a single
function which combines them both.
Signed-off-by: Pavel Fedin <p.fedin@samsung.com>
Signed-off-by: Vijaya Kumar K <Vijaya.Kumar@cavium.com>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Acked-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Diffstat (limited to 'arch/arm64/kvm/sys_regs.h')
-rw-r--r-- | arch/arm64/kvm/sys_regs.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/arm64/kvm/sys_regs.h b/arch/arm64/kvm/sys_regs.h index dbbb01cfbee9..9c6ffd0f0196 100644 --- a/arch/arm64/kvm/sys_regs.h +++ b/arch/arm64/kvm/sys_regs.h @@ -136,6 +136,10 @@ static inline int cmp_sys_reg(const struct sys_reg_desc *i1, return i1->Op2 - i2->Op2; } +const struct sys_reg_desc *find_reg_by_id(u64 id, + struct sys_reg_params *params, + const struct sys_reg_desc table[], + unsigned int num); #define Op0(_x) .Op0 = _x #define Op1(_x) .Op1 = _x |