ptdump.h 923 B

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