[PATCH v3 1/5] coresight: etm4x: introduce struct etm4_caps

Yeoreum Yun yeoreum.yun at arm.com
Mon Apr 13 03:03:39 PDT 2026


Hi Jie,
>
> Hi Yeoreum,
>
> On 4/13/2026 1:55 AM, Yeoreum Yun wrote:
> > introduce struct etm4_caps to describe ETMv4 capabilities
> > and move capabilities information into it.
> >
> > Signed-off-by: Yeoreum Yun <yeoreum.yun at arm.com>
> > ---
> >   .../coresight/coresight-etm4x-core.c          | 234 +++++++++---------
> >   .../coresight/coresight-etm4x-sysfs.c         | 190 ++++++++------
> >   drivers/hwtracing/coresight/coresight-etm4x.h | 175 ++++++-------
> >   3 files changed, 327 insertions(+), 272 deletions(-)
> >
> > diff --git a/drivers/hwtracing/coresight/coresight-etm4x-core.c b/drivers/hwtracing/coresight/coresight-etm4x-core.c
> > index d565a73f0042..6443f3717b37 100644
> > --- a/drivers/hwtracing/coresight/coresight-etm4x-core.c
> > +++ b/drivers/hwtracing/coresight/coresight-etm4x-core.c
>
> <...>
>
> > +/**
> > + * struct etmv4_caps - specifics ETM capabilities
> > + * @nr_pe:	The number of processing entity available for tracing.
> > + * @nr_pe_cmp:	The number of processing entity comparator inputs that are
> > + *		available for tracing.
> > + * @nr_addr_cmp:Number of pairs of address comparators available
> > + *		as found in ETMIDR4 0-3.
> > + * @nr_cntr:    Number of counters as found in ETMIDR5 bit 28-30.
> > + * @nr_ext_inp: Number of external input.
> > + * @numcidc:	Number of contextID comparators.
>
> @numextinsel:
>
> > + * @numvmidc:	Number of VMID comparators.
> > + * @nrseqstate: The number of sequencer states that are implemented.
> > + * @nr_event:	Indicates how many events the trace unit support.
> > + * @nr_resource:The number of resource selection pairs available for tracing.
> > + * @nr_ss_cmp:	Number of single-shot comparator controls that are available.
> > + * @trcid_size: Indicates the trace ID width.
> > + * @ts_size:	Global timestamp size field.
> > + * @ctxid_size:	Size of the context ID field to consider.
> > + * @vmid_size:	Size of the VM ID comparator to consider.
> > + * @ccsize:	Indicates the size of the cycle counter in bits.
> > + * @ccitmin:	minimum value that can be programmed in
> > + * @s_ex_level:	In secure state, indicates whether instruction tracing is
> > + *		supported for the corresponding Exception level.
> > + * @ns_ex_level:In non-secure state, indicates whether instruction tracing is
> > + *		supported for the corresponding Exception level.
> > + * @q_support:	Q element support characteristics.
> > + * @os_lock_model: OSLock model.
> > + * @instrp0:	Tracing of load and store instructions
> > + *		as P0 elements is supported.
> > + * @q_filt:	Q element filtering support, if Q elements are supported.
> > + * @trcbb:	Indicates if the trace unit supports branch broadcast tracing.
> > + * @trccond:	If the trace unit supports conditional
> > + *		instruction tracing.
> > + * @retstack:	Indicates if the implementation supports a return stack.
> > + * @trccci:	Indicates if the trace unit supports cycle counting
> > + *		for instruction.
> > + * @trc_error:	Whether a trace unit can trace a system
> > + *		error exception.
> > + * @syncpr:	Indicates if an implementation has a fixed
> > + *		synchronization period.
> > + * @stallctl:	If functionality that prevents trace unit buffer overflows
> > + *		is available.
> > + * @sysstall:	Does the system support stall control of the PE?
> > + * @nooverflow:	Indicate if overflow prevention is supported.
> > + * @atbtrig:	If the implementation can support ATB triggers
> > + * @lpoverride:	If the implementation can support low-power state over.
> > + * @skip_power_up: Indicates if an implementation can skip powering up
> > + *		   the trace unit.
> > + */
> > +struct etmv4_caps {
> > +	u8	nr_pe;
> > +	u8	nr_pe_cmp;
> > +	u8	nr_addr_cmp;
> > +	u8	nr_cntr;
> > +	u8	nr_ext_inp;
> > +	u8	numcidc;
> > +	u8	numextinsel;
>
> missed kernel_doc.
>
> Thanks,
> Jie

Thanks. I'll add comment for numextinsel.

--
Sincerely,
Yeoreum Yun



More information about the linux-arm-kernel mailing list