1 #include <linux/debugfs.h>
2 #include <linux/seq_file.h>
4 #include <asm/ptdump.h>
6 static int ptdump_show(struct seq_file *m, void *v)
8 struct ptdump_info *info = m->private;
9 ptdump_walk_pgd(m, info);
13 static int ptdump_open(struct inode *inode, struct file *file)
15 return single_open(file, ptdump_show, inode->i_private);
18 static const struct file_operations ptdump_fops = {
22 .release = single_release,
25 int ptdump_debugfs_register(struct ptdump_info *info, const char *name)
28 pe = debugfs_create_file(name, 0400, NULL, info, &ptdump_fops);
29 return pe ? 0 : -ENOMEM;