[PATCH v7 1/7] iommu/arm-smmu-v3: Make default domain type of HiSilicon PTT device to identity
Yicong Yang
yangyicong at huawei.com
Tue May 10 05:43:13 PDT 2022
On 2022/5/10 19:23, Will Deacon wrote:
> On Thu, Apr 07, 2022 at 08:58:35PM +0800, Yicong Yang wrote:
>> The DMA operations of HiSilicon PTT device can only work properly with
>> identical mappings. So add a quirk for the device to force the domain
>> as passthrough.
>>
>> Signed-off-by: Yicong Yang <yangyicong at hisilicon.com>
>> ---
>> drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 16 ++++++++++++++++
>> 1 file changed, 16 insertions(+)
>
> I still don't like this being part of the SMMU driver, but given that
> (a) Robin doesn't seem to agree with the objection and (b) you've been
> refreshing the patch series:
>
> Acked-by: Will Deacon <will at kernel.org>
>
> If you do respin, then:
>
>> 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 627a3ed5ee8f..5ec15ae2a9b1 100644
>> --- a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
>> +++ b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
>> @@ -2839,6 +2839,21 @@ static int arm_smmu_dev_disable_feature(struct device *dev,
>> }
>> }
>
> It might be worth adding a brief comment here to explain what this device is
> and why it needs an identity mapping.
>
>> +#define IS_HISI_PTT_DEVICE(pdev) ((pdev)->vendor == PCI_VENDOR_ID_HUAWEI && \
>> + (pdev)->device == 0xa12e)
>
Will add a brief comment here in next version.
Thanks,
Yicong
More information about the linux-arm-kernel
mailing list