diff options
author | Laura Abbott <labbott@redhat.com> | 2016-10-27 19:27:31 +0300 |
---|---|---|
committer | Catalin Marinas <catalin.marinas@arm.com> | 2016-11-07 21:15:04 +0300 |
commit | 4ddb9bf83349b4f4f8178e58c3654ac7ec7edbc6 (patch) | |
tree | 6d5ee3eb03f7afda1a006bda20bfa094c57df037 /arch/arm64/include/asm/ptdump.h | |
parent | 0bfc445dec9dd8130d22c9f4476eed7598524129 (diff) | |
download | linux-4ddb9bf83349b4f4f8178e58c3654ac7ec7edbc6.tar.xz |
arm64: dump: Make ptdump debugfs a separate option
ptdump_register currently initializes a set of page table information and
registers debugfs. There are uses for the ptdump option without wanting the
debugfs options. Split this out to make it a separate option.
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Tested-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Laura Abbott <labbott@redhat.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'arch/arm64/include/asm/ptdump.h')
-rw-r--r-- | arch/arm64/include/asm/ptdump.h | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/arch/arm64/include/asm/ptdump.h b/arch/arm64/include/asm/ptdump.h index 07b8ed037dee..16335dac3c1f 100644 --- a/arch/arm64/include/asm/ptdump.h +++ b/arch/arm64/include/asm/ptdump.h @@ -16,9 +16,10 @@ #ifndef __ASM_PTDUMP_H #define __ASM_PTDUMP_H -#ifdef CONFIG_ARM64_PTDUMP +#ifdef CONFIG_ARM64_PTDUMP_CORE #include <linux/mm_types.h> +#include <linux/seq_file.h> struct addr_marker { unsigned long start_address; @@ -32,13 +33,15 @@ struct ptdump_info { unsigned long max_addr; }; -int ptdump_register(struct ptdump_info *info, const char *name); - +void ptdump_walk_pgd(struct seq_file *s, struct ptdump_info *info); +#ifdef CONFIG_ARM64_PTDUMP_DEBUGFS +int ptdump_debugfs_register(struct ptdump_info *info, const char *name); #else -static inline int ptdump_register(struct ptdump_info *info, const char *name) +static inline int ptdump_debugfs_register(struct ptdump_info *info, + const char *name) { return 0; } -#endif /* CONFIG_ARM64_PTDUMP */ - +#endif +#endif /* CONFIG_ARM64_PTDUMP_CORE */ #endif /* __ASM_PTDUMP_H */ |