]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blame - include/linux/mm_types.h
libnvdimm, pmem: move request_queue allocation earlier in probe
[mirror_ubuntu-zesty-kernel.git] / include / linux / mm_types.h
CommitLineData
5b99cd0e
HC
1#ifndef _LINUX_MM_TYPES_H
2#define _LINUX_MM_TYPES_H
3
4f9a58d7 4#include <linux/auxvec.h>
5b99cd0e
HC
5#include <linux/types.h>
6#include <linux/threads.h>
7#include <linux/list.h>
8#include <linux/spinlock.h>
c92ff1bd
MS
9#include <linux/rbtree.h>
10#include <linux/rwsem.h>
11#include <linux/completion.h>
cddb8a5c 12#include <linux/cpumask.h>
d4b3b638 13#include <linux/uprobes.h>
bbeae5b0 14#include <linux/page-flags-layout.h>
c92ff1bd
MS
15#include <asm/page.h>
16#include <asm/mmu.h>
5b99cd0e 17
4f9a58d7
OH
18#ifndef AT_VECTOR_SIZE_ARCH
19#define AT_VECTOR_SIZE_ARCH 0
20#endif
21#define AT_VECTOR_SIZE (2*(AT_VECTOR_SIZE_ARCH + AT_VECTOR_SIZE_BASE + 1))
22
5b99cd0e 23struct address_space;
1306a85a 24struct mem_cgroup;
5b99cd0e 25
57c1ffce 26#define USE_SPLIT_PTE_PTLOCKS (NR_CPUS >= CONFIG_SPLIT_PTLOCK_CPUS)
e009bb30
KS
27#define USE_SPLIT_PMD_PTLOCKS (USE_SPLIT_PTE_PTLOCKS && \
28 IS_ENABLED(CONFIG_ARCH_ENABLE_SPLIT_PMD_PTLOCK))
597d795a 29#define ALLOC_SPLIT_PTLOCKS (SPINLOCK_SIZE > BITS_PER_LONG/8)
f7d0b926 30
5b99cd0e
HC
31/*
32 * Each physical page in the system has a struct page associated with
33 * it to keep track of whatever it is we are using the page for at the
34 * moment. Note that we have no way to track which tasks are using
35 * a page, though if it is a pagecache page, rmap structures can tell us
36 * who is mapping it.
fc9bb8c7
CL
37 *
38 * The objects in struct page are organized in double word blocks in
39 * order to allows us to use atomic double word operations on portions
40 * of struct page. That is currently only used by slub but the arrangement
41 * allows the use of atomic double word operations on the flags/mapping
42 * and lru list pointers also.
5b99cd0e
HC
43 */
44struct page {
fc9bb8c7 45 /* First double word block */
5b99cd0e
HC
46 unsigned long flags; /* Atomic flags, some possibly
47 * updated asynchronously */
8456a648
JK
48 union {
49 struct address_space *mapping; /* If low bit clear, points to
50 * inode address_space, or NULL.
51 * If page mapped as anonymous
52 * memory, low bit is set, and
53 * it points to anon_vma object:
54 * see PAGE_MAPPING_ANON below.
55 */
56 void *s_mem; /* slab first object */
53f9263b 57 atomic_t compound_mapcount; /* first tail page */
9a982250 58 /* page_deferred_list().next -- second tail page */
8456a648
JK
59 };
60
fc9bb8c7 61 /* Second double word */
013e8963
CL
62 struct {
63 union {
fc9bb8c7 64 pgoff_t index; /* Our offset within mapping. */
8456a648 65 void *freelist; /* sl[aou]b first free object */
9a982250 66 /* page_deferred_list().prev -- second tail page */
013e8963
CL
67 };
68
69 union {
abca7c49
PS
70#if defined(CONFIG_HAVE_CMPXCHG_DOUBLE) && \
71 defined(CONFIG_HAVE_ALIGNED_STRUCT_PAGE)
013e8963
CL
72 /* Used for cmpxchg_double in slub */
73 unsigned long counters;
abca7c49
PS
74#else
75 /*
76 * Keep _count separate from slub cmpxchg_double data.
77 * As the rest of the double word is protected by
78 * slab_lock but _count is not.
79 */
80 unsigned counters;
81#endif
013e8963
CL
82
83 struct {
84
85 union {
70b50f94 86 /*
ddc58f27
KS
87 * Count of ptes mapped in mms, to show
88 * when page is mapped & limit reverse
89 * map searches.
70b50f94
AA
90 */
91 atomic_t _mapcount;
fc9bb8c7 92
b8c24c4a 93 struct { /* SLUB */
013e8963
CL
94 unsigned inuse:16;
95 unsigned objects:15;
96 unsigned frozen:1;
97 };
b8c24c4a 98 int units; /* SLOB */
3adf004d 99 };
013e8963 100 atomic_t _count; /* Usage count, see below. */
fc9bb8c7 101 };
8456a648 102 unsigned int active; /* SLAB */
39b26464 103 };
81819f0f 104 };
fc9bb8c7 105
1d798ca3
KS
106 /*
107 * Third double word block
108 *
109 * WARNING: bit 0 of the first word encode PageTail(). That means
110 * the rest users of the storage space MUST NOT use the bit to
111 * avoid collision and false-positive PageTail().
112 */
49e22585
CL
113 union {
114 struct list_head lru; /* Pageout list, eg. active_list
fc9bb8c7 115 * protected by zone->lru_lock !
34bf6ef9
DH
116 * Can be used as a generic list
117 * by the page owner.
fc9bb8c7 118 */
49e22585
CL
119 struct { /* slub per cpu partial pages */
120 struct page *next; /* Next partial slab */
121#ifdef CONFIG_64BIT
122 int pages; /* Nr of partial slabs left */
123 int pobjects; /* Approximate # of objects */
124#else
125 short int pages;
126 short int pobjects;
127#endif
128 };
b8c24c4a 129
68126702
JK
130 struct rcu_head rcu_head; /* Used by SLAB
131 * when destroying via RCU
132 */
1d798ca3 133 /* Tail pages of compound page */
e4b294c2 134 struct {
1d798ca3
KS
135 unsigned long compound_head; /* If bit zero is set */
136
137 /* First tail page only */
1965c8b7
KS
138#ifdef CONFIG_64BIT
139 /*
140 * On 64 bit system we have enough space in struct page
141 * to encode compound_dtor and compound_order with
142 * unsigned int. It can help compiler generate better or
143 * smaller code on some archtectures.
144 */
145 unsigned int compound_dtor;
146 unsigned int compound_order;
147#else
f1e61557
KS
148 unsigned short int compound_dtor;
149 unsigned short int compound_order;
1965c8b7 150#endif
e4b294c2
KS
151 };
152
7aa555bf 153#if defined(CONFIG_TRANSPARENT_HUGEPAGE) && USE_SPLIT_PMD_PTLOCKS
1d798ca3
KS
154 struct {
155 unsigned long __pad; /* do not overlay pmd_huge_pte
156 * with compound_head to avoid
157 * possible bit 0 collision.
158 */
159 pgtable_t pmd_huge_pte; /* protected by page->ptl */
160 };
7aa555bf 161#endif
49e22585 162 };
fc9bb8c7
CL
163
164 /* Remainder is not double word aligned */
5b99cd0e 165 union {
5b99cd0e
HC
166 unsigned long private; /* Mapping-private opaque data:
167 * usually used for buffer_heads
168 * if PagePrivate set; used for
169 * swp_entry_t if PageSwapCache;
170 * indicates order in the buddy
171 * system if PG_buddy is set.
172 */
57c1ffce 173#if USE_SPLIT_PTE_PTLOCKS
597d795a 174#if ALLOC_SPLIT_PTLOCKS
539edb58
PZ
175 spinlock_t *ptl;
176#else
177 spinlock_t ptl;
178#endif
5b99cd0e 179#endif
1b4f59e3 180 struct kmem_cache *slab_cache; /* SL[AU]B: Pointer to slab */
81819f0f 181 };
fc9bb8c7 182
1306a85a
JW
183#ifdef CONFIG_MEMCG
184 struct mem_cgroup *mem_cgroup;
185#endif
186
5b99cd0e
HC
187 /*
188 * On machines where all RAM is mapped into kernel address space,
189 * we can simply calculate the virtual address. On machines with
190 * highmem some memory is mapped into kernel virtual memory
191 * dynamically, so we need a place to store that address.
192 * Note that this field could be 16 bits on x86 ... ;)
193 *
194 * Architectures with slow multiplication can define
195 * WANT_PAGE_VIRTUAL in asm/page.h
196 */
197#if defined(WANT_PAGE_VIRTUAL)
198 void *virtual; /* Kernel virtual address (NULL if
199 not kmapped, ie. highmem) */
200#endif /* WANT_PAGE_VIRTUAL */
dfec072e
VN
201
202#ifdef CONFIG_KMEMCHECK
203 /*
204 * kmemcheck wants to track the status of each byte in a page; this
205 * is a pointer to such a status block. NULL if not tracked.
206 */
207 void *shadow;
208#endif
57e0a030 209
90572890
PZ
210#ifdef LAST_CPUPID_NOT_IN_PAGE_FLAGS
211 int _last_cpupid;
57e0a030 212#endif
fc9bb8c7
CL
213}
214/*
43570fd2
HC
215 * The struct page can be forced to be double word aligned so that atomic ops
216 * on double words work. The SLUB allocator can make use of such a feature.
fc9bb8c7 217 */
43570fd2
HC
218#ifdef CONFIG_HAVE_ALIGNED_STRUCT_PAGE
219 __aligned(2 * sizeof(unsigned long))
fc9bb8c7
CL
220#endif
221;
5b99cd0e 222
30d3c128
IC
223struct page_frag {
224 struct page *page;
225#if (BITS_PER_LONG > 32) || (PAGE_SIZE >= 65536)
226 __u32 offset;
227 __u32 size;
228#else
229 __u16 offset;
230 __u16 size;
231#endif
232};
233
b63ae8ca
AD
234#define PAGE_FRAG_CACHE_MAX_SIZE __ALIGN_MASK(32768, ~PAGE_MASK)
235#define PAGE_FRAG_CACHE_MAX_ORDER get_order(PAGE_FRAG_CACHE_MAX_SIZE)
236
237struct page_frag_cache {
238 void * va;
239#if (PAGE_SIZE < PAGE_FRAG_CACHE_MAX_SIZE)
240 __u16 offset;
241 __u16 size;
242#else
243 __u32 offset;
244#endif
245 /* we maintain a pagecount bias, so that we dont dirty cache line
246 * containing page->_count every time we allocate a fragment.
247 */
248 unsigned int pagecnt_bias;
249 bool pfmemalloc;
250};
251
64b990d2 252typedef unsigned long vm_flags_t;
ca16d140 253
8feae131
DH
254/*
255 * A region containing a mapping of a non-memory backed file under NOMMU
256 * conditions. These are held in a global tree and are pinned by the VMAs that
257 * map parts of them.
258 */
259struct vm_region {
260 struct rb_node vm_rb; /* link in global region tree */
ca16d140 261 vm_flags_t vm_flags; /* VMA vm_flags */
8feae131
DH
262 unsigned long vm_start; /* start address of region */
263 unsigned long vm_end; /* region initialised to here */
dd8632a1 264 unsigned long vm_top; /* region allocated to here */
8feae131
DH
265 unsigned long vm_pgoff; /* the offset in vm_file corresponding to vm_start */
266 struct file *vm_file; /* the backing file or NULL */
267
1e2ae599 268 int vm_usage; /* region usage count (access under nommu_region_sem) */
cfe79c00
MF
269 bool vm_icache_flushed : 1; /* true if the icache has been flushed for
270 * this region */
8feae131
DH
271};
272
745f234b
AA
273#ifdef CONFIG_USERFAULTFD
274#define NULL_VM_UFFD_CTX ((struct vm_userfaultfd_ctx) { NULL, })
275struct vm_userfaultfd_ctx {
276 struct userfaultfd_ctx *ctx;
277};
278#else /* CONFIG_USERFAULTFD */
279#define NULL_VM_UFFD_CTX ((struct vm_userfaultfd_ctx) {})
280struct vm_userfaultfd_ctx {};
281#endif /* CONFIG_USERFAULTFD */
282
c92ff1bd
MS
283/*
284 * This struct defines a memory VMM memory area. There is one of these
285 * per VM-area/task. A VM area is any part of the process virtual memory
286 * space that has a special rule for the page-fault handlers (ie a shared
287 * library, the executable area etc).
288 */
289struct vm_area_struct {
e4c6bfd2
RR
290 /* The first cache line has the info for VMA tree walking. */
291
c92ff1bd
MS
292 unsigned long vm_start; /* Our start address within vm_mm. */
293 unsigned long vm_end; /* The first byte after our end address
294 within vm_mm. */
295
296 /* linked list of VM areas per task, sorted by address */
297c5eee 297 struct vm_area_struct *vm_next, *vm_prev;
c92ff1bd 298
c92ff1bd
MS
299 struct rb_node vm_rb;
300
d3737187
ML
301 /*
302 * Largest free memory gap in bytes to the left of this VMA.
303 * Either between this VMA and vma->vm_prev, or between one of the
304 * VMAs below us in the VMA rbtree and its ->vm_prev. This helps
305 * get_unmapped_area find a free area of the right size.
306 */
307 unsigned long rb_subtree_gap;
308
e4c6bfd2
RR
309 /* Second cache line starts here. */
310
311 struct mm_struct *vm_mm; /* The address space we belong to. */
312 pgprot_t vm_page_prot; /* Access permissions of this VMA. */
313 unsigned long vm_flags; /* Flags, see mm.h. */
314
c92ff1bd
MS
315 /*
316 * For areas with an address space and backing store,
27ba0644 317 * linkage into the address_space->i_mmap interval tree.
c92ff1bd 318 */
ac51b934
KS
319 struct {
320 struct rb_node rb;
321 unsigned long rb_subtree_last;
c92ff1bd
MS
322 } shared;
323
324 /*
325 * A file's MAP_PRIVATE vma can be in both i_mmap tree and anon_vma
326 * list, after a COW of one of the file pages. A MAP_SHARED vma
327 * can only be in the i_mmap tree. An anonymous MAP_PRIVATE, stack
328 * or brk vma (with NULL file) can only be in an anon_vma list.
329 */
5beb4930
RR
330 struct list_head anon_vma_chain; /* Serialized by mmap_sem &
331 * page_table_lock */
c92ff1bd
MS
332 struct anon_vma *anon_vma; /* Serialized by page_table_lock */
333
334 /* Function pointers to deal with this struct. */
f0f37e2f 335 const struct vm_operations_struct *vm_ops;
c92ff1bd
MS
336
337 /* Information about our backing store: */
338 unsigned long vm_pgoff; /* Offset (within vm_file) in PAGE_SIZE
339 units, *not* PAGE_CACHE_SIZE */
340 struct file * vm_file; /* File we map to (can be NULL). */
341 void * vm_private_data; /* was vm_pte (shared mem) */
c92ff1bd
MS
342
343#ifndef CONFIG_MMU
8feae131 344 struct vm_region *vm_region; /* NOMMU mapping region */
c92ff1bd
MS
345#endif
346#ifdef CONFIG_NUMA
347 struct mempolicy *vm_policy; /* NUMA policy for the VMA */
348#endif
745f234b 349 struct vm_userfaultfd_ctx vm_userfaultfd_ctx;
c92ff1bd
MS
350};
351
b564daf8
ON
352struct core_thread {
353 struct task_struct *task;
354 struct core_thread *next;
355};
356
32ecb1f2 357struct core_state {
c5f1cc8c 358 atomic_t nr_threads;
b564daf8 359 struct core_thread dumper;
32ecb1f2
ON
360 struct completion startup;
361};
362
d559db08 363enum {
eca56ff9
JM
364 MM_FILEPAGES, /* Resident file mapping pages */
365 MM_ANONPAGES, /* Resident anonymous pages */
366 MM_SWAPENTS, /* Anonymous swap entries */
367 MM_SHMEMPAGES, /* Resident shared memory pages */
d559db08
KH
368 NR_MM_COUNTERS
369};
370
57c1ffce 371#if USE_SPLIT_PTE_PTLOCKS && defined(CONFIG_MMU)
34e55232 372#define SPLIT_RSS_COUNTING
34e55232
KH
373/* per-thread cached information, */
374struct task_rss_stat {
375 int events; /* for synchronization threshold */
376 int count[NR_MM_COUNTERS];
377};
57c1ffce 378#endif /* USE_SPLIT_PTE_PTLOCKS */
172703b0 379
d559db08 380struct mm_rss_stat {
172703b0 381 atomic_long_t count[NR_MM_COUNTERS];
d559db08 382};
d559db08 383
db446a08 384struct kioctx_table;
c92ff1bd 385struct mm_struct {
615d6e87 386 struct vm_area_struct *mmap; /* list of VMAs */
c92ff1bd 387 struct rb_root mm_rb;
615d6e87 388 u32 vmacache_seqnum; /* per-thread vmacache */
efc1a3b1 389#ifdef CONFIG_MMU
c92ff1bd
MS
390 unsigned long (*get_unmapped_area) (struct file *filp,
391 unsigned long addr, unsigned long len,
392 unsigned long pgoff, unsigned long flags);
efc1a3b1 393#endif
c92ff1bd 394 unsigned long mmap_base; /* base of mmap area */
41aacc1e 395 unsigned long mmap_legacy_base; /* base of mmap area in bottom-up allocations */
c92ff1bd 396 unsigned long task_size; /* size of task vm space */
d3737187 397 unsigned long highest_vm_end; /* highest vma end address */
c92ff1bd
MS
398 pgd_t * pgd;
399 atomic_t mm_users; /* How many users with user space? */
400 atomic_t mm_count; /* How many references to "struct mm_struct" (users count as 1) */
dc6c9a35 401 atomic_long_t nr_ptes; /* PTE page table pages */
5a3fbef3 402#if CONFIG_PGTABLE_LEVELS > 2
dc6c9a35 403 atomic_long_t nr_pmds; /* PMD page table pages */
5a3fbef3 404#endif
c92ff1bd 405 int map_count; /* number of VMAs */
481b4bb5 406
c92ff1bd 407 spinlock_t page_table_lock; /* Protects page tables and some counters */
481b4bb5 408 struct rw_semaphore mmap_sem;
c92ff1bd
MS
409
410 struct list_head mmlist; /* List of maybe swapped mm's. These are globally strung
411 * together off init_mm.mmlist, and are protected
412 * by mmlist_lock
413 */
414
c92ff1bd
MS
415
416 unsigned long hiwater_rss; /* High-watermark of RSS usage */
417 unsigned long hiwater_vm; /* High-water virtual memory usage */
418
e10d59f2
CL
419 unsigned long total_vm; /* Total pages mapped */
420 unsigned long locked_vm; /* Pages that have PG_mlocked set */
421 unsigned long pinned_vm; /* Refcount permanently increased */
84638335 422 unsigned long data_vm; /* VM_WRITE & ~VM_SHARED/GROWSDOWN */
e10d59f2
CL
423 unsigned long exec_vm; /* VM_EXEC & ~VM_WRITE */
424 unsigned long stack_vm; /* VM_GROWSUP/DOWN */
e10d59f2 425 unsigned long def_flags;
c92ff1bd
MS
426 unsigned long start_code, end_code, start_data, end_data;
427 unsigned long start_brk, brk, start_stack;
428 unsigned long arg_start, arg_end, env_start, env_end;
429
430 unsigned long saved_auxv[AT_VECTOR_SIZE]; /* for /proc/PID/auxv */
431
d559db08
KH
432 /*
433 * Special counters, in some configurations protected by the
434 * page_table_lock, in other configurations by being atomic.
435 */
436 struct mm_rss_stat rss_stat;
437
801460d0
HS
438 struct linux_binfmt *binfmt;
439
6345d24d
LT
440 cpumask_var_t cpu_vm_mask_var;
441
c92ff1bd
MS
442 /* Architecture-specific MM context */
443 mm_context_t context;
444
c92ff1bd
MS
445 unsigned long flags; /* Must use atomic bitops to access the bits */
446
a94e2d40 447 struct core_state *core_state; /* coredumping support */
858f0993 448#ifdef CONFIG_AIO
db446a08
BL
449 spinlock_t ioctx_lock;
450 struct kioctx_table __rcu *ioctx_table;
858f0993 451#endif
f98bafa0 452#ifdef CONFIG_MEMCG
4cd1a8fc
KM
453 /*
454 * "owner" points to a task that is regarded as the canonical
455 * user/owner of this mm. All of the following must be true in
456 * order for it to be changed:
457 *
458 * current == mm->owner
459 * current->mm != mm
460 * new_owner->mm == mm
461 * new_owner->alloc_lock is held
462 */
4d2deb40 463 struct task_struct __rcu *owner;
78fb7466 464#endif
925d1c40 465
925d1c40 466 /* store ref to file /proc/<pid>/exe symlink points to */
90f31d0e 467 struct file __rcu *exe_file;
cddb8a5c
AA
468#ifdef CONFIG_MMU_NOTIFIER
469 struct mmu_notifier_mm *mmu_notifier_mm;
e7a00c45 470#endif
e009bb30 471#if defined(CONFIG_TRANSPARENT_HUGEPAGE) && !USE_SPLIT_PMD_PTLOCKS
e7a00c45 472 pgtable_t pmd_huge_pte; /* protected by page_table_lock */
cddb8a5c 473#endif
6345d24d
LT
474#ifdef CONFIG_CPUMASK_OFFSTACK
475 struct cpumask cpumask_allocation;
cbee9f88
PZ
476#endif
477#ifdef CONFIG_NUMA_BALANCING
478 /*
34f0315a
MG
479 * numa_next_scan is the next time that the PTEs will be marked
480 * pte_numa. NUMA hinting faults will gather statistics and migrate
481 * pages to new nodes if necessary.
cbee9f88
PZ
482 */
483 unsigned long numa_next_scan;
484
6e5fb223
PZ
485 /* Restart point for scanning and setting pte_numa */
486 unsigned long numa_scan_offset;
487
cbee9f88
PZ
488 /* numa_scan_seq prevents two threads setting pte_numa */
489 int numa_scan_seq;
20841405
RR
490#endif
491#if defined(CONFIG_NUMA_BALANCING) || defined(CONFIG_COMPACTION)
492 /*
493 * An operation with batched TLB flushing is going on. Anything that
494 * can move process memory needs to flush the TLB when moving a
495 * PROT_NONE or PROT_NUMA mapped page.
496 */
497 bool tlb_flush_pending;
6345d24d 498#endif
d4b3b638 499 struct uprobes_state uprobes_state;
fe3d197f
DH
500#ifdef CONFIG_X86_INTEL_MPX
501 /* address of the bounds directory */
502 void __user *bd_addr;
503#endif
5d317b2b
NH
504#ifdef CONFIG_HUGETLB_PAGE
505 atomic_long_t hugetlb_usage;
506#endif
c92ff1bd
MS
507};
508
6345d24d
LT
509static inline void mm_init_cpumask(struct mm_struct *mm)
510{
511#ifdef CONFIG_CPUMASK_OFFSTACK
512 mm->cpu_vm_mask_var = &mm->cpumask_allocation;
513#endif
41f727fd 514 cpumask_clear(mm->cpu_vm_mask_var);
6345d24d
LT
515}
516
45e575ab 517/* Future-safe accessor for struct mm_struct's cpu_vm_mask. */
de03c72c
KM
518static inline cpumask_t *mm_cpumask(struct mm_struct *mm)
519{
520 return mm->cpu_vm_mask_var;
521}
45e575ab 522
20841405
RR
523#if defined(CONFIG_NUMA_BALANCING) || defined(CONFIG_COMPACTION)
524/*
525 * Memory barriers to keep this state in sync are graciously provided by
526 * the page table locks, outside of which no page table modifications happen.
527 * The barriers below prevent the compiler from re-ordering the instructions
528 * around the memory barriers that are already present in the code.
529 */
530static inline bool mm_tlb_flush_pending(struct mm_struct *mm)
531{
532 barrier();
533 return mm->tlb_flush_pending;
534}
535static inline void set_tlb_flush_pending(struct mm_struct *mm)
536{
537 mm->tlb_flush_pending = true;
af2c1401
MG
538
539 /*
540 * Guarantee that the tlb_flush_pending store does not leak into the
541 * critical section updating the page tables
542 */
543 smp_mb__before_spinlock();
20841405
RR
544}
545/* Clearing is done after a TLB flush, which also provides a barrier. */
546static inline void clear_tlb_flush_pending(struct mm_struct *mm)
547{
548 barrier();
549 mm->tlb_flush_pending = false;
550}
551#else
552static inline bool mm_tlb_flush_pending(struct mm_struct *mm)
553{
554 return false;
555}
556static inline void set_tlb_flush_pending(struct mm_struct *mm)
557{
558}
559static inline void clear_tlb_flush_pending(struct mm_struct *mm)
560{
561}
562#endif
563
a62c34bd
AL
564struct vm_special_mapping
565{
566 const char *name;
567 struct page **pages;
568};
569
d17d8f9d
DH
570enum tlb_flush_reason {
571 TLB_FLUSH_ON_TASK_SWITCH,
572 TLB_REMOTE_SHOOTDOWN,
573 TLB_LOCAL_SHOOTDOWN,
574 TLB_LOCAL_MM_SHOOTDOWN,
5b74283a 575 TLB_REMOTE_SEND_IPI,
d17d8f9d
DH
576 NR_TLB_FLUSH_REASONS,
577};
578
bd6dace7
TH
579 /*
580 * A swap entry has to fit into a "unsigned long", as the entry is hidden
581 * in the "index" field of the swapper address space.
582 */
583typedef struct {
584 unsigned long val;
585} swp_entry_t;
586
5b99cd0e 587#endif /* _LINUX_MM_TYPES_H */