diff options
author | Shaohua Li <shli@fb.com> | 2016-12-02 14:21:06 -0800 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2016-12-09 14:12:18 +0100 |
commit | 76ae054c69a745ded388fc4ae70422d74c5bc77d (patch) | |
tree | 38ea6180a58c34c2b013f907d3c665a1699430f0 /arch | |
parent | 74fcdae1a7fdf30de5413ccc1eca271415d01124 (diff) | |
download | linux-76ae054c69a745ded388fc4ae70422d74c5bc77d.tar.gz linux-76ae054c69a745ded388fc4ae70422d74c5bc77d.tar.bz2 linux-76ae054c69a745ded388fc4ae70422d74c5bc77d.zip |
x86/intel_rdt: Implement show_options() for resctrlfs
Implement show_options() callback for intel resource control filesystem
to expose the active mount options in /proc/
Signed-off-by: Shaohua Li <shli@fb.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Link: http://lkml.kernel.org/r/7dce7c1886ac9289442d254ea18322c92bd968da.1480717072.git.shli@fb.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/kernel/cpu/intel_rdt_rdtgroup.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/arch/x86/kernel/cpu/intel_rdt_rdtgroup.c b/arch/x86/kernel/cpu/intel_rdt_rdtgroup.c index 1afd3f393501..8af04afdfcb9 100644 --- a/arch/x86/kernel/cpu/intel_rdt_rdtgroup.c +++ b/arch/x86/kernel/cpu/intel_rdt_rdtgroup.c @@ -1036,9 +1036,17 @@ out: return ret; } +static int rdtgroup_show_options(struct seq_file *seq, struct kernfs_root *kf) +{ + if (rdt_resources_all[RDT_RESOURCE_L3DATA].enabled) + seq_puts(seq, ",cdp"); + return 0; +} + static struct kernfs_syscall_ops rdtgroup_kf_syscall_ops = { - .mkdir = rdtgroup_mkdir, - .rmdir = rdtgroup_rmdir, + .mkdir = rdtgroup_mkdir, + .rmdir = rdtgroup_rmdir, + .show_options = rdtgroup_show_options, }; static int __init rdtgroup_setup_root(void) |