Files
android_kernel_xiaomi_sm8450/arch/powerpc/kernel
Alexey Kardashevskiy d905c5df9a PPC: POWERNV: move iommu_add_device earlier
The current implementation of IOMMU on sPAPR does not use iommu_ops
and therefore does not call IOMMU API's bus_set_iommu() which
1) sets iommu_ops for a bus
2) registers a bus notifier
Instead, PCI devices are added to IOMMU groups from
subsys_initcall_sync(tce_iommu_init) which does basically the same
thing without using iommu_ops callbacks.

However Freescale PAMU driver (https://lkml.org/lkml/2013/7/1/158)
implements iommu_ops and when tce_iommu_init is called, every PCI device
is already added to some group so there is a conflict.

This patch does 2 things:
1. removes the loop in which PCI devices were added to groups and
adds explicit iommu_add_device() calls to add devices as soon as they get
the iommu_table pointer assigned to them.
2. moves a bus notifier to powernv code in order to avoid conflict with
the notifier from Freescale driver.

iommu_add_device() and iommu_del_device() are public now.

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2013-12-05 16:08:17 +11:00
..
2012-03-28 18:30:02 +01:00
2013-11-21 10:33:36 +11:00
2013-10-11 16:53:26 +11:00
2013-10-11 16:48:34 +11:00
2011-11-28 21:13:18 +02:00
2011-03-31 11:26:23 -03:00
2013-10-11 18:23:53 +11:00
2011-03-31 11:26:23 -03:00
2013-08-14 15:33:22 +10:00
2010-07-19 10:56:54 +02:00
2011-03-31 11:26:23 -03:00
2012-03-28 18:30:02 +01:00
2013-11-21 10:33:43 +11:00