Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp1905960imm; Sat, 23 Jun 2018 05:21:32 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKWnWWo6cuIzIsz0mEXuuxVQ0wwC8yRlUBp0aNXzQ3VUZh8zbMPAozBkMAoZXSRzvlj57a1 X-Received: by 2002:a62:1fd6:: with SMTP id l83-v6mr5756319pfj.182.1529756492841; Sat, 23 Jun 2018 05:21:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529756492; cv=none; d=google.com; s=arc-20160816; b=q+NptXHFMjA5RUx3Hxmu65CSrSdhoqbyCz/lQ+qTk/Bfy8Jm+2GXzeYFmjHMtBfAEB 98leMzOBN4TiEAAk/2n16Mk7JvELhykqZqOiczU+qMBbJQ8vKbn8UgXffbJCb02zR7hN OE1AHWelb9DG2ZZ/VXFbKamVUh3p68+ETlXZFvchgyAYO8TliUOBinWNAOakRrP8SmHu ZgvsOxLO5TT55G83/+puurq3TvYY2pmliH+R108OV3ZyzDRlyiXDFfcISXxrCzXn2B00 N7NuKfwzbRQzHJvgAMgh+Num8FIN1XO4aAPNdbsZqA14YMfYklsL+aVgcpuslyK2dKXp nT7A== 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=KfUMNvFR14r1sw0M7O8rPDyuDC78vi+mx1KJnyEQ2cg=; b=FMV/6HHQE9yvwiV9wi8hnviiuEENtLz9lDwpnnFnKwVzvYEmVL7C5gidNrixBlcqWj JU4wFx4me7HFdhrVr2qaoH+mGDXeIiB01vu9bAibBzUXLmSXH2SEVyLvgSzcsrlmTTgI 8tiUNT+GEVjtW9WpmE/P9yySlFmTNqLxh4XP233QqL+buPldxFihwpzvYGPiVtc3Cyzr NsXtSD2w0GnNGL+hon42UUNL9Y7y0Yg2KOrFKMODaEob6lJLYT3AIrENTf58o7EQYX5q gXCyVvDw/gAkAoFyDe2EmysUy+3OfYoNBa9nTYm6mpJTdjC2SAEmQti9yHezbhNOY4ri 1fNQ== 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 u196-v6si7790826pgc.137.2018.06.23.05.21.18; Sat, 23 Jun 2018 05:21:32 -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 S1752089AbeFWMTF (ORCPT + 99 others); Sat, 23 Jun 2018 08:19:05 -0400 Received: from terminus.zytor.com ([198.137.202.136]:42963 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751707AbeFWMTC (ORCPT ); Sat, 23 Jun 2018 08:19:02 -0400 Received: from terminus.zytor.com (localhost [127.0.0.1]) by terminus.zytor.com (8.15.2/8.15.2) with ESMTPS id w5NCIwdj464834 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sat, 23 Jun 2018 05:18:58 -0700 Received: (from tipbot@localhost) by terminus.zytor.com (8.15.2/8.15.2/Submit) id w5NCIwc0464831; Sat, 23 Jun 2018 05:18:58 -0700 Date: Sat, 23 Jun 2018 05:18:58 -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: hpa@zytor.com, reinette.chatre@intel.com, tglx@linutronix.de, linux-kernel@vger.kernel.org, mingo@kernel.org Reply-To: tglx@linutronix.de, reinette.chatre@intel.com, hpa@zytor.com, mingo@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <14fd9494f87ca72a213b3a197d1172d4e66ae196.1529706536.git.reinette.chatre@intel.com> References: <14fd9494f87ca72a213b3a197d1172d4e66ae196.1529706536.git.reinette.chatre@intel.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/cache] x86/intel_rdt: Add check to determine if monitoring in progress Git-Commit-ID: bbcee99b67c5a8cc4e8037d561be9ed293961fd3 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: bbcee99b67c5a8cc4e8037d561be9ed293961fd3 Gitweb: https://git.kernel.org/tip/bbcee99b67c5a8cc4e8037d561be9ed293961fd3 Author: Reinette Chatre AuthorDate: Fri, 22 Jun 2018 15:42:14 -0700 Committer: Thomas Gleixner CommitDate: Sat, 23 Jun 2018 13:03:47 +0200 x86/intel_rdt: Add check to determine if monitoring in progress When a resource group is pseudo-locked it is orphaned without a class of service associated with it. We thus do not want any monitoring in progress on a resource group that will be used for pseudo-locking. Introduce a test that can be used to determine if pseudo-locking in progress on a resource group. Temporarily mark it as unused to avoid compile warnings until it is used. 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 Link: https://lkml.kernel.org/r/14fd9494f87ca72a213b3a197d1172d4e66ae196.1529706536.git.reinette.chatre@intel.com --- arch/x86/kernel/cpu/intel_rdt_pseudo_lock.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/arch/x86/kernel/cpu/intel_rdt_pseudo_lock.c b/arch/x86/kernel/cpu/intel_rdt_pseudo_lock.c index dc79b3090ac5..8693dbe602a2 100644 --- a/arch/x86/kernel/cpu/intel_rdt_pseudo_lock.c +++ b/arch/x86/kernel/cpu/intel_rdt_pseudo_lock.c @@ -13,6 +13,19 @@ #include "intel_rdt.h" +/** + * rdtgroup_monitor_in_progress - Test if monitoring in progress + * @r: resource group being queried + * + * Return: 1 if monitor groups have been created for this resource + * group, 0 otherwise. + */ +static int __attribute__ ((unused)) +rdtgroup_monitor_in_progress(struct rdtgroup *rdtgrp) +{ + return !list_empty(&rdtgrp->mon.crdtgrp_list); +} + /** * rdtgroup_locksetup_user_restrict - Restrict user access to group * @rdtgrp: resource group needing access restricted