lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Thu, 21 Mar 2019 10:09:22 +0800
From:   Leo Yan <leo.yan@...aro.org>
To:     Suzuki K Poulose <suzuki.poulose@....com>
Cc:     shiwanglai@...ilicon.com, mathieu.poirier@...aro.org,
        robh+dt@...nel.org, mark.rutland@....com, xuwei5@...ilicon.com,
        alexander.shishkin@...ux.intel.com,
        linux-arm-kernel@...ts.infradead.org, devicetree@...r.kernel.org,
        linux-kernel@...r.kernel.org, suzhuangluan@...ilicon.com
Subject: Re: [PATCH v2 2/3] coresight: funnel: Support static funnel

Hi Suzuki,

On Wed, Mar 20, 2019 at 01:52:58PM +0000, Suzuki K Poulose wrote:
> 
> 
> On 20/03/2019 12:38, Wanglai Shi wrote:
> > From: Leo Yan <leo.yan@...aro.org>
> > 
> > Since CoreSight hardware topology can use a 'hidden' funnel in the
> > trace data path, this kind funnel doesn't have register for accessing
> > and is used by default from hardware design perspective.  Below is an
> > example for related hardware topology:
> > 
> >    +------+  +------+
> >    | cpu0 |->| ETM  |-\
> >    +------+  +------+  \-> +--------+  +-----+
> >     ......                 | Funnel |->| ETF |-\    Hidden funnel
> >    +------+  +------+  /-> +--------+  +-----+  \        |
> >    | cpu3 |->| ETM  |-/                          \       V
> >    +------+  +------+                             \-> +--------+
> >                                                       | Funnel |-> ...
> >    +------+  +------+                             /-> +--------+
> >    | cpu4 |->| ETM  |-\                          /
> >    +------+  +------+  \-> +--------+  +-----+  /
> >     ......                 | Funnel |->| ETF |-/
> >    +------+  +------+  /-> +--------+  +-----+
> >    | cpu7 |->| ETM  |-/
> >    +------+  +------+
> > 
> > The CoreSight funnel driver only supports dynamic funnel with
> > registration register resource, thus it cannot support for the static
> > funnel case and it's impossible to create trace data path for this case.
> > 
> > This patch is to extend CoreSight funnel driver to support both for
> > static funnel and dynamic funnel.  For the dynamic funnel it reuses the
> > code existed in the driver, for static funnel the driver will support
> > device probe if without providing register resource and the driver skips
> > registers accessing when detect the register base is NULL.
> > 
> > Signed-off-by: Leo Yan <leo.yan@...aro.org>
> > ---
> 
> Suggested-by: Suzuki K Poulose <suzuki.poulose@....com>

Will add the tag in next version, and very appreciate you shared me
offline the replicator code for reference!

> > -static const struct amba_id funnel_ids[] = {
> > +static int static_funnel_probe(struct platform_device *pdev)
> > +{
> > +	int ret;
> > +
> > +	pm_runtime_get_noresume(&pdev->dev);
> > +	pm_runtime_set_active(&pdev->dev);
> > +	pm_runtime_enable(&pdev->dev);
> > +
> > +	/* Static funnel do not have programming base */
> > +	ret = funnel_probe(&pdev->dev, NULL);
> > +
> > +	if (ret) {
> > +		pm_runtime_put_noidle(&pdev->dev);
> > +		pm_runtime_disable(&pdev->dev);
> > +	}
> > +
> > +	return ret;
> > +}
> > +
> > +static const struct of_device_id static_funnel_match[] = {
> > +	{.compatible = "arm,coresight-funnel"},
> 
> There is a potential issue with re-using the "compatible" string
> already reserved for the normal programmable funnel. We may handle
> a programmable funnel as non-programmable one, which is not good.
> 
> Do we need to use "arm,coresight-static-funnel" ?

This suggestion makes sense, will do this.

> Otherwise, looks good to me.

Thanks for reviewing.

Thanks,
Leo Yan

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ