[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <6485fb62-cdb4-21e7-552d-1aa84a196458@deltatee.com>
Date: Tue, 15 Oct 2019 10:16:45 -0600
From: Logan Gunthorpe <logang@...tatee.com>
To: Joerg Roedel <joro@...tes.org>
Cc: linux-kernel@...r.kernel.org, iommu@...ts.linux-foundation.org,
Kit Chow <kchow@...aio.com>
Subject: Re: [PATCH 3/3] iommu/amd: Support multiple PCI DMA aliases in IRQ
Remapping
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
Powered by blists - more mailing lists