Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933304AbcLINTT (ORCPT ); Fri, 9 Dec 2016 08:19:19 -0500 Received: from terminus.zytor.com ([198.137.202.10]:47376 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932561AbcLINTS (ORCPT ); Fri, 9 Dec 2016 08:19:18 -0500 Date: Fri, 9 Dec 2016 05:19:03 -0800 From: tip-bot for Shaohua Li Message-ID: Cc: tglx@linutronix.de, linux-kernel@vger.kernel.org, shli@fb.com, hpa@zytor.com, fenghua.yu@intel.com, mingo@kernel.org Reply-To: linux-kernel@vger.kernel.org, tglx@linutronix.de, mingo@kernel.org, fenghua.yu@intel.com, shli@fb.com, hpa@zytor.com In-Reply-To: <7dce7c1886ac9289442d254ea18322c92bd968da.1480717072.git.shli@fb.com> References: <7dce7c1886ac9289442d254ea18322c92bd968da.1480717072.git.shli@fb.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/cache] x86/intel_rdt: Implement show_options() for resctrlfs Git-Commit-ID: 76ae054c69a745ded388fc4ae70422d74c5bc77d X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1535 Lines: 45 Commit-ID: 76ae054c69a745ded388fc4ae70422d74c5bc77d Gitweb: http://git.kernel.org/tip/76ae054c69a745ded388fc4ae70422d74c5bc77d Author: Shaohua Li AuthorDate: Fri, 2 Dec 2016 14:21:06 -0800 Committer: Thomas Gleixner CommitDate: Fri, 9 Dec 2016 14:12:18 +0100 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 Cc: Fenghua Yu Link: http://lkml.kernel.org/r/7dce7c1886ac9289442d254ea18322c92bd968da.1480717072.git.shli@fb.com Signed-off-by: Thomas Gleixner --- arch/x86/kernel/cpu/intel_rdt_rdtgroup.c | 12 ++++++++++-- 1 file 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 1afd3f3..8af04af 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)