Skip to content

Commit a231995

Browse files
seehearfeeltsbogend
authored andcommitted
MIPS: perf: Fix wrong check condition of Loongson event IDs
According to the user's manual chapter 8.2.1 of Loongson 3A2000 CPU [1] and 3A3000 CPU [2], we should take some event IDs such as 274, 358, 359 and 360 as valid in the check condition, otherwise they are recognized as "not supported", fix it. [1] http://www.loongson.cn/uploadfile/cpu/3A2000/Loongson3A2000_user2.pdf [2] http://www.loongson.cn/uploadfile/cpu/3A3000/Loongson3A3000_3B3000user2.pdf Fixes: e9dfbaa ("MIPS: perf: Add hardware perf events support for new Loongson-3") Signed-off-by: Tiezhu Yang <[email protected]> Acked-by: Huang Pei <[email protected]> Signed-off-by: Thomas Bogendoerfer <[email protected]>
1 parent 91dbd73 commit a231995

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

arch/mips/kernel/perf_event_mipsxx.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1898,8 +1898,8 @@ static const struct mips_perf_event *mipsxx_pmu_map_raw_event(u64 config)
18981898
(base_id >= 64 && base_id < 90) ||
18991899
(base_id >= 128 && base_id < 164) ||
19001900
(base_id >= 192 && base_id < 200) ||
1901-
(base_id >= 256 && base_id < 274) ||
1902-
(base_id >= 320 && base_id < 358) ||
1901+
(base_id >= 256 && base_id < 275) ||
1902+
(base_id >= 320 && base_id < 361) ||
19031903
(base_id >= 384 && base_id < 574))
19041904
break;
19051905

0 commit comments

Comments
 (0)