Patch "x86/perf/zhaoxin: Add stepping check for ZXC" has been added to the 5.10-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

    x86/perf/zhaoxin: Add stepping check for ZXC

to the 5.10-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:
     x86-perf-zhaoxin-add-stepping-check-for-zxc.patch
and it can be found in the queue-5.10 subdirectory.

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



commit 38ef7093601af0fc9fec3eb2210b299878498445
Author: silviazhao <silviazhao-oc@xxxxxxxxxxx>
Date:   Wed Feb 8 16:27:22 2023 +0800

    x86/perf/zhaoxin: Add stepping check for ZXC
    
    [ Upstream commit fd636b6a9bc6034f2e5bb869658898a2b472c037 ]
    
    Some of Nano series processors will lead GP when accessing
    PMC fixed counter. Meanwhile, their hardware support for PMC
    has not announced externally. So exclude Nano CPUs from ZXC
    by checking stepping information. This is an unambiguous way
    to differentiate between ZXC and Nano CPUs.
    
    Following are Nano and ZXC FMS information:
    Nano FMS: Family=6, Model=F, Stepping=[0-A][C-D]
    ZXC FMS:  Family=6, Model=F, Stepping=E-F OR
              Family=6, Model=0x19, Stepping=0-3
    
    Fixes: 3a4ac121c2ca ("x86/perf: Add hardware performance events support for Zhaoxin CPU.")
    
    Reported-by: Arjan <8vvbbqzo567a@xxxxxxxxxxxxxxxxx>
    Reported-by: Kevin Brace <kevinbrace@xxxxxxx>
    Signed-off-by: silviazhao <silviazhao-oc@xxxxxxxxxxx>
    Signed-off-by: Peter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx>
    Link: https://bugzilla.kernel.org/show_bug.cgi?id=212389
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/arch/x86/events/zhaoxin/core.c b/arch/x86/events/zhaoxin/core.c
index e68827e604ad1..e927346960303 100644
--- a/arch/x86/events/zhaoxin/core.c
+++ b/arch/x86/events/zhaoxin/core.c
@@ -541,7 +541,13 @@ __init int zhaoxin_pmu_init(void)
 
 	switch (boot_cpu_data.x86) {
 	case 0x06:
-		if (boot_cpu_data.x86_model == 0x0f || boot_cpu_data.x86_model == 0x19) {
+		/*
+		 * Support Zhaoxin CPU from ZXC series, exclude Nano series through FMS.
+		 * Nano FMS: Family=6, Model=F, Stepping=[0-A][C-D]
+		 * ZXC FMS: Family=6, Model=F, Stepping=E-F OR Family=6, Model=0x19, Stepping=0-3
+		 */
+		if ((boot_cpu_data.x86_model == 0x0f && boot_cpu_data.x86_stepping >= 0x0e) ||
+			boot_cpu_data.x86_model == 0x19) {
 
 			x86_pmu.max_period = x86_pmu.cntval_mask >> 1;
 



[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