mirror of
https://github.com/torvalds/linux.git
synced 2024-12-14 07:02:23 +00:00
powerpc/powernv/npu: Remove redundant change_pte() hook
The change_pte() notifier was designed to use as a quick path to update secondary MMU PTEs on write permission changes or PFN changes. For KVM, it could reduce the vm-exits when vcpu faults on the pages that was touched up by KSM. It's not used to do cache invalidations, for example, if we see the notifier will be called before the real PTE update after all (please see set_pte_at_notify that set_pte_at was called later). All the necessary cache invalidation should all be done in invalidate_range() already. Signed-off-by: Peter Xu <peterx@redhat.com> Reviewed-by: Andrea Arcangeli <aarcange@redhat.com> Reviewed-by: Alistair Popple <alistair@popple.id.au> Reviewed-by: Balbir Singh <bsingharora@gmail.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
This commit is contained in:
parent
e121ee6bc3
commit
1b58a975be
@ -913,15 +913,6 @@ static void pnv_npu2_mn_release(struct mmu_notifier *mn,
|
||||
mmio_invalidate(npu_context, 0, ~0UL);
|
||||
}
|
||||
|
||||
static void pnv_npu2_mn_change_pte(struct mmu_notifier *mn,
|
||||
struct mm_struct *mm,
|
||||
unsigned long address,
|
||||
pte_t pte)
|
||||
{
|
||||
struct npu_context *npu_context = mn_to_npu_context(mn);
|
||||
mmio_invalidate(npu_context, address, PAGE_SIZE);
|
||||
}
|
||||
|
||||
static void pnv_npu2_mn_invalidate_range(struct mmu_notifier *mn,
|
||||
struct mm_struct *mm,
|
||||
unsigned long start, unsigned long end)
|
||||
@ -932,7 +923,6 @@ static void pnv_npu2_mn_invalidate_range(struct mmu_notifier *mn,
|
||||
|
||||
static const struct mmu_notifier_ops nv_nmmu_notifier_ops = {
|
||||
.release = pnv_npu2_mn_release,
|
||||
.change_pte = pnv_npu2_mn_change_pte,
|
||||
.invalidate_range = pnv_npu2_mn_invalidate_range,
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user