[PATCH v4 2/2] coresight: Make sysFS functional on topologies with per core sink

Linu Cherian linuc.decode at gmail.com
Tue Sep 15 00:40:44 EDT 2020


Hi Mathieu,

 >  
> >  /**
> > - * coresight_get_enabled_sink - returns the first enabled sink found on the bus
> > - * @deactivate:	Whether the 'enable_sink' flag should be reset
> > - *
> > - * When operated from perf the deactivate parameter should be set to 'true'.
> > - * That way the "enabled_sink" flag of the sink that was selected can be reset,
> > - * allowing for other concurrent perf sessions to choose a different sink.
> > + * coresight_get_enabled_sink - returns the first enabled sink using
> > + * connection based search starting from the source reference
> >   *
> > - * When operated from sysFS users have full control and as such the deactivate
> > - * parameter should be set to 'false', hence mandating users to explicitly
> > - * clear the flag.
> > + * @source: Coresight source device reference
> >   */
> > -struct coresight_device *coresight_get_enabled_sink(bool deactivate)
> > +struct coresight_device *
> > +coresight_get_enabled_sink(struct coresight_device *source)
> >  {
> > -	struct device *dev = NULL;
> > -
> > -	dev = bus_find_device(&coresight_bustype, NULL, &deactivate,
> > -			      coresight_enabled_sink);
> > +	if (!source)
> > +		return NULL;
> >  
> > -	return dev ? to_coresight_device(dev) : NULL;
> > +	return coresight_find_enabled_sink(source);
> >  }
> >  
> >  static int coresight_sink_by_id(struct device *dev, const void *data)
> > @@ -992,7 +988,7 @@ int coresight_enable(struct coresight_device *csdev)
> >  	 * Search for a valid sink for this session but don't reset the
> >  	 * "enable_sink" flag in sysFS.  Users get to do that explicitly.
> >  	 */
> 
> With this patch the above comment is no longer relevant.  Since you were nice
> enough to do the extra work I fixed both problem and applied your patches. 

Thanks.

-- 
Linu cherian



More information about the linux-arm-kernel mailing list