kcore.h 612 B

1234567891011121314151617181920212223242526272829303132333435363738
  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_OTHER,
  12. };
  13. struct kcore_list {
  14. struct list_head list;
  15. unsigned long addr;
  16. size_t size;
  17. int type;
  18. };
  19. struct vmcore {
  20. struct list_head list;
  21. unsigned long long paddr;
  22. unsigned long long size;
  23. loff_t offset;
  24. };
  25. #ifdef CONFIG_PROC_KCORE
  26. extern void kclist_add(struct kcore_list *, void *, size_t, int type);
  27. #else
  28. static inline
  29. void kclist_add(struct kcore_list *new, void *addr, size_t size, int type)
  30. {
  31. }
  32. #endif
  33. #endif /* _LINUX_KCORE_H */