[PATCH v4 11/11] perf/x86/rapl: Remove the unused function cpu_to_rapl_pmu

From: Dhananjay Ugwekar
Date: Thu Jul 11 2024 - 06:31:46 EST


After the addition of per-core counters support, this function
does not work as the same CPU can be mapped to multiple rapl_pmu
structs (package or per-core). So, remove it.

Signed-off-by: Dhananjay Ugwekar <Dhananjay.Ugwekar@xxxxxxx>
---
arch/x86/events/rapl.c | 12 ------------
1 file changed, 12 deletions(-)

diff --git a/arch/x86/events/rapl.c b/arch/x86/events/rapl.c
index 91eb9850df9b..6edbf798a1a0 100644
--- a/arch/x86/events/rapl.c
+++ b/arch/x86/events/rapl.c
@@ -183,18 +183,6 @@ static inline const struct cpumask *get_rapl_pmu_cpumask(int cpu)
topology_die_cpumask(cpu);
}

-static inline struct rapl_pmu *cpu_to_rapl_pmu(unsigned int cpu)
-{
- unsigned int rapl_pmu_idx = get_rapl_pmu_idx(cpu);
-
- /*
- * The unsigned check also catches the '-1' return value for non
- * existent mappings in the topology map.
- */
- return rapl_pmu_idx < rapl_pmus_pkg->nr_rapl_pmu ?
- rapl_pmus_pkg->rapl_pmu[rapl_pmu_idx] : NULL;
-}
-
static inline u64 rapl_read_counter(struct perf_event *event)
{
u64 raw;
--
2.34.1