vma_internal.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. * vma_internal.h
  4. *
  5. * Header providing userland wrappers and shims for the functionality provided
  6. * by mm/vma_internal.h.
  7. *
  8. * We make the header guard the same as mm/vma_internal.h, so if this shim
  9. * header is included, it precludes the inclusion of the kernel one.
  10. */
  11. #ifndef __MM_VMA_INTERNAL_H
  12. #define __MM_VMA_INTERNAL_H
  13. #include <stdlib.h>
  14. #define CONFIG_MMU
  15. #define CONFIG_PER_VMA_LOCK
  16. #ifdef __CONCAT
  17. #undef __CONCAT
  18. #endif
  19. #include <linux/args.h>
  20. #include <linux/atomic.h>
  21. #include <linux/bitmap.h>
  22. #include <linux/list.h>
  23. #include <linux/maple_tree.h>
  24. #include <linux/mm.h>
  25. #include <linux/rbtree.h>
  26. #include <linux/refcount.h>
  27. #include <linux/slab.h>
  28. /*
  29. * DUPLICATE typedef definitions from kernel source that have to be declared
  30. * ahead of all other headers.
  31. */
  32. #define __private
  33. /* NUM_MM_FLAG_BITS defined by test code. */
  34. typedef struct {
  35. __private DECLARE_BITMAP(__mm_flags, NUM_MM_FLAG_BITS);
  36. } mm_flags_t;
  37. /* NUM_VMA_FLAG_BITS defined by test code. */
  38. typedef struct {
  39. DECLARE_BITMAP(__vma_flags, NUM_VMA_FLAG_BITS);
  40. } __private vma_flags_t;
  41. typedef unsigned long vm_flags_t;
  42. #define pgoff_t unsigned long
  43. typedef unsigned long pgprotval_t;
  44. typedef struct pgprot { pgprotval_t pgprot; } pgprot_t;
  45. typedef __bitwise unsigned int vm_fault_t;
  46. #include "include/stubs.h"
  47. #include "include/dup.h"
  48. #include "include/custom.h"
  49. #endif /* __MM_VMA_INTERNAL_H */