[lkml]   [2015]   [Jun]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [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 <>
> Reviewed-by: Gavin Shan <>

Reviewed-by: David Gibson <>

David Gibson | I'll have my music baroque, and my code
david AT | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
[unhandled content-type:application/pgp-signature]
 \ /
  Last update: 2015-06-01 07:01    [W:0.210 / U:3.368 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site