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]
Message-ID: <8ca29fcd-20f1-494d-ae51-1c096d131a60@arm.com>
Date: Wed, 10 Apr 2024 19:35:03 +0100
From: Robin Murphy <robin.murphy@....com>
To: Jonathan Cameron <Jonathan.Cameron@...wei.com>
Cc: will@...nel.org, mark.rutland@....com,
 linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] perf/arm-cmn: Set PMU device parent

On 2024-04-10 6:04 pm, Jonathan Cameron wrote:
> On Tue,  9 Apr 2024 18:15:17 +0100
> Robin Murphy <robin.murphy@....com> wrote:
> 
>> Now that perf supports giving the PMU device a parent, we can use our
>> platform device to make the relationship between CMN instances and PMU
>> IDs trivially discoverable, from either nominal direction:
>>
>> root@...zy-taxi:~# ls /sys/devices/platform/ARMHC600:00 | grep cmn
>> arm_cmn_0
>> root@...zy-taxi:~# realpath /sys/bus/event_source/devices/arm_cmn_0/..
>> /sys/devices/platform/ARMHC600:00
>>
>> Signed-off-by: Robin Murphy <robin.murphy@....com>
> Nice.  I'd forgotten all about this :(

Yeah, I hadn't realised the core change actually got merged until I 
stumbled across it by chance yesterday, otherwise I'd have followed up 
far sooner... If only your series had been a day or two later, I'd have 
posted the original device_move() version of this one back then, and it 
might even have looked reasonable for a moment :)

Cheers,
Robin.

> https://lore.kernel.org/all/20230404134225.13408-1-Jonathan.Cameron@huawei.com/
> still has a bunch of these + there were many I never looked into.
> 
> Guess I should respin that series though probably 50% at least still apply.
> 
> J
> 
> 
>> ---
>>   drivers/perf/arm-cmn.c | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/perf/arm-cmn.c b/drivers/perf/arm-cmn.c
>> index 7ef9c7e4836b..b2c607cf3ad7 100644
>> --- a/drivers/perf/arm-cmn.c
>> +++ b/drivers/perf/arm-cmn.c
>> @@ -2482,6 +2482,7 @@ static int arm_cmn_probe(struct platform_device *pdev)
>>   	cmn->cpu = cpumask_local_spread(0, dev_to_node(cmn->dev));
>>   	cmn->pmu = (struct pmu) {
>>   		.module = THIS_MODULE,
>> +		.parent = cmn->dev,
>>   		.attr_groups = arm_cmn_attr_groups,
>>   		.capabilities = PERF_PMU_CAP_NO_EXCLUDE,
>>   		.task_ctx_nr = perf_invalid_context,
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ