Skip to content

Commit f170aa5

Browse files
Anshuman Khandualctmarinas
authored andcommitted
arm64/sysreg: Rename TRBIDR_EL1 fields per auto-gen tools format
This renames TRBIDR_EL1 register fields per auto-gen tools format without causing any functional change in the TRBE driver. Cc: Will Deacon <[email protected]> Cc: Marc Zyngier <[email protected]> Cc: Mark Brown <[email protected]> Cc: Rob Herring <[email protected]> Cc: Suzuki K Poulose <[email protected]> Cc: James Morse <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Signed-off-by: Anshuman Khandual <[email protected]> Reviewed-by: Suzuki K Poulose <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Catalin Marinas <[email protected]>
1 parent dae169f commit f170aa5

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

arch/arm64/include/asm/el2_setup.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
cbz x0, .Lskip_trace_\@ // Skip if TraceBuffer is not present
7070

7171
mrs_s x0, SYS_TRBIDR_EL1
72-
and x0, x0, TRBIDR_PROG
72+
and x0, x0, TRBIDR_EL1_P
7373
cbnz x0, .Lskip_trace_\@ // If TRBE is available at EL2
7474

7575
mov x0, #(MDCR_EL2_E2TB_MASK << MDCR_EL2_E2TB_SHIFT)

arch/arm64/include/asm/sysreg.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -269,10 +269,10 @@
269269
#define TRBMAR_EL1_Attr_SHIFT 0
270270
#define TRBTRG_EL1_TRG_MASK GENMASK(31, 0)
271271
#define TRBTRG_EL1_TRG_SHIFT 0
272-
#define TRBIDR_FLAG BIT(5)
273-
#define TRBIDR_PROG BIT(4)
274-
#define TRBIDR_ALIGN_MASK GENMASK(3, 0)
275-
#define TRBIDR_ALIGN_SHIFT 0
272+
#define TRBIDR_EL1_F BIT(5)
273+
#define TRBIDR_EL1_P BIT(4)
274+
#define TRBIDR_EL1_Align_MASK GENMASK(3, 0)
275+
#define TRBIDR_EL1_Align_SHIFT 0
276276

277277
#define SYS_PMINTENSET_EL1 sys_reg(3, 0, 9, 14, 1)
278278
#define SYS_PMINTENCLR_EL1 sys_reg(3, 0, 9, 14, 2)

arch/arm64/kvm/debug.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ void kvm_arch_vcpu_load_debug_state_flags(struct kvm_vcpu *vcpu)
333333

334334
/* Check if we have TRBE implemented and available at the host */
335335
if (cpuid_feature_extract_unsigned_field(dfr0, ID_AA64DFR0_EL1_TraceBuffer_SHIFT) &&
336-
!(read_sysreg_s(SYS_TRBIDR_EL1) & TRBIDR_PROG))
336+
!(read_sysreg_s(SYS_TRBIDR_EL1) & TRBIDR_EL1_P))
337337
vcpu_set_flag(vcpu, DEBUG_STATE_SAVE_TRBE);
338338
}
339339

drivers/hwtracing/coresight/coresight-trbe.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,17 +95,17 @@ static inline bool is_trbe_running(u64 trbsr)
9595

9696
static inline bool get_trbe_flag_update(u64 trbidr)
9797
{
98-
return trbidr & TRBIDR_FLAG;
98+
return trbidr & TRBIDR_EL1_F;
9999
}
100100

101101
static inline bool is_trbe_programmable(u64 trbidr)
102102
{
103-
return !(trbidr & TRBIDR_PROG);
103+
return !(trbidr & TRBIDR_EL1_P);
104104
}
105105

106106
static inline int get_trbe_address_align(u64 trbidr)
107107
{
108-
return (trbidr >> TRBIDR_ALIGN_SHIFT) & TRBIDR_ALIGN_MASK;
108+
return (trbidr & TRBIDR_EL1_Align_MASK) >> TRBIDR_EL1_Align_SHIFT;
109109
}
110110

111111
static inline unsigned long get_trbe_write_pointer(void)

0 commit comments

Comments
 (0)