1caab277bSThomas Gleixner /* SPDX-License-Identifier: GPL-2.0-only */ 24674fdb9SMark Rutland /* 34674fdb9SMark Rutland * Copyright (C) 2014 ARM Ltd. 44674fdb9SMark Rutland */ 54674fdb9SMark Rutland #ifndef __ASM_PTDUMP_H 64674fdb9SMark Rutland #define __ASM_PTDUMP_H 74674fdb9SMark Rutland 8102f45fdSSteven Price #ifdef CONFIG_PTDUMP_CORE 94674fdb9SMark Rutland 104674fdb9SMark Rutland #include <linux/mm_types.h> 114ddb9bf8SLaura Abbott #include <linux/seq_file.h> 124674fdb9SMark Rutland 134674fdb9SMark Rutland struct addr_marker { 144674fdb9SMark Rutland unsigned long start_address; 154674fdb9SMark Rutland char *name; 164674fdb9SMark Rutland }; 174674fdb9SMark Rutland 184674fdb9SMark Rutland struct ptdump_info { 194674fdb9SMark Rutland struct mm_struct *mm; 204674fdb9SMark Rutland const struct addr_marker *markers; 214674fdb9SMark Rutland unsigned long base_addr; 224674fdb9SMark Rutland }; 234674fdb9SMark Rutland 24102f45fdSSteven Price void ptdump_walk(struct seq_file *s, struct ptdump_info *info); 25102f45fdSSteven Price #ifdef CONFIG_PTDUMP_DEBUGFS 26*e513ffd8SWang Kefeng #define EFI_RUNTIME_MAP_END DEFAULT_MAP_WINDOW_64 27a7dcf58aSJisheng Zhang void __init ptdump_debugfs_register(struct ptdump_info *info, const char *name); 284674fdb9SMark Rutland #else ptdump_debugfs_register(struct ptdump_info * info,const char * name)29e2a2e56eSGreg Kroah-Hartmanstatic inline void ptdump_debugfs_register(struct ptdump_info *info, 30e2a2e56eSGreg Kroah-Hartman const char *name) { } 314ddb9bf8SLaura Abbott #endif 321404d6f1SLaura Abbott void ptdump_check_wx(void); 33102f45fdSSteven Price #endif /* CONFIG_PTDUMP_CORE */ 341404d6f1SLaura Abbott 351404d6f1SLaura Abbott #ifdef CONFIG_DEBUG_WX 361404d6f1SLaura Abbott #define debug_checkwx() ptdump_check_wx() 371404d6f1SLaura Abbott #else 381404d6f1SLaura Abbott #define debug_checkwx() do { } while (0) 391404d6f1SLaura Abbott #endif 401404d6f1SLaura Abbott 414674fdb9SMark Rutland #endif /* __ASM_PTDUMP_H */ 42