• Home
  • Raw
  • Download

Lines Matching full:device

11 #include <linux/device.h>
58 struct device;
68 typedef int (*iommu_fault_handler_t)(struct iommu_domain *, struct device *, unsigned long, int, vo…
150 * for instance in device assignment use case (USB, Graphics)
153 /* Arbitrary "never map this or give it to a device" address ranges */
177 /* Per device IOMMU features */
209 * @attach_dev: attach device to an iommu domain
210 * @detach_dev: detach device from an iommu domain
223 * @probe_device: Add device to iommu driver handling
224 * @release_device: Remove device from iommu driver handling
225 * @probe_finalize: Do final setup work after the device is added to an IOMMU
227 * @device_group: find iommu group for a particular device
230 * @get_resv_regions: Request list of reserved regions for a device
231 * @put_resv_regions: Free list of reserved regions for a device
237 * driver init to device driver init (default no)
238 * @dev_has/enable/disable_feat: per device entries to check/enable/disable
243 * @sva_bind: Bind process address space to device
244 * @sva_unbind: Unbind process address space from device
250 * @def_domain_type: device default domain type, return value:
264 int (*attach_dev)(struct iommu_domain *domain, struct device *dev);
265 void (*detach_dev)(struct iommu_domain *domain, struct device *dev);
279 struct iommu_device *(*probe_device)(struct device *dev);
280 void (*release_device)(struct device *dev);
281 void (*probe_finalize)(struct device *dev);
282 struct iommu_group *(*device_group)(struct device *dev);
286 /* Request/Free a list of reserved regions for a device */
287 void (*get_resv_regions)(struct device *dev, struct list_head *list);
288 void (*put_resv_regions)(struct device *dev, struct list_head *list);
289 …void (*apply_resv_region)(struct device *dev, struct iommu_domain *domain, struct iommu_resv_regio…
295 int (*of_xlate)(struct device *dev, struct of_phandle_args *args);
296 bool (*is_attach_deferred)(struct iommu_domain *domain, struct device *dev);
298 /* Per device IOMMU features */
299 bool (*dev_has_feat)(struct device *dev, enum iommu_dev_features f);
300 bool (*dev_feat_enabled)(struct device *dev, enum iommu_dev_features f);
301 int (*dev_enable_feat)(struct device *dev, enum iommu_dev_features f);
302 int (*dev_disable_feat)(struct device *dev, enum iommu_dev_features f);
305 int (*aux_attach_dev)(struct iommu_domain *domain, struct device *dev);
306 void (*aux_detach_dev)(struct iommu_domain *domain, struct device *dev);
307 int (*aux_get_pasid)(struct iommu_domain *domain, struct device *dev);
309 struct iommu_sva *(*sva_bind)(struct device *dev, struct mm_struct *mm, void *drvdata);
313 …int (*page_response)(struct device *dev, struct iommu_fault_event *evt, struct iommu_page_response…
314 int (*cache_invalidate)(struct iommu_domain *domain, struct device *dev,
316 …int (*sva_bind_gpasid)(struct iommu_domain *domain, struct device *dev, struct iommu_gpasid_bind_d…
318 int (*sva_unbind_gpasid)(struct device *dev, u32 pasid);
320 int (*def_domain_type)(struct device *dev);
331 * @dev: struct device for sysfs handling
337 struct device *dev;
355 * struct iommu_fault_param - per-device IOMMU fault data
356 * @handler: Callback function to handle IOMMU faults at device level
369 * struct dev_iommu - Collection of per-device IOMMU data
371 * @fault_param: IOMMU detected device fault reporting data
373 * @iommu_dev: IOMMU device this device is linked to
376 * migrate other per device data pointers under iommu_dev_data, e.g.
389 int iommu_device_sysfs_add(struct iommu_device *iommu, struct device *parent, const struct attribut…
392 int iommu_device_link(struct iommu_device *iommu, struct device *link);
393 void iommu_device_unlink(struct iommu_device *iommu, struct device *link);
412 static inline struct iommu_device *dev_to_iommu_device(struct device *dev) in dev_to_iommu_device()
424 #define IOMMU_GROUP_NOTIFY_ADD_DEVICE 1 /* Device added */
425 #define IOMMU_GROUP_NOTIFY_DEL_DEVICE 2 /* Pre Device removed */
438 extern int iommu_attach_device(struct iommu_domain *domain, struct device *dev);
439 extern void iommu_detach_device(struct iommu_domain *domain, struct device *dev);
440 extern int iommu_uapi_cache_invalidate(struct iommu_domain *domain, struct device *dev, void __user…
442 extern int iommu_uapi_sva_bind_gpasid(struct iommu_domain *domain, struct device *dev, void __user …
443 extern int iommu_uapi_sva_unbind_gpasid(struct iommu_domain *domain, struct device *dev, void __use…
444 extern int iommu_sva_unbind_gpasid(struct iommu_domain *domain, struct device *dev, ioasid_t pasid);
445 extern struct iommu_domain *iommu_get_domain_for_dev(struct device *dev);
446 extern struct iommu_domain *iommu_get_dma_domain(struct device *dev);
459 extern void iommu_get_resv_regions(struct device *dev, struct list_head *list);
460 extern void iommu_put_resv_regions(struct device *dev, struct list_head *list);
461 extern void generic_iommu_put_resv_regions(struct device *dev, struct list_head *list);
475 extern int iommu_group_add_device(struct iommu_group *group, struct device *dev);
476 extern void iommu_group_remove_device(struct device *dev);
477 extern int iommu_group_for_each_dev(struct iommu_group *group, void *data, int (*fn)(struct device
478 extern struct iommu_group *iommu_group_get(struct device *dev);
483 extern int iommu_register_device_fault_handler(struct device *dev, iommu_dev_fault_handler_t handle…
485 extern int iommu_unregister_device_fault_handler(struct device *dev);
487 extern int iommu_report_device_fault(struct device *dev, struct iommu_fault_event *evt);
488 extern int iommu_page_response(struct device *dev, struct iommu_page_response *msg);
500 extern int report_iommu_fault(struct iommu_domain *domain, struct device *dev, unsigned long iova, …
544 /* PCI device grouping function */
545 extern struct iommu_group *pci_device_group(struct device *dev);
546 /* Generic device grouping function */
547 extern struct iommu_group *generic_device_group(struct device *dev);
548 extern void rk_iommu_mask_irq(struct device *dev);
549 extern void rk_iommu_unmask_irq(struct device *dev);
550 /* FSL-MC device grouping function */
551 struct iommu_group *fsl_mc_device_group(struct device *dev);
554 * struct iommu_fwspec - per-device IOMMU instance data
555 * @ops: ops for this device's IOMMU
556 * @iommu_fwnode: firmware handle for this device's IOMMU
557 * @iommu_priv: IOMMU driver private data for this device
558 * @num_pasid_bits: number of PASID bits supported by this device
559 * @num_ids: number of associated device IDs
560 * @ids: IDs which this device may present to the IOMMU
575 * struct iommu_sva - handle to a device-mm bond
578 struct device *dev;
581 int iommu_fwspec_init(struct device *dev, struct fwnode_handle *iommu_fwnode, const struct iommu_op…
582 void iommu_fwspec_free(struct device *dev);
583 int iommu_fwspec_add_ids(struct device *dev, u32 *ids, int num_ids);
586 static inline struct iommu_fwspec *dev_iommu_fwspec_get(struct device *dev) in dev_iommu_fwspec_get()
595 static inline void dev_iommu_fwspec_set(struct device *dev, struct iommu_fwspec *fwspec) in dev_iommu_fwspec_set()
600 static inline void *dev_iommu_priv_get(struct device *dev) in dev_iommu_priv_get()
609 static inline void dev_iommu_priv_set(struct device *dev, void *priv) in dev_iommu_priv_set()
614 int iommu_probe_device(struct device *dev);
615 void iommu_release_device(struct device *dev);
617 bool iommu_dev_has_feature(struct device *dev, enum iommu_dev_features f);
618 int iommu_dev_enable_feature(struct device *dev, enum iommu_dev_features f);
619 int iommu_dev_disable_feature(struct device *dev, enum iommu_dev_features f);
620 bool iommu_dev_feature_enabled(struct device *dev, enum iommu_dev_features f);
621 int iommu_aux_attach_device(struct iommu_domain *domain, struct device *dev);
622 void iommu_aux_detach_device(struct iommu_domain *domain, struct device *dev);
623 int iommu_aux_get_pasid(struct iommu_domain *domain, struct device *dev);
625 struct iommu_sva *iommu_sva_bind_device(struct device *dev, struct mm_struct *mm, void *drvdata);
668 static inline int iommu_attach_device(struct iommu_domain *domain, struct device *dev) in iommu_attach_device()
673 static inline void iommu_detach_device(struct iommu_domain *domain, struct device *dev) in iommu_detach_device()
677 static inline struct iommu_domain *iommu_get_domain_for_dev(struct device *dev) in iommu_get_domain_for_dev()
743 static inline void iommu_get_resv_regions(struct device *dev, struct list_head *list) in iommu_get_resv_regions()
747 static inline void iommu_put_resv_regions(struct device *dev, struct list_head *list) in iommu_put_resv_regions()
798 static inline int iommu_group_add_device(struct iommu_group *group, struct device *dev) in iommu_group_add_device()
803 static inline void iommu_group_remove_device(struct device *dev) in iommu_group_remove_device()
807 …iommu_group_for_each_dev(struct iommu_group *group, void *data, int (*fn)(struct device *, void *)) in iommu_group_for_each_dev() argument
812 static inline struct iommu_group *iommu_group_get(struct device *dev) in iommu_group_get()
831 static inline int iommu_register_device_fault_handler(struct device *dev, iommu_dev_fault_handler_t… in iommu_register_device_fault_handler()
836 static inline int iommu_unregister_device_fault_handler(struct device *dev) in iommu_unregister_device_fault_handler()
841 static inline int iommu_report_device_fault(struct device *dev, struct iommu_fault_event *evt) in iommu_report_device_fault()
846 static inline int iommu_page_response(struct device *dev, struct iommu_page_response *msg) in iommu_page_response()
879 static inline struct iommu_device *dev_to_iommu_device(struct device *dev) in dev_to_iommu_device()
897 static inline int iommu_device_sysfs_add(struct iommu_device *iommu, struct device *parent, in iommu_device_sysfs_add()
907 static inline int iommu_device_link(struct device *dev, struct device *link) in iommu_device_link()
912 static inline void iommu_device_unlink(struct device *dev, struct device *link) in iommu_device_unlink()
916 static inline int iommu_fwspec_init(struct device *dev, struct fwnode_handle *iommu_fwnode, const s… in iommu_fwspec_init()
921 static inline void iommu_fwspec_free(struct device *dev) in iommu_fwspec_free()
925 static inline int iommu_fwspec_add_ids(struct device *dev, u32 *ids, int num_ids) in iommu_fwspec_add_ids()
935 static inline bool iommu_dev_has_feature(struct device *dev, enum iommu_dev_features feat) in iommu_dev_has_feature()
940 static inline bool iommu_dev_feature_enabled(struct device *dev, enum iommu_dev_features feat) in iommu_dev_feature_enabled()
945 static inline int iommu_dev_enable_feature(struct device *dev, enum iommu_dev_features feat) in iommu_dev_enable_feature()
950 static inline int iommu_dev_disable_feature(struct device *dev, enum iommu_dev_features feat) in iommu_dev_disable_feature()
955 static inline int iommu_aux_attach_device(struct iommu_domain *domain, struct device *dev) in iommu_aux_attach_device()
960 static inline void iommu_aux_detach_device(struct iommu_domain *domain, struct device *dev) in iommu_aux_detach_device()
964 static inline int iommu_aux_get_pasid(struct iommu_domain *domain, struct device *dev) in iommu_aux_get_pasid()
969 static inline struct iommu_sva *iommu_sva_bind_device(struct device *dev, struct mm_struct *mm, voi… in iommu_sva_bind_device()
983 static inline int iommu_uapi_cache_invalidate(struct iommu_domain *domain, struct device *dev, in iommu_uapi_cache_invalidate()
989 static inline int iommu_uapi_sva_bind_gpasid(struct iommu_domain *domain, struct device *dev, void … in iommu_uapi_sva_bind_gpasid()
994 static inline int iommu_uapi_sva_unbind_gpasid(struct iommu_domain *domain, struct device *dev, voi… in iommu_uapi_sva_unbind_gpasid()
999 static inline int iommu_sva_unbind_gpasid(struct iommu_domain *domain, struct device *dev, ioasid_t… in iommu_sva_unbind_gpasid()
1004 static inline struct iommu_fwspec *dev_iommu_fwspec_get(struct device *dev) in dev_iommu_fwspec_get()
1009 static inline void rk_iommu_mask_irq(struct device *dev) in rk_iommu_mask_irq()
1013 static inline void rk_iommu_unmask_irq(struct device *dev) in rk_iommu_unmask_irq()