Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp1896982imm; Sat, 23 Jun 2018 05:10:14 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKLAmBbalE4WZ1oSJVXqVn8J7NpK7WoHZFhr+gIQpt8BIhpddR3ebSJ92gQaJ0vetsBYPOB X-Received: by 2002:a17:902:8:: with SMTP id 8-v6mr5433006pla.287.1529755814884; Sat, 23 Jun 2018 05:10:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529755814; cv=none; d=google.com; s=arc-20160816; b=tZCePShaJ642CDQQK7c8M9OMQaQlGqzeeSiA0lDj9nLt4NvrvEmcyvXWFxM2l8ufN8 mypI6Zw0kg6qGoDQRRn1LxEnvE8yVrgFWYOBdcbI8SC4MVpxX6bUjwYjYwoqlEfazCPh lwQX0LBh8Mp4Wdj8IjWsEHv+aVSv+ZQLdeVPOKUPdyvi38R/rYMO6mGSiWbxIOHSXoYj 8sE8JQgg0RUmE1Bm+GWPGQdMrc4+xKqzES2q3ebLvfhZWPDTzISCZbPEAGU9WTNLpnTV 3hgBLjekpZiK7T8W6bTjjdxdXBd+ZVvPBmnY/b2JFrX6rTojJuDaVO2YvHMPWKWqXSad Tuxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition :content-transfer-encoding:mime-version:robot-unsubscribe:robot-id :git-commit-id:subject:to:references:in-reply-to:reply-to:cc :message-id:from:date:arc-authentication-results; bh=LZBc3NJv5eDPApQdfrcuZMl2WwzOpxwDcsA/bh4Zpys=; b=hXqr3XYiIEr2njZSAHJptV5oCeK5mnqGZV6Pu3zs0BDr9wAQRGnpFQXe0PL3xR6dny c12usKB9wgUdPLmMDUaFH4mBYu1zLxzh6+QW90wbEjdD2vLcejYRARfXmz/2+bPCP1t+ eQgiwX5Au8fFY0/GisuRc4ZvoFsokSfZOkNvwxUi60ywmcZ8npv0bVl0sR1VhvF7eHNK aDgfm0nyDWjA9QdQ1tyPOZDhww7vmjKUmSx62EKaIL9/wFiHQb00bnDotDhD6bjHWfQT tTnEoYbY04KuuYMJSGjxywILvXKQXA0UcuYb2GemGwTaMt7u5FeK+fXi+FI6uOx9AfY2 1AaQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c10-v6si9454435pll.275.2018.06.23.05.09.16; Sat, 23 Jun 2018 05:10:14 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751822AbeFWMHV (ORCPT + 99 others); Sat, 23 Jun 2018 08:07:21 -0400 Received: from terminus.zytor.com ([198.137.202.136]:56091 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751520AbeFWMHT (ORCPT ); Sat, 23 Jun 2018 08:07:19 -0400 Received: from terminus.zytor.com (localhost [127.0.0.1]) by terminus.zytor.com (8.15.2/8.15.2) with ESMTPS id w5NC73Ul463152 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sat, 23 Jun 2018 05:07:03 -0700 Received: (from tipbot@localhost) by terminus.zytor.com (8.15.2/8.15.2/Submit) id w5NC71X1463147; Sat, 23 Jun 2018 05:07:01 -0700 Date: Sat, 23 Jun 2018 05:07:01 -0700 X-Authentication-Warning: terminus.zytor.com: tipbot set sender to tipbot@zytor.com using -f From: tip-bot for Reinette Chatre Message-ID: Cc: reinette.chatre@intel.com, sfr@canb.auug.org.au, viro@ZenIV.linux.org.uk, mingo@kernel.org, hpa@zytor.com, tglx@linutronix.de, dhowells@redhat.com, linux-kernel@vger.kernel.org Reply-To: reinette.chatre@intel.com, viro@ZenIV.linux.org.uk, sfr@canb.auug.org.au, mingo@kernel.org, hpa@zytor.com, tglx@linutronix.de, linux-kernel@vger.kernel.org, dhowells@redhat.com In-Reply-To: <410697ead08978bd12111c0afc4ce9e7bd71a5fe.1529706536.git.reinette.chatre@intel.com> References: <410697ead08978bd12111c0afc4ce9e7bd71a5fe.1529706536.git.reinette.chatre@intel.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/cache] x86/intel_rdt: Provide pseudo-locking hooks within rdt_mount Git-Commit-ID: 32206ab36553be8714d9253ce33f4085681d369c 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 X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, DATE_IN_FUTURE_96_Q autolearn=ham autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on terminus.zytor.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 32206ab36553be8714d9253ce33f4085681d369c Gitweb: https://git.kernel.org/tip/32206ab36553be8714d9253ce33f4085681d369c Author: Reinette Chatre AuthorDate: Fri, 22 Jun 2018 15:41:52 -0700 Committer: Thomas Gleixner CommitDate: Sat, 23 Jun 2018 12:53:19 +0200 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 Suggested-by: Al Viro Signed-off-by: Reinette Chatre Signed-off-by: Thomas Gleixner 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 Link: https://lkml.kernel.org/r/410697ead08978bd12111c0afc4ce9e7bd71a5fe.1529706536.git.reinette.chatre@intel.com --- arch/x86/kernel/cpu/intel_rdt.h | 9 +++++++++ arch/x86/kernel/cpu/intel_rdt_rdtgroup.c | 10 +++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/arch/x86/kernel/cpu/intel_rdt.h b/arch/x86/kernel/cpu/intel_rdt.h index 39752825e376..be152b3b2543 100644 --- a/arch/x86/kernel/cpu/intel_rdt.h +++ b/arch/x86/kernel/cpu/intel_rdt.h @@ -468,4 +468,13 @@ void cqm_handle_limbo(struct work_struct *work); bool has_busy_rmid(struct rdt_resource *r, struct rdt_domain *d); void __check_limbo(struct rdt_domain *d, bool force_free); +/* + * Define the hooks for Cache Pseudo-Locking to use within rdt_mount(). + * These are no-ops provided for the new kernfs changes to use as a + * baseline in preparation for a conflict-free merge between it + * (kernfs changes) and the Cache Pseudo-Locking enabling. + */ +static inline int rdt_pseudo_lock_init(void) { return 0; } +static inline void rdt_pseudo_lock_release(void) { } + #endif /* _ASM_X86_INTEL_RDT_H */ diff --git a/arch/x86/kernel/cpu/intel_rdt_rdtgroup.c b/arch/x86/kernel/cpu/intel_rdt_rdtgroup.c index 749856a2e736..fa668f967062 100644 --- a/arch/x86/kernel/cpu/intel_rdt_rdtgroup.c +++ b/arch/x86/kernel/cpu/intel_rdt_rdtgroup.c @@ -1289,10 +1289,16 @@ static struct dentry *rdt_mount(struct file_system_type *fs_type, rdtgroup_default.mon.mon_data_kn = kn_mondata; } + ret = rdt_pseudo_lock_init(); + if (ret) { + dentry = ERR_PTR(ret); + goto out_mondata; + } + dentry = kernfs_mount(fs_type, flags, rdt_root, RDTGROUP_SUPER_MAGIC, NULL); if (IS_ERR(dentry)) - goto out_mondata; + goto out_psl; if (rdt_alloc_capable) static_branch_enable_cpuslocked(&rdt_alloc_enable_key); @@ -1310,6 +1316,8 @@ static struct dentry *rdt_mount(struct file_system_type *fs_type, goto out; +out_psl: + rdt_pseudo_lock_release(); out_mondata: if (rdt_mon_capable) kernfs_remove(kn_mondata);