Re: [PATCH v3] coresight: Fix possible deadlock in coresight_panic_cb

Leo Yan
2025-09-16T16:55:24Z

On Tue, Sep 16, 2025 at 05:42:07PM +0100, Suzuki Kuruppassery Poulose wrote:

[...]

> > > Well, if you are going that far, why not register the notifier from
> > > coresight-core ?
> >
> > I have thought this but gave up.
> >
> > When register a panic's notifier, it does not provide an argument for
> > passing a private data. So the code below uses container_of() to convert
> > notifier block pointer to the TMC driver data, as a result, the code is
> > specific to TMC driver.
>
> notifier_block in csdev ?

csdev is a common structure, some devices may never use the notifier.

This is the reason I thought it is fine to put notifier into TMC's
driver data, as this can meet current requirement perfectly.

Thanks,
Leo