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: <d4e942de-296c-409b-915a-cb7ad23c53e0@nvidia.com>
Date: Mon, 15 Dec 2025 11:39:08 +0530
From: Ashish Mhetre <amhetre@...dia.com>
To: Robin Murphy <robin.murphy@....com>, Nicolin Chen <nicolinc@...dia.com>
Cc: will@...nel.org, joro@...tes.org, robh@...nel.org, krzk+dt@...nel.org,
 conor+dt@...nel.org, thierry.reding@...il.com, jonathanh@...dia.com,
 vdumpa@...dia.com, jgg@...pe.ca, linux-arm-kernel@...ts.infradead.org,
 iommu@...ts.linux.dev, devicetree@...r.kernel.org,
 linux-kernel@...r.kernel.org, linux-tegra@...r.kernel.org
Subject: Re: [PATCH V6 1/4] iommu/tegra241-cmdqv: Decouple driver from ACPI


On 12/13/2025 2:06 AM, Robin Murphy wrote:
> External email: Use caution opening links or attachments
>
>
> On 12/12/2025 7:46 pm, Nicolin Chen wrote:
>> On Fri, Dec 12, 2025 at 12:01:41PM +0000, Robin Murphy wrote:
>>>> @@ -4542,7 +4542,7 @@ static void 
>>>> acpi_smmu_dsdt_probe_tegra241_cmdqv(struct acpi_iort_node *node,
>>>>     adev = acpi_dev_get_first_match_dev("NVDA200C", uid, -1);
>>>>     if (adev) {
>>>>             /* Tegra241 CMDQV driver is responsible for 
>>>> put_device() */
>>>
>>> Don't we need to bring the put_device(adev) out to this level, since
>>> impl_dev is now something else that AFAICS we are *not* taking a new
>>> reference on (and thus should not be putting either)?
>>
>> Ah, right! We are using the platform device now.
>>
>>>> -           smmu->impl_dev = &adev->dev;
>>>> +           smmu->impl_dev = acpi_get_first_physical_node(adev);
>>>>             smmu->options |= ARM_SMMU_OPT_TEGRA241_CMDQV;
>>>>             dev_info(smmu->dev, "found companion CMDQV device: %s\n",
>>>>                      dev_name(smmu->impl_dev));
>>
>> I think we should squash this:
>
> Ack, it occurred to me shortly after sending that in fact it's good to
> still hold our own reference on impl_dev itself, as we're not relying on
> a bound driver to hold one for us.
>
> Cheers,
> Robin.
>

Ack, thanks Nic and Robin. I will include this and send
new version.

>> diff --git a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c 
>> b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
>> index 0c98be3135c63..88625e3c27a65 100644
>> --- a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
>> +++ b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
>> @@ -5280,10 +5280,11 @@ static void 
>> acpi_smmu_dsdt_probe_tegra241_cmdqv(struct acpi_iort_node *node,
>>       adev = acpi_dev_get_first_match_dev("NVDA200C", uid, -1);
>>       if (adev) {
>>               /* Tegra241 CMDQV driver is responsible for 
>> put_device() */
>> -             smmu->impl_dev = acpi_get_first_physical_node(adev);
>> +             smmu->impl_dev = 
>> get_device(acpi_get_first_physical_node(adev));
>>               smmu->options |= ARM_SMMU_OPT_TEGRA241_CMDQV;
>>               dev_info(smmu->dev, "found companion CMDQV device: %s\n",
>>                        dev_name(smmu->impl_dev));
>> +             acpi_dev_put(adev);
>>       }
>>       kfree(uid);
>>   }
>>
>> Thanks
>> Nicolin
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ