lkml.org 
[lkml]   [2022]   [May]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH v7 1/7] iommu/arm-smmu-v3: Make default domain type of HiSilicon PTT device to identity
    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@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@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

    \
     
     \ /
      Last update: 2022-05-10 13:25    [W:4.118 / U:0.232 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site