[PATCH v6 06/14] gtrace: Add RISC-V Trace encoder driver
Leo Yu-Chi Liang
leo.liang at sifive.com
Mon Nov 9 20:25:36 PST 2026
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);
Thanks,
Leo
More information about the linux-riscv
mailing list