Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp4334486imm; Tue, 11 Sep 2018 10:16:22 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYE30Yjdtr+bCcFuANdZgULkTzTG00sgs9rgtLJ1VMp83vOlpjCf1erzXq0MLVP44Ery8j+ X-Received: by 2002:a62:41d6:: with SMTP id g83-v6mr30614016pfd.219.1536686182715; Tue, 11 Sep 2018 10:16:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536686182; cv=none; d=google.com; s=arc-20160816; b=wPGrBxWryPc5Mc69dEk9Lt4hvcU2uFT2A1GoPtAc5hrk5+PD4q1XcsHXWatoKIdfSq zBSZ0Mt8JH6vqXSgkcW6qxprPa/jhFdR2lrW2nR8qO3Sn22x0FM2FE1JJXl/dY3DCgmR DBneDd7kCxZ5Mqq/mjnmRCGYxxwCyY76lPuw+rozQa2rP2d2lHHsgSwOQzQPW9KyMJv2 etC2W99ZlGs+tnmxqm9/4qTij2gWSlVqxogXtt+JwlRNiJudu7z3IZJlWyL70WvRvQHb /WtVzZkuU/Uqgp0kYnWw6ZAB8ojzWtbH/sTlssVn6I3YV9lepgjkpuLaXASCzfr8Q1Tj nRzA== 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; bh=Ue94d+gaP9bTk6anBMgOENQ1wADyZ8FPz25KUmhpsy8=; b=nXdzG8xO4iyFp3K2y8GGL0xYq3qs/1S7nWG/A0FD4JOIPvIq+QLIxXhwT/OWyLoxtA AB68LCr0H8+f5onUVJe7+U8DrHzNjuiC24ocX4Nr5/B8MnMp8yPyeh2G3/Z7rGOfPHSQ HwYFrdJ0CRxUEKw3u2Yp4+Ax94JarE/Wg7tF6HxVINAGO3llQ2UgXBnag2bMX4aEdO8x 6nkQwtjyu5x3GQRfKjxLFDwaSOm7F3eCcOeBczz3kJANYh+OaddFdQcfx6Py/R4ZQpKM sUkSjL70FlRQ3nXPNDSSa6vqGIaJjoHRQvnulw6U8CQLpM9o2vIPl5DHeFrsfp/YCeHe V+vg== 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 x188-v6si20991757pfx.19.2018.09.11.10.16.07; Tue, 11 Sep 2018 10:16:22 -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 S1728309AbeIKWPQ (ORCPT + 99 others); Tue, 11 Sep 2018 18:15:16 -0400 Received: from mga02.intel.com ([134.134.136.20]:31116 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728299AbeIKWPP (ORCPT ); Tue, 11 Sep 2018 18:15:15 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Sep 2018 10:14:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,361,1531810800"; d="scan'208";a="79642220" Received: from rchatre-s.jf.intel.com ([10.54.70.76]) by FMSMGA003.fm.intel.com with ESMTP; 11 Sep 2018 10:14:58 -0700 From: Reinette Chatre To: tglx@linutronix.de, fenghua.yu@intel.com, tony.luck@intel.com, peterz@infradead.org, mingo@redhat.com, acme@kernel.org Cc: gavin.hindman@intel.com, jithu.joseph@intel.com, dave.hansen@intel.com, hpa@zytor.com, x86@kernel.org, linux-kernel@vger.kernel.org, Reinette Chatre Subject: [PATCH V3 6/6] x86/intel_rdt: Re-enable pseudo-lock measurements Date: Tue, 11 Sep 2018 10:14:37 -0700 Message-Id: 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 Commit 4a7a54a55e ("x86/intel_rdt: Disable PMU access") disabled measurements of pseudo-locked regions because of incorrect usage of the performance monitoring hardware. Cache pseudo-locking measurements are now done correctly with the in-kernel perf API and its use can be re-enabled at this time. The adjustment to the in-kernel perf API also separated the L2 and L3 measurements that can be triggered separately from user space. The re-enabling of the measurements is thus not a simple revert of the original disable in order to accommodate the additional parameter possible. Signed-off-by: Reinette Chatre --- arch/x86/kernel/cpu/intel_rdt_pseudo_lock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kernel/cpu/intel_rdt_pseudo_lock.c b/arch/x86/kernel/cpu/intel_rdt_pseudo_lock.c index 5a294fe080d7..e2bd212f382f 100644 --- a/arch/x86/kernel/cpu/intel_rdt_pseudo_lock.c +++ b/arch/x86/kernel/cpu/intel_rdt_pseudo_lock.c @@ -1226,7 +1226,7 @@ static ssize_t pseudo_lock_measure_trigger(struct file *file, buf[buf_size] = '\0'; ret = kstrtoint(buf, 10, &sel); if (ret == 0) { - if (sel != 1) + if (sel != 1 && sel != 2 && sel != 3) return -EINVAL; ret = debugfs_file_get(file->f_path.dentry); if (ret) -- 2.17.0