Skip to content

Commit 5a63f0a

Browse files
xzpeterjoergroedel
authored andcommitted
iommu/amd: Remove clear_flush_young notifier
AMD IOMMU driver is using the clear_flush_young() to do cache flushing but that's actually already covered by invalidate_range(). Remove the extra notifier and the chunks. Signed-off-by: Peter Xu <peterx@redhat.com> Signed-off-by: Joerg Roedel <jroedel@suse.de>
1 parent 2e6c6a8 commit 5a63f0a

File tree

1 file changed

+0
-24
lines changed

1 file changed

+0
-24
lines changed

drivers/iommu/amd_iommu_v2.c

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -370,29 +370,6 @@ static struct pasid_state *mn_to_state(struct mmu_notifier *mn)
370370
return container_of(mn, struct pasid_state, mn);
371371
}
372372

373-
static void __mn_flush_page(struct mmu_notifier *mn,
374-
unsigned long address)
375-
{
376-
struct pasid_state *pasid_state;
377-
struct device_state *dev_state;
378-
379-
pasid_state = mn_to_state(mn);
380-
dev_state = pasid_state->device_state;
381-
382-
amd_iommu_flush_page(dev_state->domain, pasid_state->pasid, address);
383-
}
384-
385-
static int mn_clear_flush_young(struct mmu_notifier *mn,
386-
struct mm_struct *mm,
387-
unsigned long start,
388-
unsigned long end)
389-
{
390-
for (; start < end; start += PAGE_SIZE)
391-
__mn_flush_page(mn, start);
392-
393-
return 0;
394-
}
395-
396373
static void mn_invalidate_range(struct mmu_notifier *mn,
397374
struct mm_struct *mm,
398375
unsigned long start, unsigned long end)
@@ -430,7 +407,6 @@ static void mn_release(struct mmu_notifier *mn, struct mm_struct *mm)
430407

431408
static const struct mmu_notifier_ops iommu_mn = {
432409
.release = mn_release,
433-
.clear_flush_young = mn_clear_flush_young,
434410
.invalidate_range = mn_invalidate_range,
435411
};
436412

0 commit comments

Comments
 (0)