mm_types.h 18 KB

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