[PATCH v6 2/2] coresight: cti: Add Qualcomm extended CTI support
Leo Yan
leo.yan at arm.com
Thu Dec 4 02:31:51 PST 2025
On Thu, Dec 04, 2025 at 09:07:56AM +0000, Mike Leach wrote:
[...]
> > I saw CTI registers are within 4KiB (0x1000), we can don't convert
> > standard regiserts and only convert to QCOM register based on the
> > standard ones. So you can drop the cti_normal_offset strucuture and
> > only have a cti_reg_qcom_offset[] struct:
> >
> > static const u32 cti_extended_offset[] = {
> > [CTIINTACK] = QCOM_CTIINTACK,
> > [CTIAPPSET] = QCOM_CTIAPPSET,
> > [CTIAPPCLEAR] = QCOM_CTIAPPCLEAR,
> > [CTIAPPPULSE] = QCOM_CTIAPPPULSE,
> > [CTIINEN] = QCOM_CTIINEN,
> > ...
> > };
> >
>
> I suggested the dual offset approach a couple of patchset revisions
> ago as it actually simplifies the code & makes it more efficient. The
> offset array in use is set during probe and the remaining code is then
> common to both without lots of "if qcom else " occurences.
AFAICS, we will handle the QCOM CTI particularly in three cases:
1) The register access;
2) The claim tag;
3) Sysfs attr is visible.
Now we are discussing the reigster access. As suggested, the
"if qcom / else" is encapsulated (e.g., in cti_reg_addr_with_nr()), it
will not spread out.
I'd use standard registers by default and convert to non-standard ones
only when needed. A new "neutral" index layer seems redundant, as the
existing standard register indexes already serve this purpose.
For the sysfs attrs, it makes sense to use a central place to decide
which knobs are only visible for QCOM CTI, otherwise, we also will not
spread the condition check.
I will reply separately for claim tag issue.
Thanks,
Leo
More information about the linux-arm-kernel
mailing list