kcore.h 625 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /*
  2. * /proc/kcore definitions
  3. */
  4. #ifndef _LINUX_KCORE_H
  5. #define _LINUX_KCORE_H
  6. enum kcore_type {
  7. KCORE_TEXT,
  8. KCORE_VMALLOC,
  9. KCORE_RAM,
  10. KCORE_VMEMMAP,
  11. KCORE_USER,
  12. KCORE_OTHER,
  13. };
  14. struct kcore_list {
  15. struct list_head list;
  16. unsigned long addr;
  17. size_t size;
  18. int type;
  19. };
  20. struct vmcore {
  21. struct list_head list;
  22. unsigned long long paddr;
  23. unsigned long long size;
  24. loff_t offset;
  25. };
  26. #ifdef CONFIG_PROC_KCORE
  27. extern void kclist_add(struct kcore_list *, void *, size_t, int type);
  28. #else
  29. static inline
  30. void kclist_add(struct kcore_list *new, void *addr, size_t size, int type)
  31. {
  32. }
  33. #endif
  34. #endif /* _LINUX_KCORE_H */