Skip to content

Commit 76d3601

Browse files
Sebastian Ottoupton
authored andcommitted
KVM: arm64: rename functions for invariant sys regs
Invariant system id registers are populated with host values at initialization time using their .reset function cb. These are currently called get_* which is usually used by the functions implementing the .get_user callback. Change their function names to reset_* to reflect what they are used for. Signed-off-by: Sebastian Ott <[email protected]> Reviewed-by: Eric Auger <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Oliver Upton <[email protected]>
1 parent bb4fa76 commit 76d3601

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

arch/arm64/kvm/sys_regs.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3720,8 +3720,8 @@ id_to_sys_reg_desc(struct kvm_vcpu *vcpu, u64 id,
37203720
*/
37213721

37223722
#define FUNCTION_INVARIANT(reg) \
3723-
static u64 get_##reg(struct kvm_vcpu *v, \
3724-
const struct sys_reg_desc *r) \
3723+
static u64 reset_##reg(struct kvm_vcpu *v, \
3724+
const struct sys_reg_desc *r) \
37253725
{ \
37263726
((struct sys_reg_desc *)r)->val = read_sysreg(reg); \
37273727
return ((struct sys_reg_desc *)r)->val; \
@@ -3733,9 +3733,9 @@ FUNCTION_INVARIANT(aidr_el1)
37333733

37343734
/* ->val is filled in by kvm_sys_reg_table_init() */
37353735
static struct sys_reg_desc invariant_sys_regs[] __ro_after_init = {
3736-
{ SYS_DESC(SYS_MIDR_EL1), NULL, get_midr_el1 },
3737-
{ SYS_DESC(SYS_REVIDR_EL1), NULL, get_revidr_el1 },
3738-
{ SYS_DESC(SYS_AIDR_EL1), NULL, get_aidr_el1 },
3736+
{ SYS_DESC(SYS_MIDR_EL1), NULL, reset_midr_el1 },
3737+
{ SYS_DESC(SYS_REVIDR_EL1), NULL, reset_revidr_el1 },
3738+
{ SYS_DESC(SYS_AIDR_EL1), NULL, reset_aidr_el1 },
37393739
};
37403740

37413741
static int get_invariant_sys_reg(u64 id, u64 __user *uaddr)

0 commit comments

Comments
 (0)