diff mbox series

arm64: s/AMEVTYPE/AMEVTYPER

Message ID 20200721091259.102756-1-vladimir.murzin@arm.com
State Mainlined
Commit 493cf9b723bcc87e9284e5e5971259951a13f22e
Headers show
Series arm64: s/AMEVTYPE/AMEVTYPER | expand

Commit Message

Vladimir Murzin July 21, 2020, 9:12 a.m. UTC
Activity Monitor Event Type Registers are named as AMEVTYPER{0,1}<n>

Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com>
---
 arch/arm64/include/asm/sysreg.h |  4 +--
 arch/arm64/kvm/sys_regs.c       | 68 ++++++++++++++++++++---------------------
 2 files changed, 36 insertions(+), 36 deletions(-)

Comments

Mark Rutland July 21, 2020, 12:28 p.m. UTC | #1
[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@arm.com>

This matches the ARM ARM, and looks sound to me, so FWIW:

Acked-by: Mark Rutland <mark.rutland@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@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Valentin Schneider July 21, 2020, 12:51 p.m. UTC | #2
On 21/07/20 13:28, Mark Rutland wrote:
> [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@arm.com>
>
> This matches the ARM ARM, and looks sound to me, so FWIW:
>
> Acked-by: Mark Rutland <mark.rutland@arm.com>
>

That looks fine to me as well.
Ionela Voinescu July 21, 2020, 2:31 p.m. UTC | #3
Hi Vladimir,

On Tuesday 21 Jul 2020 at 13:51:57 (+0100), Valentin Schneider wrote:
> 
> On 21/07/20 13:28, Mark Rutland wrote:
> > [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@arm.com>
> >
> > This matches the ARM ARM, and looks sound to me, so FWIW:
> >
> > Acked-by: Mark Rutland <mark.rutland@arm.com>
> >
> 
> That looks fine to me as well.

It looks good to me as well, thank you for correcting this!

Regards,
Ionela.
diff mbox series

Patch

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 },