Patch "perf pmu arm64: Fix reading the PMU cpu slots in sysfs" has been added to the 6.4-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    perf pmu arm64: Fix reading the PMU cpu slots in sysfs

to the 6.4-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     perf-pmu-arm64-fix-reading-the-pmu-cpu-slots-in-sysf.patch
and it can be found in the queue-6.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit bc3b6341fa238a203e8e0c1c2b80228c015dead5
Author: Haixin Yu <yuhaixin.yhx@xxxxxxxxxxxxxxxxx>
Date:   Mon Jul 24 13:06:54 2023 +0800

    perf pmu arm64: Fix reading the PMU cpu slots in sysfs
    
    [ Upstream commit 9754353d0ab123d71bf572a483ecc8b330ef36a3 ]
    
    Commit f8ad6018ce3c065a ("perf pmu: Remove duplication around
    EVENT_SOURCE_DEVICE_PATH") uses sysfs__read_ull() to read a full sysfs
    path, which will never succeeds as it already comes with the sysfs mount
    point in it, which sysfs__read_ull() will add again.
    
    Fix it by reading the file using filename__read_ull(), that will not add
    the sysfs mount point.
    
    Fixes: f8ad6018ce3c065a ("perf pmu: Remove duplication around EVENT_SOURCE_DEVICE_PATH")
    Signed-off-by: Haixin Yu <yuhaixin.yhx@xxxxxxxxxxxxxxxxx>
    Tested-by: Jing Zhang <renyu.zj@xxxxxxxxxxxxxxxxx>
    Cc: Adrian Hunter <adrian.hunter@xxxxxxxxx>
    Cc: Alexander Shishkin <alexander.shishkin@xxxxxxxxxxxxxxx>
    Cc: Ian Rogers <irogers@xxxxxxxxxx>
    Cc: Ingo Molnar <mingo@xxxxxxxxxx>
    Cc: James Clark <james.clark@xxxxxxx>
    Cc: Jiri Olsa <jolsa@xxxxxxxxxx>
    Cc: John Garry <john.g.garry@xxxxxxxxxx>
    Cc: Leo Yan <leo.yan@xxxxxxxxxx>
    Cc: Mark Rutland <mark.rutland@xxxxxxx>
    Cc: Mike Leach <mike.leach@xxxxxxxxxx>
    Cc: Namhyung Kim <namhyung@xxxxxxxxxx>
    Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
    Cc: Will Deacon <will@xxxxxxxxxx>
    Cc: linux-arm-kernel@xxxxxxxxxxxxxxxxxxx
    Link: https://lore.kernel.org/r/ZL4G7rWXkfv-Ectq@B-Q60VQ05P-2326.local
    Signed-off-by: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/tools/perf/arch/arm64/util/pmu.c b/tools/perf/arch/arm64/util/pmu.c
index ef1ed645097c6..ce0d1c7578348 100644
--- a/tools/perf/arch/arm64/util/pmu.c
+++ b/tools/perf/arch/arm64/util/pmu.c
@@ -56,10 +56,11 @@ double perf_pmu__cpu_slots_per_cycle(void)
 		perf_pmu__pathname_scnprintf(path, sizeof(path),
 					     pmu->name, "caps/slots");
 		/*
-		 * The value of slots is not greater than 32 bits, but sysfs__read_int
-		 * can't read value with 0x prefix, so use sysfs__read_ull instead.
+		 * The value of slots is not greater than 32 bits, but
+		 * filename__read_int can't read value with 0x prefix,
+		 * so use filename__read_ull instead.
 		 */
-		sysfs__read_ull(path, &slots);
+		filename__read_ull(path, &slots);
 	}
 
 	return slots ? (double)slots : NAN;



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux