Jason Gunthorpe e36acfe6c8 mm/hmm: Use hmm_mirror not mm as an argument for hmm_range_register
Ralph observes that hmm_range_register() can only be called by a driver
while a mirror is registered. Make this clear in the API by passing in the
mirror structure as a parameter.

This also simplifies understanding the lifetime model for struct hmm, as
the hmm pointer must be valid as part of a registered mirror so all we
need in hmm_register_range() is a simple kref_get.

Suggested-by: Ralph Campbell <rcampbell@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Reviewed-by: John Hubbard <jhubbard@nvidia.com>
Reviewed-by: Ralph Campbell <rcampbell@nvidia.com>
Reviewed-by: Ira Weiny <ira.weiny@intel.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Tested-by: Philip Yang <Philip.Yang@amd.com>
2019-06-10 10:10:30 -03:00
..
2019-05-31 10:38:35 -07:00
2019-06-02 09:27:44 -07:00
2019-05-31 08:34:32 -07:00
2019-05-25 10:11:23 -07:00
2019-05-31 08:34:32 -07:00
2019-05-31 08:34:32 -07:00
2019-05-31 08:34:32 -07:00
2019-06-02 10:14:25 -07:00
2019-05-31 08:34:32 -07:00
2019-05-31 08:34:32 -07:00
2019-05-25 10:11:23 -07:00
2019-05-24 16:02:14 -07:00
2019-06-02 09:26:34 -07:00
2019-06-02 09:26:34 -07:00
2019-05-31 08:34:32 -07:00
2019-05-31 10:53:34 -07:00