Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1015213imm; Wed, 19 Sep 2018 10:31:27 -0700 (PDT) X-Google-Smtp-Source: ANB0Vda2MnAEWKK1ja5dlJf8OvbNQ6TWpmGkVgwOOKBWPEVxhfWoHVhs3ju7AR+aNgr8y0MuFYGe X-Received: by 2002:a17:902:261:: with SMTP id 88-v6mr9994119plc.331.1537378287360; Wed, 19 Sep 2018 10:31:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537378287; cv=none; d=google.com; s=arc-20160816; b=OecaSBckfEV0env24oOx15DnPOXRxKg7fVj5K4P1kkhUJMgL/Acf6u/eaaFkvkY1kQ oxYwBPXVa00kEUQI6KjD+E+96pHdgQ8yIuZmQpGn9hwYK0mpKHZ+vIqjSQ5ZQV8+bqu/ D8wc/5wBPABp+iHW7369/e8HRxAsIizpsZvhWTTI2by/0hnNdMiWT/BVlhfR7yXXsGo0 QjGePcX0If7w28Tc1lnLaKXCjdFGMqK4xSdPeJxKSC3AgAwG8XPDMVrSOpWP+1E2mQvz fnp3QcAn8qXCgae3n57dXqLpQNDTUDcSTAGNhH4mgjNYPxE5Dw6Y1k4kNwHi4him+azg yGgA== 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=wke4sx5pWGJbk69LE2SHYFykpA1/MgkXPS38PpyN7oQ=; b=XIm6ETUbDHRih9DGTBOxE/habReXPhP2Zto4SMCH6Z0X421wAdqQwfrkOd2fFPt+Ew Q0P9C2SxtMRqmH6E/GBanjHFfW7Ohtttqxgw5IkUmUEUyDdE3HK9dd+HvvYZHUm7aNXM 7x0D7jqZdn98c1rM9BszkZXticgbtFC0QSMdgLSG8M8NSub3grbgwQWUx0g2Z6Q0Z/va foO7l/QhehVrgpBTnzD2QyoxxfYTXZXzBAhdrMVI+wrdBy6ujI6/qSatQCFT3ZXdDFn2 fBcRDpXjTneDJyf0a0fiQZptb5SaK6yffNOwKLvEF2zcbsQlcfgcVf0W2lRsUC1tKie9 5XlA== 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 x13-v6si19661959pgr.153.2018.09.19.10.31.11; Wed, 19 Sep 2018 10:31:27 -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 S1733017AbeISXI7 (ORCPT + 99 others); Wed, 19 Sep 2018 19:08:59 -0400 Received: from mga05.intel.com ([192.55.52.43]:33317 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731762AbeISXI7 (ORCPT ); Wed, 19 Sep 2018 19:08:59 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Sep 2018 10:30:03 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,394,1531810800"; d="scan'208";a="87551439" Received: from rchatre-s.jf.intel.com ([10.54.70.76]) by fmsmga002.fm.intel.com with ESMTP; 19 Sep 2018 10:30:02 -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 V5 6/6] x86/intel_rdt: Re-enable pseudo-lock measurements Date: Wed, 19 Sep 2018 10:29:11 -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 4a7a54a55e72 ("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 c35b975e3b1e..edf30c94c226 100644 --- a/arch/x86/kernel/cpu/intel_rdt_pseudo_lock.c +++ b/arch/x86/kernel/cpu/intel_rdt_pseudo_lock.c @@ -1237,7 +1237,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