Alexey Kardashevskiy da004c3600 powerpc/iommu: Move tce_xxx callbacks from ppc_md to iommu_table
This adds a iommu_table_ops struct and puts pointer to it into
the iommu_table struct. This moves tce_build/tce_free/tce_get/tce_flush
callbacks from ppc_md to the new struct where they really belong to.

This adds the requirement for @it_ops to be initialized before calling
iommu_init_table() to make sure that we do not leave any IOMMU table
with iommu_table_ops uninitialized. This is not a parameter of
iommu_init_table() though as there will be cases when iommu_init_table()
will not be called on TCE tables, for example - VFIO.

This does s/tce_build/set/, s/tce_free/clear/ and removes "tce_"
redundant prefixes.

This removes tce_xxx_rm handlers from ppc_md but does not add
them to iommu_table_ops as this will be done later if we decide to
support TCE hypercalls in real mode. This removes _vm callbacks as
only virtual mode is supported by now so this also removes @rm parameter.

For pSeries, this always uses tce_buildmulti_pSeriesLP/
tce_buildmulti_pSeriesLP. This changes multi callback to fall back to
tce_build_pSeriesLP/tce_free_pSeriesLP if FW_FEATURE_MULTITCE is not
present. The reason for this is we still have to support "multitce=off"
boot parameter in disable_multitce() and we do not want to walk through
all IOMMU tables in the system and replace "multi" callbacks with single
ones.

For powernv, this defines _ops per PHB type which are P5IOC2/IODA1/IODA2.
This makes the callbacks for them public. Later patches will extend
callbacks for IODA1/2.

No change in behaviour is expected.

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2015-06-11 15:14:56 +10:00
..
2014-08-14 12:48:11 +02:00
2011-03-31 11:26:23 -03:00
2011-03-31 11:26:23 -03:00
2013-04-18 13:03:53 +10:00
2014-04-09 12:53:28 +10:00
2012-03-28 18:30:02 +01:00
2015-04-07 17:15:13 +10:00
2014-01-23 16:36:54 -08:00
2011-11-08 14:51:46 +11:00
2014-06-25 18:49:40 -05:00
2015-01-12 05:04:13 -08:00
2015-02-03 18:47:18 +01:00
2014-11-03 12:12:32 +11:00
2012-03-20 21:48:30 +08:00
2014-12-11 17:48:14 -08:00
2015-02-23 14:52:04 +11:00
2015-04-26 13:23:15 -07:00
2011-07-26 16:49:47 -07:00
2013-12-09 11:40:25 +11:00
2014-07-28 14:10:23 +10:00
2014-11-07 18:10:42 -06:00
2014-07-28 14:10:23 +10:00
2015-06-05 08:32:21 +10:00
2011-03-31 11:26:23 -03:00
2011-03-31 11:26:23 -03:00
2013-11-06 14:13:49 +11:00
2015-03-06 23:21:07 +01:00
2012-09-17 16:31:51 +10:00
2011-03-31 11:26:23 -03:00
2015-05-20 10:42:05 +10:00
2011-03-31 11:26:23 -03:00
2014-02-17 11:19:37 +11:00
2013-10-30 16:02:28 +11:00