blob: 3d377805b29cd52c2e18fbfb4fb7a9cdb07f0102 [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* SPDX-License-Identifier: GPL-2.0 */
Andrea Arcangelicddb8a52008-07-28 15:46:29 -07002#ifndef _LINUX_MMU_NOTIFIER_H
3#define _LINUX_MMU_NOTIFIER_H
4
5#include <linux/list.h>
6#include <linux/spinlock.h>
7#include <linux/mm_types.h>
Sagi Grimberg21a92732012-10-08 16:29:24 -07008#include <linux/srcu.h>
Andrea Arcangelicddb8a52008-07-28 15:46:29 -07009
10struct mmu_notifier;
11struct mmu_notifier_ops;
12
13#ifdef CONFIG_MMU_NOTIFIER
14
15/*
16 * The mmu notifier_mm structure is allocated and installed in
17 * mm->mmu_notifier_mm inside the mm_take_all_locks() protected
18 * critical section and it's released only when mm_count reaches zero
19 * in mmdrop().
20 */
21struct mmu_notifier_mm {
22 /* all mmu notifiers registerd in this mm are queued in this list */
23 struct hlist_head list;
24 /* to serialize the list modifications and hlist_unhashed */
25 spinlock_t lock;
26};
27
Jérôme Glisse5d6527a2018-12-28 00:38:05 -080028struct mmu_notifier_range {
29 struct mm_struct *mm;
30 unsigned long start;
31 unsigned long end;
32 bool blockable;
33};
34
Andrea Arcangelicddb8a52008-07-28 15:46:29 -070035struct mmu_notifier_ops {
36 /*
37 * Called either by mmu_notifier_unregister or when the mm is
38 * being destroyed by exit_mmap, always before all pages are
39 * freed. This can run concurrently with other mmu notifier
40 * methods (the ones invoked outside the mm context) and it
41 * should tear down all secondary mmu mappings and freeze the
42 * secondary mmu. If this method isn't implemented you've to
43 * be sure that nothing could possibly write to the pages
44 * through the secondary mmu by the time the last thread with
45 * tsk->mm == mm exits.
46 *
47 * As side note: the pages freed after ->release returns could
48 * be immediately reallocated by the gart at an alias physical
49 * address with a different cache model, so if ->release isn't
50 * implemented because all _software_ driven memory accesses
51 * through the secondary mmu are terminated by the time the
52 * last thread of this mm quits, you've also to be sure that
53 * speculative _hardware_ operations can't allocate dirty
54 * cachelines in the cpu that could not be snooped and made
55 * coherent with the other read and write operations happening
56 * through the gart alias address, so leading to memory
57 * corruption.
58 */
59 void (*release)(struct mmu_notifier *mn,
60 struct mm_struct *mm);
61
62 /*
63 * clear_flush_young is called after the VM is
64 * test-and-clearing the young/accessed bitflag in the
65 * pte. This way the VM will provide proper aging to the
66 * accesses to the page through the secondary MMUs and not
67 * only to the ones through the Linux pte.
Andres Lagar-Cavilla57128462014-09-22 14:54:42 -070068 * Start-end is necessary in case the secondary MMU is mapping the page
69 * at a smaller granularity than the primary MMU.
Andrea Arcangelicddb8a52008-07-28 15:46:29 -070070 */
71 int (*clear_flush_young)(struct mmu_notifier *mn,
72 struct mm_struct *mm,
Andres Lagar-Cavilla57128462014-09-22 14:54:42 -070073 unsigned long start,
74 unsigned long end);
Andrea Arcangelicddb8a52008-07-28 15:46:29 -070075
76 /*
Vladimir Davydov1d7715c2015-09-09 15:35:41 -070077 * clear_young is a lightweight version of clear_flush_young. Like the
78 * latter, it is supposed to test-and-clear the young/accessed bitflag
79 * in the secondary pte, but it may omit flushing the secondary tlb.
80 */
81 int (*clear_young)(struct mmu_notifier *mn,
82 struct mm_struct *mm,
83 unsigned long start,
84 unsigned long end);
85
86 /*
Andrea Arcangeli8ee53822011-01-13 15:47:10 -080087 * test_young is called to check the young/accessed bitflag in
88 * the secondary pte. This is used to know if the page is
89 * frequently used without actually clearing the flag or tearing
90 * down the secondary mapping on the page.
91 */
92 int (*test_young)(struct mmu_notifier *mn,
93 struct mm_struct *mm,
94 unsigned long address);
95
96 /*
Izik Eidus828502d2009-09-21 17:01:51 -070097 * change_pte is called in cases that pte mapping to page is changed:
98 * for example, when ksm remaps pte to point to a new shared page.
99 */
100 void (*change_pte)(struct mmu_notifier *mn,
101 struct mm_struct *mm,
102 unsigned long address,
103 pte_t pte);
104
105 /*
Andrea Arcangelicddb8a52008-07-28 15:46:29 -0700106 * invalidate_range_start() and invalidate_range_end() must be
107 * paired and are called only when the mmap_sem and/or the
Joerg Roedel0f0a3272014-11-13 13:46:09 +1100108 * locks protecting the reverse maps are held. If the subsystem
109 * can't guarantee that no additional references are taken to
110 * the pages in the range, it has to implement the
111 * invalidate_range() notifier to remove any references taken
112 * after invalidate_range_start().
Andrea Arcangelicddb8a52008-07-28 15:46:29 -0700113 *
114 * Invalidation of multiple concurrent ranges may be
115 * optionally permitted by the driver. Either way the
116 * establishment of sptes is forbidden in the range passed to
117 * invalidate_range_begin/end for the whole duration of the
118 * invalidate_range_begin/end critical section.
119 *
120 * invalidate_range_start() is called when all pages in the
121 * range are still mapped and have at least a refcount of one.
122 *
123 * invalidate_range_end() is called when all pages in the
124 * range have been unmapped and the pages have been freed by
125 * the VM.
126 *
127 * The VM will remove the page table entries and potentially
128 * the page between invalidate_range_start() and
129 * invalidate_range_end(). If the page must not be freed
130 * because of pending I/O or other circumstances then the
131 * invalidate_range_start() callback (or the initial mapping
132 * by the driver) must make sure that the refcount is kept
133 * elevated.
134 *
135 * If the driver increases the refcount when the pages are
136 * initially mapped into an address space then either
137 * invalidate_range_start() or invalidate_range_end() may
138 * decrease the refcount. If the refcount is decreased on
139 * invalidate_range_start() then the VM can free pages as page
140 * table entries are removed. If the refcount is only
141 * droppped on invalidate_range_end() then the driver itself
142 * will drop the last refcount but it must take care to flush
143 * any secondary tlb before doing the final free on the
144 * page. Pages will no longer be referenced by the linux
145 * address space but may still be referenced by sptes until
146 * the last refcount is dropped.
David Rientjes5ff70912018-01-31 16:18:32 -0800147 *
Michal Hocko93065ac2018-08-21 21:52:33 -0700148 * If blockable argument is set to false then the callback cannot
149 * sleep and has to return with -EAGAIN. 0 should be returned
Michal Hocko33490af2018-10-26 15:03:35 -0700150 * otherwise. Please note that if invalidate_range_start approves
151 * a non-blocking behavior then the same applies to
152 * invalidate_range_end.
Michal Hocko93065ac2018-08-21 21:52:33 -0700153 *
Andrea Arcangelicddb8a52008-07-28 15:46:29 -0700154 */
Michal Hocko93065ac2018-08-21 21:52:33 -0700155 int (*invalidate_range_start)(struct mmu_notifier *mn,
Jérôme Glisse5d6527a2018-12-28 00:38:05 -0800156 const struct mmu_notifier_range *range);
Andrea Arcangelicddb8a52008-07-28 15:46:29 -0700157 void (*invalidate_range_end)(struct mmu_notifier *mn,
Jérôme Glisse5d6527a2018-12-28 00:38:05 -0800158 const struct mmu_notifier_range *range);
Joerg Roedel0f0a3272014-11-13 13:46:09 +1100159
160 /*
161 * invalidate_range() is either called between
162 * invalidate_range_start() and invalidate_range_end() when the
163 * VM has to free pages that where unmapped, but before the
164 * pages are actually freed, or outside of _start()/_end() when
165 * a (remote) TLB is necessary.
166 *
167 * If invalidate_range() is used to manage a non-CPU TLB with
168 * shared page-tables, it not necessary to implement the
169 * invalidate_range_start()/end() notifiers, as
170 * invalidate_range() alread catches the points in time when an
Jérôme Glisse0f108512017-11-15 17:34:07 -0800171 * external TLB range needs to be flushed. For more in depth
Mike Rapoportad56b732018-03-21 21:22:47 +0200172 * discussion on this see Documentation/vm/mmu_notifier.rst
Joerg Roedel0f0a3272014-11-13 13:46:09 +1100173 *
Joerg Roedel0f0a3272014-11-13 13:46:09 +1100174 * Note that this function might be called with just a sub-range
175 * of what was passed to invalidate_range_start()/end(), if
176 * called between those functions.
177 */
178 void (*invalidate_range)(struct mmu_notifier *mn, struct mm_struct *mm,
179 unsigned long start, unsigned long end);
Andrea Arcangelicddb8a52008-07-28 15:46:29 -0700180};
181
182/*
183 * The notifier chains are protected by mmap_sem and/or the reverse map
184 * semaphores. Notifier chains are only changed when all reverse maps and
185 * the mmap_sem locks are taken.
186 *
187 * Therefore notifier chains can only be traversed when either
188 *
189 * 1. mmap_sem is held.
Davidlohr Buesoc8c06ef2014-12-12 16:54:24 -0800190 * 2. One of the reverse map locks is held (i_mmap_rwsem or anon_vma->rwsem).
Andrea Arcangelicddb8a52008-07-28 15:46:29 -0700191 * 3. No other concurrent thread can access the list (release)
192 */
193struct mmu_notifier {
194 struct hlist_node hlist;
195 const struct mmu_notifier_ops *ops;
196};
197
198static inline int mm_has_notifiers(struct mm_struct *mm)
199{
200 return unlikely(mm->mmu_notifier_mm);
201}
202
203extern int mmu_notifier_register(struct mmu_notifier *mn,
204 struct mm_struct *mm);
205extern int __mmu_notifier_register(struct mmu_notifier *mn,
206 struct mm_struct *mm);
207extern void mmu_notifier_unregister(struct mmu_notifier *mn,
208 struct mm_struct *mm);
Peter Zijlstrab9722162014-08-06 16:08:20 -0700209extern void mmu_notifier_unregister_no_release(struct mmu_notifier *mn,
210 struct mm_struct *mm);
Andrea Arcangelicddb8a52008-07-28 15:46:29 -0700211extern void __mmu_notifier_mm_destroy(struct mm_struct *mm);
212extern void __mmu_notifier_release(struct mm_struct *mm);
213extern int __mmu_notifier_clear_flush_young(struct mm_struct *mm,
Andres Lagar-Cavilla57128462014-09-22 14:54:42 -0700214 unsigned long start,
215 unsigned long end);
Vladimir Davydov1d7715c2015-09-09 15:35:41 -0700216extern int __mmu_notifier_clear_young(struct mm_struct *mm,
217 unsigned long start,
218 unsigned long end);
Andrea Arcangeli8ee53822011-01-13 15:47:10 -0800219extern int __mmu_notifier_test_young(struct mm_struct *mm,
220 unsigned long address);
Izik Eidus828502d2009-09-21 17:01:51 -0700221extern void __mmu_notifier_change_pte(struct mm_struct *mm,
222 unsigned long address, pte_t pte);
Michal Hocko93065ac2018-08-21 21:52:33 -0700223extern int __mmu_notifier_invalidate_range_start(struct mm_struct *mm,
224 unsigned long start, unsigned long end,
225 bool blockable);
Andrea Arcangelicddb8a52008-07-28 15:46:29 -0700226extern void __mmu_notifier_invalidate_range_end(struct mm_struct *mm,
Jérôme Glisse4645b9f2017-11-15 17:34:11 -0800227 unsigned long start, unsigned long end,
228 bool only_end);
Joerg Roedel0f0a3272014-11-13 13:46:09 +1100229extern void __mmu_notifier_invalidate_range(struct mm_struct *mm,
230 unsigned long start, unsigned long end);
Andrea Arcangelicddb8a52008-07-28 15:46:29 -0700231
232static inline void mmu_notifier_release(struct mm_struct *mm)
233{
234 if (mm_has_notifiers(mm))
235 __mmu_notifier_release(mm);
236}
237
238static inline int mmu_notifier_clear_flush_young(struct mm_struct *mm,
Andres Lagar-Cavilla57128462014-09-22 14:54:42 -0700239 unsigned long start,
240 unsigned long end)
Andrea Arcangelicddb8a52008-07-28 15:46:29 -0700241{
242 if (mm_has_notifiers(mm))
Andres Lagar-Cavilla57128462014-09-22 14:54:42 -0700243 return __mmu_notifier_clear_flush_young(mm, start, end);
Andrea Arcangelicddb8a52008-07-28 15:46:29 -0700244 return 0;
245}
246
Vladimir Davydov1d7715c2015-09-09 15:35:41 -0700247static inline int mmu_notifier_clear_young(struct mm_struct *mm,
248 unsigned long start,
249 unsigned long end)
250{
251 if (mm_has_notifiers(mm))
252 return __mmu_notifier_clear_young(mm, start, end);
253 return 0;
254}
255
Andrea Arcangeli8ee53822011-01-13 15:47:10 -0800256static inline int mmu_notifier_test_young(struct mm_struct *mm,
257 unsigned long address)
258{
259 if (mm_has_notifiers(mm))
260 return __mmu_notifier_test_young(mm, address);
261 return 0;
262}
263
Izik Eidus828502d2009-09-21 17:01:51 -0700264static inline void mmu_notifier_change_pte(struct mm_struct *mm,
265 unsigned long address, pte_t pte)
266{
267 if (mm_has_notifiers(mm))
268 __mmu_notifier_change_pte(mm, address, pte);
269}
270
Andrea Arcangelicddb8a52008-07-28 15:46:29 -0700271static inline void mmu_notifier_invalidate_range_start(struct mm_struct *mm,
272 unsigned long start, unsigned long end)
273{
274 if (mm_has_notifiers(mm))
Michal Hocko93065ac2018-08-21 21:52:33 -0700275 __mmu_notifier_invalidate_range_start(mm, start, end, true);
276}
277
278static inline int mmu_notifier_invalidate_range_start_nonblock(struct mm_struct *mm,
279 unsigned long start, unsigned long end)
280{
281 if (mm_has_notifiers(mm))
282 return __mmu_notifier_invalidate_range_start(mm, start, end, false);
283 return 0;
Andrea Arcangelicddb8a52008-07-28 15:46:29 -0700284}
285
286static inline void mmu_notifier_invalidate_range_end(struct mm_struct *mm,
287 unsigned long start, unsigned long end)
288{
289 if (mm_has_notifiers(mm))
Jérôme Glisse4645b9f2017-11-15 17:34:11 -0800290 __mmu_notifier_invalidate_range_end(mm, start, end, false);
291}
292
293static inline void mmu_notifier_invalidate_range_only_end(struct mm_struct *mm,
294 unsigned long start, unsigned long end)
295{
296 if (mm_has_notifiers(mm))
297 __mmu_notifier_invalidate_range_end(mm, start, end, true);
Andrea Arcangelicddb8a52008-07-28 15:46:29 -0700298}
299
Joerg Roedel1897bdc2014-11-13 13:46:09 +1100300static inline void mmu_notifier_invalidate_range(struct mm_struct *mm,
301 unsigned long start, unsigned long end)
302{
Joerg Roedel0f0a3272014-11-13 13:46:09 +1100303 if (mm_has_notifiers(mm))
304 __mmu_notifier_invalidate_range(mm, start, end);
Joerg Roedel1897bdc2014-11-13 13:46:09 +1100305}
306
Andrea Arcangelicddb8a52008-07-28 15:46:29 -0700307static inline void mmu_notifier_mm_init(struct mm_struct *mm)
308{
309 mm->mmu_notifier_mm = NULL;
310}
311
312static inline void mmu_notifier_mm_destroy(struct mm_struct *mm)
313{
314 if (mm_has_notifiers(mm))
315 __mmu_notifier_mm_destroy(mm);
316}
317
Andrea Arcangelicddb8a52008-07-28 15:46:29 -0700318#define ptep_clear_flush_young_notify(__vma, __address, __ptep) \
319({ \
320 int __young; \
321 struct vm_area_struct *___vma = __vma; \
322 unsigned long ___address = __address; \
323 __young = ptep_clear_flush_young(___vma, ___address, __ptep); \
324 __young |= mmu_notifier_clear_flush_young(___vma->vm_mm, \
Andres Lagar-Cavilla57128462014-09-22 14:54:42 -0700325 ___address, \
326 ___address + \
327 PAGE_SIZE); \
Andrea Arcangelicddb8a52008-07-28 15:46:29 -0700328 __young; \
329})
330
Andrea Arcangeli91a4ee22011-01-13 15:46:44 -0800331#define pmdp_clear_flush_young_notify(__vma, __address, __pmdp) \
332({ \
333 int __young; \
334 struct vm_area_struct *___vma = __vma; \
335 unsigned long ___address = __address; \
336 __young = pmdp_clear_flush_young(___vma, ___address, __pmdp); \
337 __young |= mmu_notifier_clear_flush_young(___vma->vm_mm, \
Andres Lagar-Cavilla57128462014-09-22 14:54:42 -0700338 ___address, \
339 ___address + \
340 PMD_SIZE); \
Andrea Arcangeli91a4ee22011-01-13 15:46:44 -0800341 __young; \
342})
343
Vladimir Davydov1d7715c2015-09-09 15:35:41 -0700344#define ptep_clear_young_notify(__vma, __address, __ptep) \
345({ \
346 int __young; \
347 struct vm_area_struct *___vma = __vma; \
348 unsigned long ___address = __address; \
349 __young = ptep_test_and_clear_young(___vma, ___address, __ptep);\
350 __young |= mmu_notifier_clear_young(___vma->vm_mm, ___address, \
351 ___address + PAGE_SIZE); \
352 __young; \
353})
354
355#define pmdp_clear_young_notify(__vma, __address, __pmdp) \
356({ \
357 int __young; \
358 struct vm_area_struct *___vma = __vma; \
359 unsigned long ___address = __address; \
360 __young = pmdp_test_and_clear_young(___vma, ___address, __pmdp);\
361 __young |= mmu_notifier_clear_young(___vma->vm_mm, ___address, \
362 ___address + PMD_SIZE); \
363 __young; \
364})
365
Joerg Roedel34ee6452014-11-13 13:46:09 +1100366#define ptep_clear_flush_notify(__vma, __address, __ptep) \
367({ \
368 unsigned long ___addr = __address & PAGE_MASK; \
369 struct mm_struct *___mm = (__vma)->vm_mm; \
370 pte_t ___pte; \
371 \
372 ___pte = ptep_clear_flush(__vma, __address, __ptep); \
373 mmu_notifier_invalidate_range(___mm, ___addr, \
374 ___addr + PAGE_SIZE); \
375 \
376 ___pte; \
377})
378
Aneesh Kumar K.V8809aa22015-06-24 16:57:44 -0700379#define pmdp_huge_clear_flush_notify(__vma, __haddr, __pmd) \
Joerg Roedel34ee6452014-11-13 13:46:09 +1100380({ \
381 unsigned long ___haddr = __haddr & HPAGE_PMD_MASK; \
382 struct mm_struct *___mm = (__vma)->vm_mm; \
383 pmd_t ___pmd; \
384 \
Aneesh Kumar K.V8809aa22015-06-24 16:57:44 -0700385 ___pmd = pmdp_huge_clear_flush(__vma, __haddr, __pmd); \
Joerg Roedel34ee6452014-11-13 13:46:09 +1100386 mmu_notifier_invalidate_range(___mm, ___haddr, \
387 ___haddr + HPAGE_PMD_SIZE); \
388 \
389 ___pmd; \
390})
391
Matthew Wilcoxa00cc7d2017-02-24 14:57:02 -0800392#define pudp_huge_clear_flush_notify(__vma, __haddr, __pud) \
393({ \
394 unsigned long ___haddr = __haddr & HPAGE_PUD_MASK; \
395 struct mm_struct *___mm = (__vma)->vm_mm; \
396 pud_t ___pud; \
397 \
398 ___pud = pudp_huge_clear_flush(__vma, __haddr, __pud); \
399 mmu_notifier_invalidate_range(___mm, ___haddr, \
400 ___haddr + HPAGE_PUD_SIZE); \
401 \
402 ___pud; \
403})
404
Xiao Guangrong48af0d72012-10-08 16:29:23 -0700405/*
406 * set_pte_at_notify() sets the pte _after_ running the notifier.
407 * This is safe to start by updating the secondary MMUs, because the primary MMU
408 * pte invalidate must have already happened with a ptep_clear_flush() before
409 * set_pte_at_notify() has been invoked. Updating the secondary MMUs first is
410 * required when we change both the protection of the mapping from read-only to
411 * read-write and the pfn (like during copy on write page faults). Otherwise the
412 * old page would remain mapped readonly in the secondary MMUs after the new
413 * page is already writable by some CPU through the primary MMU.
414 */
Izik Eidus828502d2009-09-21 17:01:51 -0700415#define set_pte_at_notify(__mm, __address, __ptep, __pte) \
416({ \
417 struct mm_struct *___mm = __mm; \
418 unsigned long ___address = __address; \
419 pte_t ___pte = __pte; \
420 \
Izik Eidus828502d2009-09-21 17:01:51 -0700421 mmu_notifier_change_pte(___mm, ___address, ___pte); \
Xiao Guangrong48af0d72012-10-08 16:29:23 -0700422 set_pte_at(___mm, ___address, __ptep, ___pte); \
Izik Eidus828502d2009-09-21 17:01:51 -0700423})
424
Peter Zijlstrab9722162014-08-06 16:08:20 -0700425extern void mmu_notifier_call_srcu(struct rcu_head *rcu,
426 void (*func)(struct rcu_head *rcu));
Peter Zijlstrab9722162014-08-06 16:08:20 -0700427
Andrea Arcangelicddb8a52008-07-28 15:46:29 -0700428#else /* CONFIG_MMU_NOTIFIER */
429
Michal Hocko4d4bbd82017-10-03 16:14:50 -0700430static inline int mm_has_notifiers(struct mm_struct *mm)
431{
432 return 0;
433}
434
Andrea Arcangelicddb8a52008-07-28 15:46:29 -0700435static inline void mmu_notifier_release(struct mm_struct *mm)
436{
437}
438
439static inline int mmu_notifier_clear_flush_young(struct mm_struct *mm,
Andres Lagar-Cavilla57128462014-09-22 14:54:42 -0700440 unsigned long start,
441 unsigned long end)
Andrea Arcangelicddb8a52008-07-28 15:46:29 -0700442{
443 return 0;
444}
445
Andrea Arcangeli8ee53822011-01-13 15:47:10 -0800446static inline int mmu_notifier_test_young(struct mm_struct *mm,
447 unsigned long address)
448{
449 return 0;
450}
451
Izik Eidus828502d2009-09-21 17:01:51 -0700452static inline void mmu_notifier_change_pte(struct mm_struct *mm,
453 unsigned long address, pte_t pte)
454{
455}
456
Andrea Arcangelicddb8a52008-07-28 15:46:29 -0700457static inline void mmu_notifier_invalidate_range_start(struct mm_struct *mm,
458 unsigned long start, unsigned long end)
459{
460}
461
Michal Hocko93065ac2018-08-21 21:52:33 -0700462static inline int mmu_notifier_invalidate_range_start_nonblock(struct mm_struct *mm,
463 unsigned long start, unsigned long end)
464{
465 return 0;
466}
467
Andrea Arcangelicddb8a52008-07-28 15:46:29 -0700468static inline void mmu_notifier_invalidate_range_end(struct mm_struct *mm,
469 unsigned long start, unsigned long end)
470{
471}
472
Jérôme Glisse4645b9f2017-11-15 17:34:11 -0800473static inline void mmu_notifier_invalidate_range_only_end(struct mm_struct *mm,
474 unsigned long start, unsigned long end)
475{
476}
477
Joerg Roedel1897bdc2014-11-13 13:46:09 +1100478static inline void mmu_notifier_invalidate_range(struct mm_struct *mm,
479 unsigned long start, unsigned long end)
480{
481}
482
Andrea Arcangelicddb8a52008-07-28 15:46:29 -0700483static inline void mmu_notifier_mm_init(struct mm_struct *mm)
484{
485}
486
487static inline void mmu_notifier_mm_destroy(struct mm_struct *mm)
488{
489}
490
491#define ptep_clear_flush_young_notify ptep_clear_flush_young
Andrea Arcangeli91a4ee22011-01-13 15:46:44 -0800492#define pmdp_clear_flush_young_notify pmdp_clear_flush_young
Vladimir Davydov33c3fc72015-09-09 15:35:45 -0700493#define ptep_clear_young_notify ptep_test_and_clear_young
494#define pmdp_clear_young_notify pmdp_test_and_clear_young
Joerg Roedel34ee6452014-11-13 13:46:09 +1100495#define ptep_clear_flush_notify ptep_clear_flush
Aneesh Kumar K.V8809aa22015-06-24 16:57:44 -0700496#define pmdp_huge_clear_flush_notify pmdp_huge_clear_flush
Matthew Wilcoxa00cc7d2017-02-24 14:57:02 -0800497#define pudp_huge_clear_flush_notify pudp_huge_clear_flush
Izik Eidus828502d2009-09-21 17:01:51 -0700498#define set_pte_at_notify set_pte_at
Andrea Arcangelicddb8a52008-07-28 15:46:29 -0700499
500#endif /* CONFIG_MMU_NOTIFIER */
501
502#endif /* _LINUX_MMU_NOTIFIER_H */