Johnny Hughes
2019-02-04 c1f36c28393a7bb126cbf436cd6a4077a5b5c313
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
From 55f37c369d9f564cdb7b738fd2a47b7b8975ac52 Mon Sep 17 00:00:00 2001
From: Hoan Tran <hoan.tran@amperecomputing.com>
Date: Tue, 5 Jun 2018 14:48:44 -0700
Subject: [PATCH 10/11] BACKPORT: perf: xgene: Fix IOB SLOW PMU parser error
 
This patch fixes the below parser error of the IOB SLOW PMU.
 
    # perf stat -a -e iob-slow0/cycle-count/ sleep 1
    evenf syntax error: 'iob-slow0/cycle-count/'
                             \___ parser error
 
It replaces the "-" character by "_" character inside the PMU name.
 
Without this patch, perf for "iob-slow0" PMU does not work.
 
This patch is backported from https://lkml.org/lkml/2018/6/6/754
 
Change-Id: Ia5085c305e32f5651e8deedee2958a8b2a987c15
Signed-off-by: Hoan Tran <hoan.tran@amperecomputing.com>
---
 drivers/perf/xgene_pmu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 
diff --git a/drivers/perf/xgene_pmu.c b/drivers/perf/xgene_pmu.c
index eb23311..8b79c2f 100644
--- a/drivers/perf/xgene_pmu.c
+++ b/drivers/perf/xgene_pmu.c
@@ -1463,7 +1463,7 @@ static char *xgene_pmu_dev_name(struct device *dev, u32 type, int id)
     case PMU_TYPE_IOB:
         return devm_kasprintf(dev, GFP_KERNEL, "iob%d", id);
     case PMU_TYPE_IOB_SLOW:
-        return devm_kasprintf(dev, GFP_KERNEL, "iob-slow%d", id);
+        return devm_kasprintf(dev, GFP_KERNEL, "iob_slow%d", id);
     case PMU_TYPE_MCB:
         return devm_kasprintf(dev, GFP_KERNEL, "mcb%d", id);
     case PMU_TYPE_MC:
-- 
1.8.3.1