Displaying 12 results from an estimated 12 matches for "bus_iommu_prob".
Did you mean:
bus_iommu_probe
2020 Apr 14
0
[PATCH v2 13/33] iommu: Export bus_iommu_probe() and make is safe for re-probing
From: Joerg Roedel <jroedel at suse.de>
Add a check to the bus_iommu_probe() call-path to make sure it ignores
devices which have already been successfully probed. Then export the
bus_iommu_probe() function so it can be used by IOMMU drivers.
Signed-off-by: Joerg Roedel <jroedel at suse.de>
---
drivers/iommu/iommu.c | 6 +++++-
include/linux/iommu.h | 1 +
2 file...
2020 Apr 15
0
[PATCH v2 13/33] iommu: Export bus_iommu_probe() and make is safe for re-probing
Hi Baolu,
On Wed, Apr 15, 2020 at 02:10:03PM +0800, Lu Baolu wrote:
> On 2020/4/14 21:15, Joerg Roedel wrote:
> > > + /* Device is probed already if in a group */
> > + if (iommu_group_get(dev) != NULL)
>
> Same as
> if (iommu_group_get(dev))
> ?
>
> By the way, do we need to put the group if device has already been
> probed?
Right, fixed both, thank
2020 Apr 14
0
[PATCH v2 28/33] iommu/omap: Remove orphan_dev tracking
From: Joerg Roedel <jroedel at suse.de>
Remove the tracking of device which could not be probed because
their IOMMU is not probed yet. Replace it with a call to
bus_iommu_probe() when a new IOMMU is probed.
Signed-off-by: Joerg Roedel <jroedel at suse.de>
---
drivers/iommu/omap-iommu.c | 54 +++-----------------------------------
1 file changed, 4 insertions(+), 50 deletions(-)
diff --git a/drivers/iommu/omap-iommu.c b/drivers/iommu/omap-iommu.c
index 887fefcb03...
2020 Apr 14
0
[PATCH v2 12/33] iommu: Move iommu_group_create_direct_mappings() out of iommu_group_add_device()
...a)
+{
+ struct iommu_group *group = data;
+
+ iommu_create_device_direct_mappings(group, dev);
+
+ return 0;
+}
+
+static int iommu_group_create_direct_mappings(struct iommu_group *group)
+{
+ return __iommu_group_for_each_dev(group, group,
+ iommu_do_create_direct_mappings);
+}
+
static int bus_iommu_probe(struct bus_type *bus)
{
const struct iommu_ops *ops = bus->iommu_ops;
@@ -1792,6 +1815,8 @@ static int bus_iommu_probe(struct bus_type *bus)
continue;
}
+ iommu_group_create_direct_mappings(group);
+
ret = __iommu_group_dma_attach(group);
mutex_unlock(&group->mu...
2020 Apr 14
0
[PATCH v2 11/33] iommu: Split off default domain allocation from group assignment
...;ops;
+
+ if (ret == 0 && ops->probe_finalize)
+ ops->probe_finalize(dev);
+
+ return ret;
+}
+
+static int __iommu_group_dma_attach(struct iommu_group *group)
+{
+ return __iommu_group_for_each_dev(group, group->default_domain,
+ iommu_group_do_dma_attach);
+}
+
+static int bus_iommu_probe(struct bus_type *bus)
+{
+ const struct iommu_ops *ops = bus->iommu_ops;
+ int ret;
+
+ if (ops->probe_device) {
+ struct iommu_group *group, *next;
+ LIST_HEAD(group_list);
+
+ /*
+ * This code-path does not allocate the default domain when
+ * creating the iommu group, so do it afte...
2020 Apr 14
35
[PATCH v2 00/33] iommu: Move iommu_group setup to IOMMU core code
...ice()
iommu: Keep a list of allocated groups in __iommu_probe_device()
iommu: Move new probe_device path to separate function
iommu: Split off default domain allocation from group assignment
iommu: Move iommu_group_create_direct_mappings() out of
iommu_group_add_device()
iommu: Export bus_iommu_probe() and make is safe for re-probing
iommu/amd: Remove dev_data->passthrough
iommu/amd: Convert to probe/release_device() call-backs
iommu/vt-d: Convert to probe/release_device() call-backs
iommu/arm-smmu: Convert to probe/release_device() call-backs
iommu/pamu: Convert to probe/release_...
2020 Apr 14
35
[PATCH v2 00/33] iommu: Move iommu_group setup to IOMMU core code
...ice()
iommu: Keep a list of allocated groups in __iommu_probe_device()
iommu: Move new probe_device path to separate function
iommu: Split off default domain allocation from group assignment
iommu: Move iommu_group_create_direct_mappings() out of
iommu_group_add_device()
iommu: Export bus_iommu_probe() and make is safe for re-probing
iommu/amd: Remove dev_data->passthrough
iommu/amd: Convert to probe/release_device() call-backs
iommu/vt-d: Convert to probe/release_device() call-backs
iommu/arm-smmu: Convert to probe/release_device() call-backs
iommu/pamu: Convert to probe/release_...
2020 Apr 29
35
[PATCH v3 00/34] iommu: Move iommu_group setup to IOMMU core code
...ice()
iommu: Keep a list of allocated groups in __iommu_probe_device()
iommu: Move new probe_device path to separate function
iommu: Split off default domain allocation from group assignment
iommu: Move iommu_group_create_direct_mappings() out of
iommu_group_add_device()
iommu: Export bus_iommu_probe() and make is safe for re-probing
iommu/amd: Remove dev_data->passthrough
iommu/amd: Convert to probe/release_device() call-backs
iommu/vt-d: Convert to probe/release_device() call-backs
iommu/arm-smmu: Convert to probe/release_device() call-backs
iommu/pamu: Convert to probe/release_...
2020 Apr 07
41
[RFC PATCH 00/34] iommu: Move iommu_group setup to IOMMU core code
...ice()
iommu: Keep a list of allocated groups in __iommu_probe_device()
iommu: Move new probe_device path to separate function
iommu: Split off default domain allocation from group assignment
iommu: Move iommu_group_create_direct_mappings() out of
iommu_group_add_device()
iommu: Export bus_iommu_probe() and make is safe for re-probing
iommu/amd: Remove dev_data->passthrough
iommu/amd: Convert to probe/release_device() call-backs
iommu/vt-d: Convert to probe/release_device() call-backs
iommu/arm-smmu: Store device instead of group in arm_smmu_s2cr
iommu/arm-smmu: Convert to probe/re...
2020 Apr 07
41
[RFC PATCH 00/34] iommu: Move iommu_group setup to IOMMU core code
...ice()
iommu: Keep a list of allocated groups in __iommu_probe_device()
iommu: Move new probe_device path to separate function
iommu: Split off default domain allocation from group assignment
iommu: Move iommu_group_create_direct_mappings() out of
iommu_group_add_device()
iommu: Export bus_iommu_probe() and make is safe for re-probing
iommu/amd: Remove dev_data->passthrough
iommu/amd: Convert to probe/release_device() call-backs
iommu/vt-d: Convert to probe/release_device() call-backs
iommu/arm-smmu: Store device instead of group in arm_smmu_s2cr
iommu/arm-smmu: Convert to probe/re...
2020 Apr 09
0
[PATCH] iommu/exynos: Get rid of 'struct exynos_iommu_owner' exynos_iommu_owner
...milar problem on OMAP. If the SYSMMU for a master is not
probed yet when probe_device() is called, it can just return -ENODEV and
in your driver you just call but_iommu_probe() when a new SYSMMU got
initialized to re-probe uninitialized masters on the bus. This patch-set
contains a change to export bus_iommu_probe() for exactly that reason.
What do you think?
Regards,
Joerg
2020 Apr 14
0
[PATCH v2 32/33] iommu: Remove add_device()/remove_device() code-paths
...ey happen.
- */
- if (ret == -ENODEV)
- ret = 0;
-
- return ret;
-}
-
static int probe_iommu_group(struct device *dev, void *data)
{
const struct iommu_ops *ops = dev->bus->iommu_ops;
@@ -1789,47 +1704,41 @@ static int iommu_group_create_direct_mappings(struct iommu_group *group)
int bus_iommu_probe(struct bus_type *bus)
{
- const struct iommu_ops *ops = bus->iommu_ops;
+ struct iommu_group *group, *next;
+ LIST_HEAD(group_list);
int ret;
- if (ops->probe_device) {
- struct iommu_group *group, *next;
- LIST_HEAD(group_list);
-
- /*
- * This code-path does not allocate the defa...