Commit 2acaefed authored by Pengfei Xu's avatar Pengfei Xu Committed by Aichun Shi
Browse files

selftests: ifs: verify IFS ARRAY BIST functionality

mainline inclusion
from mainline-v6.11-rc1
commit bb408dae9e73803eab8a648115d6c4a1bca4dba3
category: feature
bugzilla: https://gitee.com/openeuler/intel-kernel/issues/IASVRQ
CVE: N/A
Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=bb408dae9e73803eab8a648115d6c4a1bca4dba3



-------------------------------------

There are two selftest scenarios for ARRAY BIST(Board Integrated System
Test) tests:

1. Perform IFS ARRAY BIST tests once on each CPU.
2. Perform IFS ARRAY BIST tests on a random CPU with 3 rounds.

These are not meant to be exhaustive, but are some minimal tests for
for checking IFS ARRAY BIST.

Intel-SIG: commit bb408dae9e73 selftests: ifs: verify IFS ARRAY BIST functionality
Backport to support IFS(In Field Scan) SBAF(Structural Based Functional Test at Field)

Reviewed-by: default avatarJithu Joseph <jithu.joseph@intel.com>
Reviewed-by: default avatarKuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
Co-developed-by: default avatarAshok Raj <ashok.raj@intel.com>
Signed-off-by: default avatarAshok Raj <ashok.raj@intel.com>
Signed-off-by: default avatarPengfei Xu <pengfei.xu@intel.com>
Acked-by: default avatarJithu Joseph <jithu.joseph@intel.com>
Signed-off-by: default avatarShuah Khan <skhan@linuxfoundation.org>
[ Aichun Shi: amend commit log ]
Signed-off-by: default avatarAichun Shi <aichun.shi@intel.com>
parent e966aae1
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@ readonly IFS_SCAN_MODE="0"
readonly IFS_ARRAY_BIST_SCAN_MODE="1"
readonly IFS_PATH="/sys/devices/virtual/misc/intel_ifs"
readonly IFS_SCAN_SYSFS_PATH="${IFS_PATH}_${IFS_SCAN_MODE}"
readonly IFS_ARRAY_BIST_SYSFS_PATH="${IFS_PATH}_${IFS_ARRAY_BIST_SCAN_MODE}"
readonly RUN_TEST="run_test"
readonly STATUS="status"
readonly DETAILS="details"
@@ -479,6 +480,13 @@ test_ifs()
		test_ifs_scan_available_imgs
		test_ifs_same_cpu_loop "$IFS_SCAN_MODE" "$RANDOM_CPU" "$LOOP_TIMES"
	fi

	if [[ -d "$IFS_ARRAY_BIST_SYSFS_PATH" ]]; then
		ifs_test_cpus "$SIBLINGS" "$IFS_ARRAY_BIST_SCAN_MODE"
		test_ifs_same_cpu_loop "$IFS_ARRAY_BIST_SCAN_MODE" "$RANDOM_CPU" "$LOOP_TIMES"
	else
		append_log "[$SKIP] No $IFS_ARRAY_BIST_SYSFS_PATH, skip IFS ARRAY BIST scan"
	fi
}

trap ifs_cleanup SIGTERM SIGINT