[PATCH 1/2] coresight: etm4x: fix inconsistencies with sysfs configration

Yeoreum Yun yeoreum.yun at arm.com
Wed Apr 8 04:02:14 PDT 2026


Hi Leo,

[...]

> As Suzuki suggested in another reply, we need to extract capabilities
> into a separate structure.  I'd also extract status related registers
> into a new structure:
>
>   struct etm4_cap {
>       int nr_ss_cmp;
>       bool pe_comparator;    // TRCSSCSRn.PC
>       bool dv_comparator;    // TRCSSCSRn.DV
>       bool da_comparator;    // TRCSSCSRn.DA
>       bool inst_comparator;  // TRCSSCSRn.INST
>
>       int ns_ex_level;
>       int nr_pe;
>       int nr_pe_cmp;
>       int nr_resource;
>       ...
>   }
>
>   struct etm4_status_reg {
>       u32 ss_status[ETM_MAX_SS_CMP];
>       u32 cntr_val[ETMv4_MAX_CNTR];
>   }

Hmm, I don't think the cntr_val doesn't need to be separated into
etm4_status_reg since they're configurable by sysfs.

BTW from etmv4_config, I think parts of capabilites are only:
  - ss_status
  - s_ex_level

I think it would be okay to include all of this information into
struct etm4_cap not dedicate etm4_status_reg structure.

BTW, Is it required to sustain TRCSSCSR<n>.PENDING in sysfs after
re-enable sysfs-session? (enable->disable->enable) while it's always
cleared in perf mode?

Thanks!

--
Sincerely,
Yeoreum Yun



More information about the linux-arm-kernel mailing list