diff options
author | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2011-09-23 16:32:47 -0400 |
---|---|---|
committer | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2011-09-23 22:22:32 -0400 |
commit | a867db10e89e12a3d97dedafdd411aa1527a6540 (patch) | |
tree | 0db5e4335a92447d47b0924c936993e187323de0 /arch/x86/xen | |
parent | 10fe570fc16721d78afdba9689720094527c1ba3 (diff) |
xen/p2m: Make debug/xen/mmu/p2m visible again.
We dropped a lot of the MMU debugfs in favour of using
tracing API - but there is one which just provides
mostly static information that was made invisible by this change.
Bring it back.
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Diffstat (limited to 'arch/x86/xen')
-rw-r--r-- | arch/x86/xen/mmu.c | 14 | ||||
-rw-r--r-- | arch/x86/xen/p2m.c | 35 |
2 files changed, 32 insertions, 17 deletions
diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c index 3c9aecd09ed1..4df0444b2cee 100644 --- a/arch/x86/xen/mmu.c +++ b/arch/x86/xen/mmu.c | |||
@@ -2362,17 +2362,3 @@ out: | |||
2362 | return err; | 2362 | return err; |
2363 | } | 2363 | } |
2364 | EXPORT_SYMBOL_GPL(xen_remap_domain_mfn_range); | 2364 | EXPORT_SYMBOL_GPL(xen_remap_domain_mfn_range); |
2365 | |||
2366 | #ifdef CONFIG_XEN_DEBUG_FS | ||
2367 | static int p2m_dump_open(struct inode *inode, struct file *filp) | ||
2368 | { | ||
2369 | return single_open(filp, p2m_dump_show, NULL); | ||
2370 | } | ||
2371 | |||
2372 | static const struct file_operations p2m_dump_fops = { | ||
2373 | .open = p2m_dump_open, | ||
2374 | .read = seq_read, | ||
2375 | .llseek = seq_lseek, | ||
2376 | .release = single_release, | ||
2377 | }; | ||
2378 | #endif /* CONFIG_XEN_DEBUG_FS */ | ||
diff --git a/arch/x86/xen/p2m.c b/arch/x86/xen/p2m.c index 58efeb9d5440..cc2f8dcf8dda 100644 --- a/arch/x86/xen/p2m.c +++ b/arch/x86/xen/p2m.c | |||
@@ -782,8 +782,9 @@ unsigned long m2p_find_override_pfn(unsigned long mfn, unsigned long pfn) | |||
782 | EXPORT_SYMBOL_GPL(m2p_find_override_pfn); | 782 | EXPORT_SYMBOL_GPL(m2p_find_override_pfn); |
783 | 783 | ||
784 | #ifdef CONFIG_XEN_DEBUG_FS | 784 | #ifdef CONFIG_XEN_DEBUG_FS |
785 | 785 | #include <linux/debugfs.h> | |
786 | int p2m_dump_show(struct seq_file *m, void *v) | 786 | #include "debugfs.h" |
787 | static int p2m_dump_show(struct seq_file *m, void *v) | ||
787 | { | 788 | { |
788 | static const char * const level_name[] = { "top", "middle", | 789 | static const char * const level_name[] = { "top", "middle", |
789 | "entry", "abnormal" }; | 790 | "entry", "abnormal" }; |
@@ -856,4 +857,32 @@ int p2m_dump_show(struct seq_file *m, void *v) | |||
856 | #undef TYPE_PFN | 857 | #undef TYPE_PFN |
857 | #undef TYPE_UNKNOWN | 858 | #undef TYPE_UNKNOWN |
858 | } | 859 | } |
859 | #endif | 860 | |
861 | static int p2m_dump_open(struct inode *inode, struct file *filp) | ||
862 | { | ||
863 | return single_open(filp, p2m_dump_show, NULL); | ||
864 | } | ||
865 | |||
866 | static const struct file_operations p2m_dump_fops = { | ||
867 | .open = p2m_dump_open, | ||
868 | .read = seq_read, | ||
869 | .llseek = seq_lseek, | ||
870 | .release = single_release, | ||
871 | }; | ||
872 | |||
873 | static struct dentry *d_mmu_debug; | ||
874 | |||
875 | static int __init xen_p2m_debugfs(void) | ||
876 | { | ||
877 | struct dentry *d_xen = xen_init_debugfs(); | ||
878 | |||
879 | if (d_xen == NULL) | ||
880 | return -ENOMEM; | ||
881 | |||
882 | d_mmu_debug = debugfs_create_dir("mmu", d_xen); | ||
883 | |||
884 | debugfs_create_file("p2m", 0600, d_mmu_debug, NULL, &p2m_dump_fops); | ||
885 | return 0; | ||
886 | } | ||
887 | fs_initcall(xen_p2m_debugfs); | ||
888 | #endif /* CONFIG_XEN_DEBUG_FS */ | ||