1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /* Copyright (c) 2023, NVIDIA CORPORATION & AFFILIATES.
4 #ifndef __LINUX_IOMMU_PRIV_H
5 #define __LINUX_IOMMU_PRIV_H
7 #include <linux/iommu.h>
9 static inline const struct iommu_ops *dev_iommu_ops(struct device *dev)
12 * Assume that valid ops must be installed if iommu_probe_device()
13 * has succeeded. The device ops are essentially for internal use
14 * within the IOMMU subsystem itself, so we should be able to trust
15 * ourselves not to misuse the helper.
17 return dev->iommu->iommu_dev->ops;
20 int iommu_group_replace_domain(struct iommu_group *group,
21 struct iommu_domain *new_domain);
23 int iommu_device_register_bus(struct iommu_device *iommu,
24 const struct iommu_ops *ops, struct bus_type *bus,
25 struct notifier_block *nb);
26 void iommu_device_unregister_bus(struct iommu_device *iommu,
28 struct notifier_block *nb);
30 #endif /* __LINUX_IOMMU_PRIV_H */