The commit d5210a86e51f ("perf/x86/amd/core: Update and fix stalled-cycles-* events for Zen 2 and later") changed amd_f17h_perfmon_event_map to amd_zen1_perfmon_event_map which is limited to processors only with X86_FEATURE_ZEN1. This makes some event counters such as cache-misses and cache-references can not be tracked on Hygon family 18h processors. When using perf tool to monitor performance, the result will be listed as follows: 0 cache-miesses # 0.000 % of all cache refs 0 cache-references So add perfmon_event_map support for Hygon family 18h processors to fix the incorrect display.
v5.10:
The PR Link: https://gitee.com/anolis/cloud-kernel/pulls/4752
The PR Link: https://gitee.com/anolis/cloud-kernel/pulls/4767