diff options
author | Jérôme Glisse <jglisse@redhat.com> | 2017-08-31 17:17:29 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-08-31 19:12:59 -0400 |
commit | c90270a9f11b455102874c15c4c9c1dabb0d030b (patch) | |
tree | 4a74a2857a9e8460661c774a9f10059b2b330f2e /drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c | |
parent | d1d5762e4767324ce4ec32f9b2d2aaccfd87f664 (diff) |
drm/amdgpu: update to new mmu_notifier semantic
Calls to mmu_notifier_invalidate_page() were replaced by calls to
mmu_notifier_invalidate_range() and are now bracketed by calls to
mmu_notifier_invalidate_range_start()/end()
Remove now useless invalidate_page callback.
Signed-off-by: Jérôme Glisse <jglisse@redhat.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Cc: amd-gfx@lists.freedesktop.org
Cc: Felix Kuehling <Felix.Kuehling@amd.com>
Cc: Christian König <christian.koenig@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c index 6558a3ed57a7..e1cde6b80027 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c | |||
@@ -147,36 +147,6 @@ static void amdgpu_mn_invalidate_node(struct amdgpu_mn_node *node, | |||
147 | } | 147 | } |
148 | 148 | ||
149 | /** | 149 | /** |
150 | * amdgpu_mn_invalidate_page - callback to notify about mm change | ||
151 | * | ||
152 | * @mn: our notifier | ||
153 | * @mn: the mm this callback is about | ||
154 | * @address: address of invalidate page | ||
155 | * | ||
156 | * Invalidation of a single page. Blocks for all BOs mapping it | ||
157 | * and unmap them by move them into system domain again. | ||
158 | */ | ||
159 | static void amdgpu_mn_invalidate_page(struct mmu_notifier *mn, | ||
160 | struct mm_struct *mm, | ||
161 | unsigned long address) | ||
162 | { | ||
163 | struct amdgpu_mn *rmn = container_of(mn, struct amdgpu_mn, mn); | ||
164 | struct interval_tree_node *it; | ||
165 | |||
166 | mutex_lock(&rmn->lock); | ||
167 | |||
168 | it = interval_tree_iter_first(&rmn->objects, address, address); | ||
169 | if (it) { | ||
170 | struct amdgpu_mn_node *node; | ||
171 | |||
172 | node = container_of(it, struct amdgpu_mn_node, it); | ||
173 | amdgpu_mn_invalidate_node(node, address, address); | ||
174 | } | ||
175 | |||
176 | mutex_unlock(&rmn->lock); | ||
177 | } | ||
178 | |||
179 | /** | ||
180 | * amdgpu_mn_invalidate_range_start - callback to notify about mm change | 150 | * amdgpu_mn_invalidate_range_start - callback to notify about mm change |
181 | * | 151 | * |
182 | * @mn: our notifier | 152 | * @mn: our notifier |
@@ -215,7 +185,6 @@ static void amdgpu_mn_invalidate_range_start(struct mmu_notifier *mn, | |||
215 | 185 | ||
216 | static const struct mmu_notifier_ops amdgpu_mn_ops = { | 186 | static const struct mmu_notifier_ops amdgpu_mn_ops = { |
217 | .release = amdgpu_mn_release, | 187 | .release = amdgpu_mn_release, |
218 | .invalidate_page = amdgpu_mn_invalidate_page, | ||
219 | .invalidate_range_start = amdgpu_mn_invalidate_range_start, | 188 | .invalidate_range_start = amdgpu_mn_invalidate_range_start, |
220 | }; | 189 | }; |
221 | 190 | ||