Skip to content

Commit 32206ab

Browse files
rchatreKAGA-KOKO
authored andcommitted
x86/intel_rdt: Provide pseudo-locking hooks within rdt_mount
Stephen Rothwell reported that the Cache Pseudo-Locking enabling and the kernfs support for mounting with fs_context are conflicting. In preparation for a conflict-free merge between the two repos some no-op hooks are created within the RDT mount function being changed by the two features. The goal is for this commit to be placed on a minimal no-rebase branch to be consumed by both features. Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Suggested-by: Al Viro <viro@ZenIV.linux.org.uk> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: fenghua.yu@intel.com Cc: tony.luck@intel.com Cc: vikas.shivappa@linux.intel.com Cc: gavin.hindman@intel.com Cc: jithu.joseph@intel.com Cc: dave.hansen@intel.com Cc: hpa@zytor.com Cc: David Howells <dhowells@redhat.com> Link: https://lkml.kernel.org/r/410697ead08978bd12111c0afc4ce9e7bd71a5fe.1529706536.git.reinette.chatre@intel.com
1 parent ce397d2 commit 32206ab

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

arch/x86/kernel/cpu/intel_rdt.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -468,4 +468,13 @@ void cqm_handle_limbo(struct work_struct *work);
468468
bool has_busy_rmid(struct rdt_resource *r, struct rdt_domain *d);
469469
void __check_limbo(struct rdt_domain *d, bool force_free);
470470

471+
/*
472+
* Define the hooks for Cache Pseudo-Locking to use within rdt_mount().
473+
* These are no-ops provided for the new kernfs changes to use as a
474+
* baseline in preparation for a conflict-free merge between it
475+
* (kernfs changes) and the Cache Pseudo-Locking enabling.
476+
*/
477+
static inline int rdt_pseudo_lock_init(void) { return 0; }
478+
static inline void rdt_pseudo_lock_release(void) { }
479+
471480
#endif /* _ASM_X86_INTEL_RDT_H */

arch/x86/kernel/cpu/intel_rdt_rdtgroup.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1289,10 +1289,16 @@ static struct dentry *rdt_mount(struct file_system_type *fs_type,
12891289
rdtgroup_default.mon.mon_data_kn = kn_mondata;
12901290
}
12911291

1292+
ret = rdt_pseudo_lock_init();
1293+
if (ret) {
1294+
dentry = ERR_PTR(ret);
1295+
goto out_mondata;
1296+
}
1297+
12921298
dentry = kernfs_mount(fs_type, flags, rdt_root,
12931299
RDTGROUP_SUPER_MAGIC, NULL);
12941300
if (IS_ERR(dentry))
1295-
goto out_mondata;
1301+
goto out_psl;
12961302

12971303
if (rdt_alloc_capable)
12981304
static_branch_enable_cpuslocked(&rdt_alloc_enable_key);
@@ -1310,6 +1316,8 @@ static struct dentry *rdt_mount(struct file_system_type *fs_type,
13101316

13111317
goto out;
13121318

1319+
out_psl:
1320+
rdt_pseudo_lock_release();
13131321
out_mondata:
13141322
if (rdt_mon_capable)
13151323
kernfs_remove(kn_mondata);

0 commit comments

Comments
 (0)