[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150601034734.GD22789@voom.redhat.com>
Date: Mon, 1 Jun 2015 13:47:34 +1000
From: David Gibson <david@...son.dropbear.id.au>
To: Alexey Kardashevskiy <aik@...abs.ru>
Cc: linuxppc-dev@...ts.ozlabs.org,
Alex Williamson <alex.williamson@...hat.com>,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Gavin Shan <gwshan@...ux.vnet.ibm.com>,
Paul Mackerras <paulus@...ba.org>, kvm@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH kernel v11 02/34] powerpc/iommu/powernv: Get rid of
set_iommu_table_base_and_group
On Fri, May 29, 2015 at 06:44:26PM +1000, Alexey Kardashevskiy wrote:
> The set_iommu_table_base_and_group() name suggests that the function
> sets table base and add a device to an IOMMU group.
>
> The actual purpose for table base setting is to put some reference
> into a device so later iommu_add_device() can get the IOMMU group
> reference and the device to the group.
>
> At the moment a group cannot be explicitly passed to iommu_add_device()
> as we want it to work from the bus notifier, we can fix it later and
> remove confusing calls of set_iommu_table_base().
>
> This replaces set_iommu_table_base_and_group() with a couple of
> set_iommu_table_base() + iommu_add_device() which makes reading the code
> easier.
>
> This adds few comments why set_iommu_table_base() and iommu_add_device()
> are called where they are called.
>
> For IODA1/2, this essentially removes iommu_add_device() call from
> the pnv_pci_ioda_dma_dev_setup() as it will always fail at this particular
> place:
> - for physical PE, the device is already attached by iommu_add_device()
> in pnv_pci_ioda_setup_dma_pe();
> - for virtual PE, the sysfs entries are not ready to create all symlinks
> so actual adding is happening in tce_iommu_bus_notifier.
>
> Signed-off-by: Alexey Kardashevskiy <aik@...abs.ru>
> Reviewed-by: Gavin Shan <gwshan@...ux.vnet.ibm.com>
Reviewed-by: David Gibson <david@...son.dropbear.id.au>
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
Content of type "application/pgp-signature" skipped
Powered by blists - more mailing lists