blob: 24d786fc3a4c3935cd8a944f1c8befe56a31207b [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001// SPDX-License-Identifier: GPL-2.0
Laura Abbott4ddb9bf2016-10-27 09:27:31 -07002#include <linux/debugfs.h>
3#include <linux/seq_file.h>
4
5#include <asm/ptdump.h>
6
7static int ptdump_show(struct seq_file *m, void *v)
8{
9 struct ptdump_info *info = m->private;
10 ptdump_walk_pgd(m, info);
11 return 0;
12}
Peng Donglin90aff8d2018-06-13 09:11:56 +080013DEFINE_SHOW_ATTRIBUTE(ptdump);
Laura Abbott4ddb9bf2016-10-27 09:27:31 -070014
15int ptdump_debugfs_register(struct ptdump_info *info, const char *name)
16{
17 struct dentry *pe;
18 pe = debugfs_create_file(name, 0400, NULL, info, &ptdump_fops);
19 return pe ? 0 : -ENOMEM;
20
21}