[PATCH] arm64: s/AMEVTYPE/AMEVTYPER
Mark Rutland
mark.rutland at arm.com
Tue Jul 21 08:28:41 EDT 2020
[adding folk to Cc]
On Tue, Jul 21, 2020 at 10:12:59AM +0100, Vladimir Murzin wrote:
> Activity Monitor Event Type Registers are named as AMEVTYPER{0,1}<n>
>
> Signed-off-by: Vladimir Murzin <vladimir.murzin at arm.com>
This matches the ARM ARM, and looks sound to me, so FWIW:
Acked-by: Mark Rutland <mark.rutland at arm.com>
Mark.
> ---
> arch/arm64/include/asm/sysreg.h | 4 +--
> arch/arm64/kvm/sys_regs.c | 68 ++++++++++++++++++++---------------------
> 2 files changed, 36 insertions(+), 36 deletions(-)
>
> diff --git a/arch/arm64/include/asm/sysreg.h b/arch/arm64/include/asm/sysreg.h
> index 463175f..273bb1d 100644
> --- a/arch/arm64/include/asm/sysreg.h
> +++ b/arch/arm64/include/asm/sysreg.h
> @@ -421,9 +421,9 @@
> */
>
> #define SYS_AMEVCNTR0_EL0(n) SYS_AM_EL0(4 + ((n) >> 3), (n) & 7)
> -#define SYS_AMEVTYPE0_EL0(n) SYS_AM_EL0(6 + ((n) >> 3), (n) & 7)
> +#define SYS_AMEVTYPER0_EL0(n) SYS_AM_EL0(6 + ((n) >> 3), (n) & 7)
> #define SYS_AMEVCNTR1_EL0(n) SYS_AM_EL0(12 + ((n) >> 3), (n) & 7)
> -#define SYS_AMEVTYPE1_EL0(n) SYS_AM_EL0(14 + ((n) >> 3), (n) & 7)
> +#define SYS_AMEVTYPER1_EL0(n) SYS_AM_EL0(14 + ((n) >> 3), (n) & 7)
>
> /* AMU v1: Fixed (architecturally defined) activity monitors */
> #define SYS_AMEVCNTR0_CORE_EL0 SYS_AMEVCNTR0_EL0(0)
> diff --git a/arch/arm64/kvm/sys_regs.c b/arch/arm64/kvm/sys_regs.c
> index baf5ce9..d319667 100644
> --- a/arch/arm64/kvm/sys_regs.c
> +++ b/arch/arm64/kvm/sys_regs.c
> @@ -1024,9 +1024,9 @@ static bool access_amu(struct kvm_vcpu *vcpu, struct sys_reg_params *p,
>
> /* Macro to expand the AMU counter and type registers*/
> #define AMU_AMEVCNTR0_EL0(n) { SYS_DESC(SYS_AMEVCNTR0_EL0(n)), access_amu }
> -#define AMU_AMEVTYPE0_EL0(n) { SYS_DESC(SYS_AMEVTYPE0_EL0(n)), access_amu }
> +#define AMU_AMEVTYPER0_EL0(n) { SYS_DESC(SYS_AMEVTYPER0_EL0(n)), access_amu }
> #define AMU_AMEVCNTR1_EL0(n) { SYS_DESC(SYS_AMEVCNTR1_EL0(n)), access_amu }
> -#define AMU_AMEVTYPE1_EL0(n) { SYS_DESC(SYS_AMEVTYPE1_EL0(n)), access_amu }
> +#define AMU_AMEVTYPER1_EL0(n) { SYS_DESC(SYS_AMEVTYPER1_EL0(n)), access_amu }
>
> static bool trap_ptrauth(struct kvm_vcpu *vcpu,
> struct sys_reg_params *p,
> @@ -1629,22 +1629,22 @@ static const struct sys_reg_desc sys_reg_descs[] = {
> AMU_AMEVCNTR0_EL0(13),
> AMU_AMEVCNTR0_EL0(14),
> AMU_AMEVCNTR0_EL0(15),
> - AMU_AMEVTYPE0_EL0(0),
> - AMU_AMEVTYPE0_EL0(1),
> - AMU_AMEVTYPE0_EL0(2),
> - AMU_AMEVTYPE0_EL0(3),
> - AMU_AMEVTYPE0_EL0(4),
> - AMU_AMEVTYPE0_EL0(5),
> - AMU_AMEVTYPE0_EL0(6),
> - AMU_AMEVTYPE0_EL0(7),
> - AMU_AMEVTYPE0_EL0(8),
> - AMU_AMEVTYPE0_EL0(9),
> - AMU_AMEVTYPE0_EL0(10),
> - AMU_AMEVTYPE0_EL0(11),
> - AMU_AMEVTYPE0_EL0(12),
> - AMU_AMEVTYPE0_EL0(13),
> - AMU_AMEVTYPE0_EL0(14),
> - AMU_AMEVTYPE0_EL0(15),
> + AMU_AMEVTYPER0_EL0(0),
> + AMU_AMEVTYPER0_EL0(1),
> + AMU_AMEVTYPER0_EL0(2),
> + AMU_AMEVTYPER0_EL0(3),
> + AMU_AMEVTYPER0_EL0(4),
> + AMU_AMEVTYPER0_EL0(5),
> + AMU_AMEVTYPER0_EL0(6),
> + AMU_AMEVTYPER0_EL0(7),
> + AMU_AMEVTYPER0_EL0(8),
> + AMU_AMEVTYPER0_EL0(9),
> + AMU_AMEVTYPER0_EL0(10),
> + AMU_AMEVTYPER0_EL0(11),
> + AMU_AMEVTYPER0_EL0(12),
> + AMU_AMEVTYPER0_EL0(13),
> + AMU_AMEVTYPER0_EL0(14),
> + AMU_AMEVTYPER0_EL0(15),
> AMU_AMEVCNTR1_EL0(0),
> AMU_AMEVCNTR1_EL0(1),
> AMU_AMEVCNTR1_EL0(2),
> @@ -1661,22 +1661,22 @@ static const struct sys_reg_desc sys_reg_descs[] = {
> AMU_AMEVCNTR1_EL0(13),
> AMU_AMEVCNTR1_EL0(14),
> AMU_AMEVCNTR1_EL0(15),
> - AMU_AMEVTYPE1_EL0(0),
> - AMU_AMEVTYPE1_EL0(1),
> - AMU_AMEVTYPE1_EL0(2),
> - AMU_AMEVTYPE1_EL0(3),
> - AMU_AMEVTYPE1_EL0(4),
> - AMU_AMEVTYPE1_EL0(5),
> - AMU_AMEVTYPE1_EL0(6),
> - AMU_AMEVTYPE1_EL0(7),
> - AMU_AMEVTYPE1_EL0(8),
> - AMU_AMEVTYPE1_EL0(9),
> - AMU_AMEVTYPE1_EL0(10),
> - AMU_AMEVTYPE1_EL0(11),
> - AMU_AMEVTYPE1_EL0(12),
> - AMU_AMEVTYPE1_EL0(13),
> - AMU_AMEVTYPE1_EL0(14),
> - AMU_AMEVTYPE1_EL0(15),
> + AMU_AMEVTYPER1_EL0(0),
> + AMU_AMEVTYPER1_EL0(1),
> + AMU_AMEVTYPER1_EL0(2),
> + AMU_AMEVTYPER1_EL0(3),
> + AMU_AMEVTYPER1_EL0(4),
> + AMU_AMEVTYPER1_EL0(5),
> + AMU_AMEVTYPER1_EL0(6),
> + AMU_AMEVTYPER1_EL0(7),
> + AMU_AMEVTYPER1_EL0(8),
> + AMU_AMEVTYPER1_EL0(9),
> + AMU_AMEVTYPER1_EL0(10),
> + AMU_AMEVTYPER1_EL0(11),
> + AMU_AMEVTYPER1_EL0(12),
> + AMU_AMEVTYPER1_EL0(13),
> + AMU_AMEVTYPER1_EL0(14),
> + AMU_AMEVTYPER1_EL0(15),
>
> { SYS_DESC(SYS_CNTP_TVAL_EL0), access_arch_timer },
> { SYS_DESC(SYS_CNTP_CTL_EL0), access_arch_timer },
> --
> 2.7.4
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
More information about the linux-arm-kernel
mailing list