From: Lu Baolu <baolu.lu@linux.intel.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: intel-gfx@lists.freedesktop.org,
Joonas Lahtinen <joonas.lahtinen@linux.intel.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Jani Nikula <jani.nikula@linux.intel.com>,
iommu@lists.linux-foundation.org, Tom Murphy <murphyt7@tcd.ie>,
Rodrigo Vivi <rodrigo.vivi@intel.com>,
David Woodhouse <dwmw2@infradead.org>
Subject: Re: [PATCH V2 5/5] DO NOT MERGE: iommu: disable list appending in dma-iommu
Date: Sat, 12 Sep 2020 11:13:44 +0800 [thread overview]
Message-ID: <8c8f3df1-7fab-d019-7e4a-4ce5f5b2b273@linux.intel.com> (raw)
In-Reply-To: <20200909070620.GB28245@infradead.org>
On 2020/9/9 15:06, Christoph Hellwig wrote:
> On Wed, Sep 09, 2020 at 09:43:09AM +0800, Lu Baolu wrote:
>> + /*
>> + * The Intel graphic device driver is used to assume that the
>> returned
>> + * sg list is not combound. This blocks the efforts of converting
>> the
>
> This adds pointless overly long lines.
>
>> + * Intel IOMMU driver to dma-iommu api's. Add this quirk to make the
>> + * device driver work and should be removed once it's fixed in i915
>> + * driver.
>> + */
>> + if (dev_is_pci(dev) &&
>> + to_pci_dev(dev)->vendor == PCI_VENDOR_ID_INTEL &&
>> + (to_pci_dev(dev)->class >> 16) == PCI_BASE_CLASS_DISPLAY) {
>> + for_each_sg(sg, s, nents, i) {
>> + unsigned int s_iova_off = sg_dma_address(s);
>> + unsigned int s_length = sg_dma_len(s);
>> + unsigned int s_iova_len = s->length;
>> +
>> + s->offset += s_iova_off;
>> + s->length = s_length;
>> + sg_dma_address(s) = dma_addr + s_iova_off;
>> + sg_dma_len(s) = s_length;
>> + dma_addr += s_iova_len;
>> + }
>> +
>> + return nents;
>> + }
>
> This wants an IS_ENABLED() check. And probably a pr_once reminding
> of the workaround.
>
Will fix in the next version.
Best regards,
baolu
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
next prev parent reply other threads:[~2020-09-12 3:14 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-03 20:18 [PATCH V2 0/5] Convert the intel iommu driver to the dma-iommu api Tom Murphy
2020-09-03 20:18 ` [PATCH V2 1/5] iommu: Handle freelists when using deferred flushing in iommu drivers Tom Murphy
2020-09-03 20:18 ` [PATCH V2 2/5] iommu: Add iommu_dma_free_cpu_cached_iovas function Tom Murphy
2020-09-09 0:45 ` Lu Baolu
2020-09-09 7:05 ` Christoph Hellwig
2020-09-12 2:55 ` Lu Baolu
2020-09-03 20:18 ` [PATCH V2 3/5] iommu: allow the dma-iommu api to use bounce buffers Tom Murphy
2020-09-09 1:34 ` Lu Baolu
2020-09-03 20:18 ` [PATCH V2 4/5] iommu/vt-d: Convert intel iommu driver to the iommu ops Tom Murphy
2020-09-09 1:59 ` Lu Baolu
2020-09-03 20:18 ` [PATCH V2 5/5] DO NOT MERGE: iommu: disable list appending in dma-iommu Tom Murphy
2020-09-07 7:00 ` Christoph Hellwig
2020-09-07 20:18 ` Tom Murphy
2020-09-08 5:36 ` Christoph Hellwig
2020-09-08 5:55 ` Christoph Hellwig
2020-09-08 6:04 ` Lu Baolu
2020-09-08 6:23 ` Christoph Hellwig
2020-09-08 9:07 ` Lu Baolu
2020-09-09 1:43 ` Lu Baolu
2020-09-09 7:06 ` Christoph Hellwig
2020-09-12 3:13 ` Lu Baolu [this message]
2020-09-04 10:03 ` [PATCH V2 0/5] Convert the intel iommu driver to the dma-iommu api Joerg Roedel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8c8f3df1-7fab-d019-7e4a-4ce5f5b2b273@linux.intel.com \
--to=baolu.lu@linux.intel.com \
--cc=dwmw2@infradead.org \
--cc=hch@infradead.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=iommu@lists.linux-foundation.org \
--cc=jani.nikula@linux.intel.com \
--cc=joonas.lahtinen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=murphyt7@tcd.ie \
--cc=rodrigo.vivi@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).