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] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 19 Oct 2015 18:37:44 +0300
From:	Alexander Shishkin <alexander.shishkin@...ux.intel.com>
To:	Mathieu Poirier <mathieu.poirier@...aro.org>,
	gregkh@...uxfoundation.org, a.p.zijlstra@...llo.nl,
	acme@...nel.org, mingo@...hat.com, corbet@....net,
	nicolas.pitre@...aro.org
Cc:	adrian.hunter@...el.com, zhang.chunyan@...aro.org,
	mike.leach@....com, tor@...com, al.grant@....com,
	pawel.moll@....com, linux-arm-kernel@...ts.infradead.org,
	linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org,
	mathieu.poirier@...aro.org
Subject: Re: [PATCH V2 22/30] coresight: etm-perf: new PMU driver for ETM tracers

Mathieu Poirier <mathieu.poirier@...aro.org> writes:

> +static int etm_event_pmu_start(struct perf_event *event)
> +{
> +	int cpu, ret;
> +	cpumask_t mask;
> +	struct coresight_device *csdev;
> +
> +	cpumask_clear(&mask);
> +	if (event->cpu != -1)
> +		cpumask_set_cpu(event->cpu, &mask);
> +	else
> +		cpumask_copy(&mask, cpu_online_mask);
> +
> +	for_each_cpu(cpu, &mask) {
> +		csdev = per_cpu(csdev_src, cpu);
> +
> +		if (!source_ops(csdev)->perf_start)
> +			continue;
> +
> +		ret = source_ops(csdev)->perf_start(csdev);
> +		if (ret)
> +			goto err;

So long as "perf_start" and "perf_stop" here mean
"pm_runtime_get()/put()", this can work, but in that case maybe a better
name should be used, because no real starting or stopping of anything
takes place here. Since pmu::event_init and event::destroy happen in
allocation/deallocation paths and at event scheduling, it's not a good
idea to actually start anything here.

Regards,
--
Alex
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ