]> www.infradead.org Git - users/willy/pagecache.git/commitdiff
Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jgg/iommufd.git
authorStephen Rothwell <sfr@canb.auug.org.au>
Mon, 31 Jul 2023 03:16:45 +0000 (13:16 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 31 Jul 2023 03:16:46 +0000 (13:16 +1000)
1  2 
drivers/iommu/iommu.c
drivers/iommu/iommufd/device.c
drivers/iommu/iommufd/iommufd_private.h
drivers/iommu/iommufd/main.c

Simple merge
Simple merge
index 0349d7aea59ad321755b959021f3642bb1111281,8ba786bc95ff8ab655777e2747d9a63f0e3cd864..da84aed5ad9375023c8ce473a953c0a586fbc888
@@@ -267,11 -255,34 +266,34 @@@ struct iommufd_hw_pagetable 
  struct iommufd_hw_pagetable *
  iommufd_hw_pagetable_alloc(struct iommufd_ctx *ictx, struct iommufd_ioas *ioas,
                           struct iommufd_device *idev, bool immediate_attach);
+ int iommufd_hw_pagetable_enforce_cc(struct iommufd_hw_pagetable *hwpt);
  int iommufd_hw_pagetable_attach(struct iommufd_hw_pagetable *hwpt,
                                struct iommufd_device *idev);
- void iommufd_hw_pagetable_detach(struct iommufd_hw_pagetable *hwpt,
                               struct iommufd_device *idev);
+ struct iommufd_hw_pagetable *
iommufd_hw_pagetable_detach(struct iommufd_device *idev);
  void iommufd_hw_pagetable_destroy(struct iommufd_object *obj);
 -              iommufd_object_destroy_user(ictx, &hwpt->obj);
+ void iommufd_hw_pagetable_abort(struct iommufd_object *obj);
+ int iommufd_hwpt_alloc(struct iommufd_ucmd *ucmd);
+ static inline void iommufd_hw_pagetable_put(struct iommufd_ctx *ictx,
+                                           struct iommufd_hw_pagetable *hwpt)
+ {
+       lockdep_assert_not_held(&hwpt->ioas->mutex);
+       if (hwpt->auto_domain)
++              iommufd_object_deref_user(ictx, &hwpt->obj);
+       else
+               refcount_dec(&hwpt->obj.users);
+ }
+ struct iommufd_group {
+       struct kref ref;
+       struct mutex lock;
+       struct iommufd_ctx *ictx;
+       struct iommu_group *group;
+       struct iommufd_hw_pagetable *hwpt;
+       struct list_head device_list;
+       phys_addr_t sw_msi_start;
+ };
  
  /*
   * A iommufd_device object represents the binding relationship between a
Simple merge