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]
Message-ID: <577D1185.4090801@arm.com>
Date:	Wed, 6 Jul 2016 15:11:17 +0100
From:	Marc Zyngier <marc.zyngier@....com>
To:	Will Deacon <will.deacon@....com>
Cc:	linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
	devicetree@...r.kernel.org, linux-rockchip@...ts.infradead.org,
	Heiko Stuebner <heiko@...ech.de>, cf@...k-chips.com,
	huangtao@...k-chips.com, jay.xu@...k-chips.com,
	Caesar Wang <wxt@...k-chips.com>,
	David Wu <david.wu@...k-chips.com>,
	Brian Norris <briannorris@...omium.org>,
	Mark Rutland <mark.rutland@....com>,
	Rob Herring <robh+dt@...nel.org>
Subject: Re: [PATCH] drivers/perf: arm-pmu: Handle per-interrupt affinity mask

On 06/07/16 11:39, Will Deacon wrote:
> On Fri, Jul 01, 2016 at 02:21:31PM +0100, Marc Zyngier wrote:
>> On a big-little system, PMUs can be wired to CPUs using per CPU
>> interrups (PPI). In this case, it is important to make sure that
>> the enable/disable do happen on the right set of CPUs.
>>
>> So instead of relying on the interrupt-affinity property, we can
>> use the actual percpu affinity that DT exposes as part of the
>> interrupt specifier. The DT binding is also updated to reflect
>> the fact that the interrupt-affinity property shouldn't be used
>> in that case.
> 
> [...]
> 
>> -	/* If we didn't manage to parse anything, claim to support all CPUs */
>> -	if (cpumask_weight(&pmu->supported_cpus) == 0)
>> -		cpumask_setall(&pmu->supported_cpus);
>> +	/* If we didn't manage to parse anything, try the interrupt affinity */
>> +	if (cpumask_weight(&pmu->supported_cpus) == 0) {
>> +		if (!using_spi) {
>> +			/* If using PPIs, check the affinity of the partition */
>> +			int irq = platform_get_irq(pdev, 0);
>> +			irq_get_percpu_devid_partition(irq,
>> +						       &pmu->supported_cpus);
> 
> Should we not at least propagate the failure if this returns -EINVAL?

Good point. I'll fix that and resend it.

Thanks,

	M.
-- 
Jazz is not dead. It just smells funny...

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ