mmu_notifier: add event information to address invalidation v3
authorJérôme Glisse <jglisse@redhat.com>
Fri, 2 Aug 2013 19:17:24 +0000 (15:17 -0400)
committerSri Krishna Chowdary <schowdary@nvidia.com>
Wed, 3 Jun 2015 06:55:12 +0000 (23:55 -0700)
commit5bd2db65139518d3443045a5928810619958a93b
tree01f7a4889b8d49243261856fe6e915ead4c7b4d5
parent1b2a47320c0971390f3f5bb44473d0a06ee8e660
mmu_notifier: add event information to address invalidation v3

The event information will be usefull for new user of mmu_notifier API.
The event argument differentiate between a vma disappearing, a page
being write protected or simply a page being unmaped. This allow new
user to take different path for different event for instance on unmap
the resource used to track a vma are still valid and should stay around.
While if the event is saying that a vma is being destroy it means that any
resources used to track this vma can be free.

Changed since v1:
  - renamed action into event (updated commit message too).
  - simplified the event names and clarified their intented usage
    also documenting what exceptation the listener can have in
    respect to each event.

Changed since v2:
  - Avoid crazy name.
  - Do not move code that do not need to move.

Signed-off-by: Jérôme Glisse <jglisse@redhat.com>
(cherry picked from commit ebed63225a6939121d313b2ddd4737fc60d2f0a1)

Conflicts:
drivers/gpu/drm/i915/i915_gem_userptr.c
fs/proc/task_mmu.c
kernel/events/uprobes.c
mm/huge_memory.c
mm/hugetlb.c
mm/ksm.c
mm/migrate.c
mm/rmap.c
include/linux/mmu_notifier.h

Bug 200074285

Change-Id: Ief91a665128bcb4ac5e6fa7dd60215285be54f20
Signed-off-by: Sri Krishna chowdary <schowdary@nvidia.com>
Reviewed-on: http://git-master/r/678260
Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-by: Hiroshi Doyu <hdoyu@nvidia.com>
17 files changed:
drivers/iommu/amd_iommu_v2.c
drivers/misc/sgi-gru/grutlbpurge.c
drivers/xen/gntdev.c
include/linux/mmu_notifier.h
kernel/events/uprobes.c
mm/filemap_xip.c
mm/fremap.c
mm/huge_memory.c
mm/hugetlb.c
mm/ksm.c
mm/memory.c
mm/migrate.c
mm/mmu_notifier.c
mm/mprotect.c
mm/mremap.c
mm/rmap.c
virt/kvm/kvm_main.c