Skip to content

Commit

Permalink
ifs_common.sh: fix the atom core judgement problem
Browse files Browse the repository at this point in the history
Fix the atom core judgement, [[ $() ]] should be removed, it is always judged
to be true.

Signed-off-by: Pengfei Xu <[email protected]>
  • Loading branch information
xupengfe committed Nov 6, 2023
1 parent 2705624 commit 4d58651
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ifs/ifs_common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -177,14 +177,14 @@ cpuid_check_atom() {
cpu_num=$(grep -c "processor" /proc/cpuinfo)
cpu_id=$((cpu_num - 1))
# Check if CPU0 is ATOM
[[ $(taskset -c 0 "$cpu_check" 1a 0 0 0 a 29) ]] || {
taskset -c 0 "$cpu_check" 1a 0 0 0 a 29 && {
test_print_trc "CPU0 CPUID(EAX=0x1a),EAX bit29 is 1:ATOM"
IS_ATOM="$TRUE"
return 0
}

# Check max CPU ID is ATOM
[[ $(taskset -c "$cpu_id" "$cpu_check" 1a 0 0 0 a 29) ]] || {
taskset -c "$cpu_id" "$cpu_check" 1a 0 0 0 a 29 && {
test_print_trc "CPU num:$cpu_id CPUID(EAX=0x1a),EAX bit29 is 1:ATOM"
IS_ATOM="$TRUE"
return 0
Expand Down

0 comments on commit 4d58651

Please sign in to comment.