Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp1376550imm; Fri, 22 Jun 2018 15:49:37 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIkWGWB1nKeDW2+ykhyHnMWSj9VMngV/pIfzFcWu1+pkATfXm3PKYnbyJ4/JL7qh9oVwbBB X-Received: by 2002:a65:6619:: with SMTP id w25-v6mr2936407pgv.195.1529707777532; Fri, 22 Jun 2018 15:49:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529707777; cv=none; d=google.com; s=arc-20160816; b=AZyViDpYuzBjgyt45kwY26x5NcL7orJQ20q9N1cV4MpuIpDIuvwB+U4rLNZ1TB5MMw Iy4EoenKhhglPNVIyvAGDvIOHdC+WxZ7l7EuKWf35dK5Y0sGze/DYUnIHgCieOYpbB3y vu39jg8beeGOhrJEClWf62huo+oZbJFomTCKVfwCyIIzzf15LFk92F/hIA6+Nvt/UKVV VqHXCiteSnSTop+tEATqe6Y+DdxUuH69zbCc34GJaFuiQdD49D5DZPTRY5a5wZ4gUBgi 9d70JS06pN83CZukkIpQIptJ95PaKmCZylfrQ9EGQG6xXJ20O+q8l92QTAWGf72Pg9IE 3YVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=aYp4GNEi8qfq+tunEwWqyXB4XmGlHsEZg9jVeXiLejU=; b=0e6Hz2UuEV68vO+Bef8dl6+Pqm6AKa5yi2zmtkEJUMbQZPeQlk7JA9ouV/DS+/NL4Z z+1CRtQioKPR05CbCrjzpuyI4pHk1XBDRjgKE56F3iBsdp3EOlMpT+Uoy/ULqmEHNGX1 CHP69+39whPQUePCOI22qh5V233Ua8c2Dlx18hENSvBSARSLq0vOVatgI3E0zSF0tXch Y3kD0qEHSb4Tu0UNObsHjLsa1sLtRxJMEsTJLxXT84eKwf3er4gAlzxKYEfWTth+PlyD E5GHrY+3OlSX8OacUlkI4muQtkTvnGBXH+6tQsXSexCdast4q9iBwEy2y7bs6bgYfVPT V8tg== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c11-v6si7158052pgt.686.2018.06.22.15.49.23; Fri, 22 Jun 2018 15:49:37 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933920AbeFVWmv (ORCPT + 99 others); Fri, 22 Jun 2018 18:42:51 -0400 Received: from mga17.intel.com ([192.55.52.151]:52514 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754618AbeFVWms (ORCPT ); Fri, 22 Jun 2018 18:42:48 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Jun 2018 15:42:47 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,259,1526367600"; d="scan'208";a="234843349" Received: from rchatre-s.jf.intel.com ([10.54.70.76]) by orsmga005.jf.intel.com with ESMTP; 22 Jun 2018 15:42:47 -0700 From: Reinette Chatre To: tglx@linutronix.de, fenghua.yu@intel.com, tony.luck@intel.com, vikas.shivappa@linux.intel.com Cc: gavin.hindman@intel.com, jithu.joseph@intel.com, dave.hansen@intel.com, mingo@redhat.com, hpa@zytor.com, x86@kernel.org, linux-kernel@vger.kernel.org, Reinette Chatre , David Howells Subject: [PATCH V7 01/41] x86/intel_rdt: Provide pseudo-locking hooks within rdt_mount Date: Fri, 22 Jun 2018 15:41:52 -0700 Message-Id: <410697ead08978bd12111c0afc4ce9e7bd71a5fe.1529706536.git.reinette.chatre@intel.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Cc: David Howells --- arch/x86/kernel/cpu/intel_rdt_rdtgroup.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/arch/x86/kernel/cpu/intel_rdt_rdtgroup.c b/arch/x86/kernel/cpu/intel_rdt_rdtgroup.c index 749856a2e736..7f32bca02b75 100644 --- a/arch/x86/kernel/cpu/intel_rdt_rdtgroup.c +++ b/arch/x86/kernel/cpu/intel_rdt_rdtgroup.c @@ -1236,6 +1236,15 @@ static int mkdir_mondata_all(struct kernfs_node *parent_kn, struct rdtgroup *prgrp, struct kernfs_node **mon_data_kn); +/* + * 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. + */ +#define rdt_pseudo_lock_init() 0 +#define rdt_pseudo_lock_release() do { } while (0) + static struct dentry *rdt_mount(struct file_system_type *fs_type, int flags, const char *unused_dev_name, void *data) @@ -1289,10 +1298,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 +1325,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); -- 2.17.0