autocore: fix 12th/13th P cores count with HT

This commit is contained in:
coolsnowwolf 2023-03-31 12:54:30 +08:00
parent 39461eaf77
commit aaa79b3864

View File

@ -32,7 +32,7 @@ start()
if [ -d /sys/devices/cpu_atom/ ]; then if [ -d /sys/devices/cpu_atom/ ]; then
pcore=$(cat /sys/devices/cpu_core/cpus | awk -F- '{print $2}') pcore=$(cat /sys/devices/cpu_core/cpus | awk -F- '{print $2}')
pc=$(echo "$pcore+1" | bc) pc=$(echo "($pcore+1)/2" | bc)
ecore1=$(cat /sys/devices/cpu_atom/cpus | awk -F- '{print $1}') ecore1=$(cat /sys/devices/cpu_atom/cpus | awk -F- '{print $1}')
ecore2=$(cat /sys/devices/cpu_atom/cpus | awk -F- '{print $2}') ecore2=$(cat /sys/devices/cpu_atom/cpus | awk -F- '{print $2}')
ec=$(echo "$ecore2-$ecore1+1" | bc) ec=$(echo "$ecore2-$ecore1+1" | bc)