hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
kernel/arch/x86/events/zhaoxin/core.c
....@@ -541,7 +541,13 @@
541541
542542 switch (boot_cpu_data.x86) {
543543 case 0x06:
544
- if (boot_cpu_data.x86_model == 0x0f || boot_cpu_data.x86_model == 0x19) {
544
+ /*
545
+ * Support Zhaoxin CPU from ZXC series, exclude Nano series through FMS.
546
+ * Nano FMS: Family=6, Model=F, Stepping=[0-A][C-D]
547
+ * ZXC FMS: Family=6, Model=F, Stepping=E-F OR Family=6, Model=0x19, Stepping=0-3
548
+ */
549
+ if ((boot_cpu_data.x86_model == 0x0f && boot_cpu_data.x86_stepping >= 0x0e) ||
550
+ boot_cpu_data.x86_model == 0x19) {
545551
546552 x86_pmu.max_period = x86_pmu.cntval_mask >> 1;
547553