MIPS: perf: Fix wrong check condition of Loongson event IDs
authorTiezhu Yang <yangtiezhu@loongson.cn>
Thu, 27 Aug 2020 08:03:08 +0000 (16:03 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 9 Sep 2020 17:14:20 +0000 (19:14 +0200)
commitbbb1dc4431b0c37eca621a2d618c8d3c1276e5a9
tree1897d7c844c220ec26a1488abaa0efc85e0d022e
parent89639c177d048fc2209e296f924b6cac80ff1922
MIPS: perf: Fix wrong check condition of Loongson event IDs

[ Upstream commit a231995700c392c0807da95deea231b23fc51a3c ]

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: e9dfbaaeef1c ("MIPS: perf: Add hardware perf events support for new Loongson-3")
Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Acked-by: Huang Pei <huangpei@loongson.cn>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/mips/kernel/perf_event_mipsxx.c