ptdump.h 889 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * Copyright (C) 2014 ARM Ltd.
  4. */
  5. #ifndef __ASM_PTDUMP_H
  6. #define __ASM_PTDUMP_H
  7. #ifdef CONFIG_PTDUMP_CORE
  8. #include <linux/mm_types.h>
  9. #include <linux/seq_file.h>
  10. struct addr_marker {
  11. unsigned long start_address;
  12. char *name;
  13. };
  14. struct ptdump_info {
  15. struct mm_struct *mm;
  16. const struct addr_marker *markers;
  17. unsigned long base_addr;
  18. };
  19. void ptdump_walk(struct seq_file *s, struct ptdump_info *info);
  20. #ifdef CONFIG_PTDUMP_DEBUGFS
  21. void __init ptdump_debugfs_register(struct ptdump_info *info, const char *name);
  22. #else
  23. static inline void ptdump_debugfs_register(struct ptdump_info *info,
  24. const char *name) { }
  25. #endif
  26. void ptdump_check_wx(void);
  27. #endif /* CONFIG_PTDUMP_CORE */
  28. #ifdef CONFIG_DEBUG_WX
  29. #define debug_checkwx() ptdump_check_wx()
  30. #else
  31. #define debug_checkwx() do { } while (0)
  32. #endif
  33. #endif /* __ASM_PTDUMP_H */