From: Logan Gunthorpe <logang@deltatee.com>
To: Joerg Roedel <joro@8bytes.org>
Cc: iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org,
Kit Chow <kchow@gigaio.com>
Subject: Re: [PATCH 3/3] iommu/amd: Support multiple PCI DMA aliases in IRQ Remapping
Date: Tue, 15 Oct 2019 10:16:45 -0600 [thread overview]
Message-ID: <6485fb62-cdb4-21e7-552d-1aa84a196458@deltatee.com> (raw)
In-Reply-To: <20191015133748.GC17570@8bytes.org>
On 2019-10-15 7:37 a.m., Joerg Roedel wrote:
> On Tue, Oct 08, 2019 at 04:18:37PM -0600, Logan Gunthorpe wrote:
>> -static struct irq_remap_table *alloc_irq_table(u16 devid)
>> +static int set_remap_table_entry_alias(struct pci_dev *pdev, u16 alias,
>> + void *data)
>> +{
>> + struct irq_remap_table *table = data;
>> +
>> + irq_lookup_table[alias] = table;
>> + set_dte_irq_entry(alias, table);
>> +
>> + return 0;
>> +}
>> +
>> +static int iommu_flush_dte_alias(struct pci_dev *pdev, u16 alias, void *data)
>> +{
>> + struct amd_iommu *iommu = data;
>> +
>> + iommu_flush_dte(iommu, alias);
>> +
>> + return 0;
>> +}
>
> I think these two functions can be merged into one, saving one
> pci_for_each_dma_alias() call below. You can lookup the iommu using the
> amd_iommu_rlookup_table[alias] in the first function and issue the flush
> there.
Makes sense, thanks.
I'll rework this and send a v2 shortly.
Logan
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
prev parent reply other threads:[~2019-10-15 16:16 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-08 22:18 [PATCH 0/3] AMD IOMMU Changes for NTB Logan Gunthorpe
2019-10-08 22:18 ` [PATCH 1/3] iommu/amd: Implement dma_[un]map_resource() Logan Gunthorpe
2019-10-09 6:57 ` Christoph Hellwig
2019-10-09 16:17 ` Logan Gunthorpe
2019-10-09 16:17 ` Logan Gunthorpe
2019-10-08 22:18 ` [PATCH 2/3] iommu/amd: Support multiple PCI DMA aliases in device table Logan Gunthorpe
2019-10-08 22:18 ` [PATCH 3/3] iommu/amd: Support multiple PCI DMA aliases in IRQ Remapping Logan Gunthorpe
2019-10-15 13:37 ` Joerg Roedel
2019-10-15 16:16 ` Logan Gunthorpe [this message]
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=6485fb62-cdb4-21e7-552d-1aa84a196458@deltatee.com \
--to=logang@deltatee.com \
--cc=iommu@lists.linux-foundation.org \
--cc=joro@8bytes.org \
--cc=kchow@gigaio.com \
--cc=linux-kernel@vger.kernel.org \
/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