[tip:,perf/core] perf/x86/lbr: Simplify the exposure check for the LBR_INFO registers
Message ID | 167214233418.4906.13269799714918773894.tip-bot2@tip-bot2 |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp1354158wrt; Tue, 27 Dec 2022 04:00:11 -0800 (PST) X-Google-Smtp-Source: AMrXdXtoTINAulTKNYkXRB83ykWSGznnG24BCUksvqjD8WCdyTPoOmk+fAg2rUExfRtdMEFi9FsV X-Received: by 2002:a17:907:cb85:b0:7c0:f216:cc14 with SMTP id un5-20020a170907cb8500b007c0f216cc14mr18343578ejc.11.1672142411275; Tue, 27 Dec 2022 04:00:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672142411; cv=none; d=google.com; s=arc-20160816; b=g5ey404N1C/wClCJpnBq2L5brD/DUIz0cqRYU/o7tKrAq7RYzuS3NJ13ce6Qa4j/JF ov1clS2ghfIt7lboKfrMo+5YjUbSl8qhAr3OLohH/zPBo1UF65WDkGssDyZmmZLnB/8h uFWDxVLIqeJMpqkl9ZoJGE6/71SOFiiXOn7iyIokkSp4AELycGiouOgF0GmBW5nuWgIW LY87UkEmE/ypc81dC1yisE4P5fVAgfuHGqR/F0W3Ax8TA9jtcfk3zZNXWEiOgOS9w0s6 qdpDTanXnQd+nCllz7xXY/zNtSL1FGoGDF2/EqbyqkfcBLw/i3yXeguQ7CbKKeiaotyg 6KLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=9TZqt83Scy1dn6mE5MEfELkLQ3zO2SAdanIc2JfFnxw=; b=tdfdQOMif23w11U6EE3/nhbTUpC1gdQPRv8QvHW/QMaiUmafxFs2+gaVkSS8XOnqZk YclO7qMP9dLsOat8SjNN7+D9PVOKYzWnR4hZ5xrMWOF9cZs4aDGjxaTZHg83BI7/HVux A95LTBpmopQojM/EwivEf1MM82xFnL28aFchQGzW6BJb4vvfQe/GHg2v9HZDJUFM6BNi y/LxbTAKcQxi1Lznc+O8otPOBpTO7MKo08gai1Ml0tYDY8Nc46CyTXnc+Q6KDk+0vc1t cIrKfd68bLZlk1Ld2GxOyHZTBayFWK/+3m+ufUdMSmqyMFlYaKZxLvR/rSwf63x2uGJ3 i0Ew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=qhk9vEUl; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w19-20020a056402269300b0046277d2cb0csi12054502edd.470.2022.12.27.03.59.46; Tue, 27 Dec 2022 04:00:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=qhk9vEUl; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231898AbiL0L7c (ORCPT <rfc822;eddaouddi.ayoub@gmail.com> + 99 others); Tue, 27 Dec 2022 06:59:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43314 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231972AbiL0L64 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 27 Dec 2022 06:58:56 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D5769B7E6; Tue, 27 Dec 2022 03:58:55 -0800 (PST) Date: Tue, 27 Dec 2022 11:58:54 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1672142334; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=9TZqt83Scy1dn6mE5MEfELkLQ3zO2SAdanIc2JfFnxw=; b=qhk9vEUlzTUL6qHkKrQO9QFUF2NXJE3xVPJEdAdFY08IU5JnYQHZd55sFJ419dC6EPijC1 mjVpDTKrjMx9HAYgstMpmhHifMTBNcFmp5WW80H4FwOLhQnWZdJO0dSMWcRTgNsUSNo8sH dn02wnJwqiAqEOhomq8QE1VM6MHDhI6cIj9myyADld1sbGZn6+kyLYnBuKkPUFFzO/5EJ3 LHV2BMBYFctRSZzZf6RqGl11KEYVc5ygwbixuasfMZ8IqDWuOZtUTFbTWlyS/2HOLs+U4s YHoxymZh3ej3bUrti4bZi7gtcVgb0q8oNK/XytllpB/3zpQ0xqg7HDaJEFyxdA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1672142334; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=9TZqt83Scy1dn6mE5MEfELkLQ3zO2SAdanIc2JfFnxw=; b=D2nnJJTYpmrpxMq+3A5RuX2SAAzcvNVd5Efl1e3xTOx5CaAApzcyYPK+S0rl7Zrzj0RLHr twk7hgKJIkfLMwDQ== From: "tip-bot2 for Like Xu" <tip-bot2@linutronix.de> Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: perf/core] perf/x86/lbr: Simplify the exposure check for the LBR_INFO registers Cc: Like Xu <like.xu@linux.intel.com>, Yang Weijiang <weijiang.yang@intel.com>, "Peter Zijlstra (Intel)" <peterz@infradead.org>, Kan Liang <kan.liang@linux.intel.com>, Andi Kleen <ak@linux.intel.com>, x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20221125040604.5051-2-weijiang.yang@intel.com> References: <20221125040604.5051-2-weijiang.yang@intel.com> MIME-Version: 1.0 Message-ID: <167214233418.4906.13269799714918773894.tip-bot2@tip-bot2> Robot-ID: <tip-bot2@linutronix.de> Robot-Unsubscribe: Contact <mailto:tglx@linutronix.de> to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1750447302484540068?= X-GMAIL-MSGID: =?utf-8?q?1753368400536719567?= |
Series |
[tip:,perf/core] perf/x86/lbr: Simplify the exposure check for the LBR_INFO registers
|
|
Commit Message
tip-bot2 for Thomas Gleixner
Dec. 27, 2022, 11:58 a.m. UTC
The following commit has been merged into the perf/core branch of tip: Commit-ID: 03c4c7f88709fac0e20b6a48357c73d6fc50e544 Gitweb: https://git.kernel.org/tip/03c4c7f88709fac0e20b6a48357c73d6fc50e544 Author: Like Xu <like.xu@linux.intel.com> AuthorDate: Thu, 24 Nov 2022 23:05:50 -05:00 Committer: Peter Zijlstra <peterz@infradead.org> CommitterDate: Tue, 27 Dec 2022 12:52:07 +01:00 perf/x86/lbr: Simplify the exposure check for the LBR_INFO registers The x86_pmu.lbr_info is 0 unless explicitly initialized, so there's no point checking x86_pmu.intel_cap.lbr_format. Signed-off-by: Like Xu <like.xu@linux.intel.com> Signed-off-by: Yang Weijiang <weijiang.yang@intel.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: Kan Liang <kan.liang@linux.intel.com> Reviewed-by: Andi Kleen <ak@linux.intel.com> Link: https://lkml.kernel.org/r/20221125040604.5051-2-weijiang.yang@intel.com --- arch/x86/events/intel/lbr.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/arch/x86/events/intel/lbr.c b/arch/x86/events/intel/lbr.c index 1f21f57..c3b0d15 100644 --- a/arch/x86/events/intel/lbr.c +++ b/arch/x86/events/intel/lbr.c @@ -1606,12 +1606,10 @@ clear_arch_lbr: */ void x86_perf_get_lbr(struct x86_pmu_lbr *lbr) { - int lbr_fmt = x86_pmu.intel_cap.lbr_format; - lbr->nr = x86_pmu.lbr_nr; lbr->from = x86_pmu.lbr_from; lbr->to = x86_pmu.lbr_to; - lbr->info = (lbr_fmt == LBR_FORMAT_INFO) ? x86_pmu.lbr_info : 0; + lbr->info = x86_pmu.lbr_info; } EXPORT_SYMBOL_GPL(x86_perf_get_lbr);