[PATCH v6 06/14] gtrace: Add RISC-V Trace encoder driver

Mayuresh Chitale mayuresh.chitale at oss.qualcomm.com
Wed Nov 18 01:06:24 PST 2026


Hi Leo,

On Tue, Nov 10, 2026 at 9:55 AM Leo Yu-Chi Liang <leo.liang at sifive.com> wrote:
>
> Hi Mayuresh,
>
> On 10/1/2026 1:22 PM, Mayuresh Chitale wrote:
> > +     if (!priv->srcbits) {
> > +             dev_warn(&comp->dev, "cpu %d trace will not carry source id\n",
> > +                      pdata->bound_cpu);
> > +             val = gtrace_read32(pdata, RVTRACE_COMPONENT_CTRL_OFFSET);
> > +             val |= BIT(RVTRACE_COMPONENT_CTRL_INHIBITSRC_SHIFT);
> > +             gtrace_write32(pdata, val, RVTRACE_COMPONENT_CTRL_OFFSET);
> > +     }
> > +     dev_set_drvdata(&comp->dev, priv);
> > +     return 0;
> > +}
>
> On a system with many harts it is hard to tell which encoders probed
> successfully. Today the only messages come from failures, and the
> gtrace_component device names (encoder-N) do not show the CPU or the DT
> node. How about a single dev_dbg() (or dev_info()) here giving the bound
> CPU and the source ID width, e.g.:
>
>         dev_dbg(&comp->dev, "%pfwP: cpu %d, srcbits %u\n",
>                 dev_fwnode(pdata->dev), pdata->bound_cpu, priv->srcbits);
Ok. Will add it in v7.
>
> Thanks,
> Leo



More information about the linux-riscv mailing list