Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0
0002 #include <linux/debugfs.h>
0003 #include <linux/memory_hotplug.h>
0004 #include <linux/seq_file.h>
0005 
0006 #include <asm/ptdump.h>
0007 
0008 static int ptdump_show(struct seq_file *m, void *v)
0009 {
0010     struct ptdump_info *info = m->private;
0011 
0012     get_online_mems();
0013     ptdump_walk(m, info);
0014     put_online_mems();
0015     return 0;
0016 }
0017 DEFINE_SHOW_ATTRIBUTE(ptdump);
0018 
0019 void __init ptdump_debugfs_register(struct ptdump_info *info, const char *name)
0020 {
0021     debugfs_create_file(name, 0400, NULL, info, &ptdump_fops);
0022 }