lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <173313805444.412.14474756773372469878.tip-bot2@tip-bot2>
Date: Mon, 02 Dec 2024 11:14:14 -0000
From: "tip-bot2 for Dhananjay Ugwekar" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Dhananjay Ugwekar <Dhananjay.Ugwekar@....com>,
 "Peter Zijlstra (Intel)" <peterz@...radead.org>,
 "Gautham R. Shenoy" <gautham.shenoy@....com>, Zhang Rui <rui.zhang@...el.com>,
 x86@...nel.org, linux-kernel@...r.kernel.org
Subject: [tip: perf/core] perf/x86/rapl: Remove the global variable rapl_msrs

The following commit has been merged into the perf/core branch of tip:

Commit-ID:     bdc57ec7054842e5cb3b0a2da87b0e73075a96e6
Gitweb:        https://git.kernel.org/tip/bdc57ec7054842e5cb3b0a2da87b0e73075a96e6
Author:        Dhananjay Ugwekar <Dhananjay.Ugwekar@....com>
AuthorDate:    Fri, 15 Nov 2024 06:08:04 
Committer:     Peter Zijlstra <peterz@...radead.org>
CommitterDate: Mon, 02 Dec 2024 12:01:36 +01:00

perf/x86/rapl: Remove the global variable rapl_msrs

Prepare for the addition of RAPL core energy counter support.

After making the rapl_model struct global, the rapl_msrs global
variable isn't needed, so remove it.

Signed-off-by: Dhananjay Ugwekar <Dhananjay.Ugwekar@....com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
Reviewed-by: "Gautham R. Shenoy" <gautham.shenoy@....com>
Reviewed-by: Zhang Rui <rui.zhang@...el.com>
Tested-by: Zhang Rui <rui.zhang@...el.com>
Link: https://lore.kernel.org/r/20241115060805.447565-9-Dhananjay.Ugwekar@amd.com
---
 arch/x86/events/rapl.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/arch/x86/events/rapl.c b/arch/x86/events/rapl.c
index 8cdc578..aef2d0e 100644
--- a/arch/x86/events/rapl.c
+++ b/arch/x86/events/rapl.c
@@ -150,7 +150,6 @@ static int rapl_pkg_hw_unit[NR_RAPL_PKG_DOMAINS] __read_mostly;
 static struct rapl_pmus *rapl_pmus_pkg;
 static unsigned int rapl_pkg_cntr_mask;
 static u64 rapl_timer_ms;
-static struct perf_msr *rapl_msrs;
 static struct rapl_model *rapl_model;
 
 /*
@@ -382,7 +381,7 @@ static int rapl_pmu_event_init(struct perf_event *event)
 		return -EINVAL;
 
 	event->pmu_private = rapl_pmu;
-	event->hw.event_base = rapl_msrs[bit].msr;
+	event->hw.event_base = rapl_model->rapl_pkg_msrs[bit].msr;
 	event->hw.config = cfg;
 	event->hw.idx = bit;
 
@@ -811,9 +810,7 @@ static int __init rapl_pmu_init(void)
 
 	rapl_model = (struct rapl_model *) id->driver_data;
 
-	rapl_msrs = rapl_model->rapl_pkg_msrs;
-
-	rapl_pkg_cntr_mask = perf_msr_probe(rapl_msrs, PERF_RAPL_PKG_EVENTS_MAX,
+	rapl_pkg_cntr_mask = perf_msr_probe(rapl_model->rapl_pkg_msrs, PERF_RAPL_PKG_EVENTS_MAX,
 					false, (void *) &rapl_model->pkg_events);
 
 	ret = rapl_check_hw_unit();

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ