Lines Matching +full:scan +full:- +full:delay

1 // SPDX-License-Identifier: GPL-2.0-only
5 #include <linux/delay.h>
61 [IFS_NO_ERROR] = "SCAN no error",
63 [IFS_INTERRUPTED_BEFORE_RENDEZVOUS] = "Interrupt occurred prior to SCAN coordination.",
65 "Core Abort SCAN Response due to power management condition.",
68 [IFS_CORE_NOT_CAPABLE_CURRENTLY] = "Core not capable of performing SCAN currently",
71 "Exceeded number of Logical Processors (LP) allowed to run Scan-At-Field concurrently",
72 [IFS_INTERRUPTED_DURING_EXECUTION] = "Interrupt occurred prior to SCAN start",
74 [IFS_CORRUPTED_CHUNK] = "Scan operation aborted due to corrupted image. Try reloading",
87 dev_warn(dev, "CPU(s) %*pbl: Scan controller error. Batch: %02x version: 0x%x\n", in message_not_tested()
88 cpumask_pr_args(cpu_smt_mask(cpu)), ifsd->cur_batch, ifsd->loaded_version); in message_not_tested()
93 dev_info(dev, "CPU(s) %*pbl: SCAN operation did not start. %s\n", in message_not_tested()
97 dev_info(dev, "CPU(s) %*pbl: software timeout during scan\n", in message_not_tested()
102 "Not all scan chunks were executed. Maximum forward progress retries exceeded"); in message_not_tested()
104 dev_info(dev, "CPU(s) %*pbl: SCAN unknown status %llx\n", in message_not_tested()
114 * signature_error is set when the output from the scan chains does not in message_fail()
122 cpumask_pr_args(cpu_smt_mask(cpu)), ifsd->cur_batch, ifsd->loaded_version); in message_fail()
130 /* Signature for chunk is bad, or scan test failed */ in can_restart()
172 timeout -= SPINUNIT; in wait_for_sibling_cpu()
178 * Execute the scan. Called "simultaneously" on all threads of a core
189 ifsd = params->ifsd; in doscan()
191 if (ifsd->generation) { in doscan()
192 start = params->activate->gen2.start; in doscan()
193 stop = params->activate->gen2.stop; in doscan()
195 start = params->activate->gen0.start; in doscan()
196 stop = params->activate->gen0.stop; in doscan()
206 * to this MSR (at most for activate.delay cycles). Then it in doscan()
207 * starts scan of each requested chunk. The core scan happens in doscan()
212 wrmsrl(MSR_ACTIVATE_SCAN, params->activate->data); in doscan()
215 trace_ifs_status(ifsd->cur_batch, start, stop, status.data); in doscan()
217 /* Pass back the result of the scan */ in doscan()
219 params->status = status; in doscan()
244 activate.delay = IFS_THREAD_WAIT; in ifs_test_core()
247 to_stop = ifsd->valid_chunks - 1; in ifs_test_core()
251 if (ifsd->generation) { in ifs_test_core()
278 status_chunk = ifsd->generation ? status.gen2.chunk_num : status.gen0.chunk_num; in ifs_test_core()
281 if (--retries == 0) { in ifs_test_core()
288 if (ifsd->generation) in ifs_test_core()
297 ifsd->scan_details = status.data; in ifs_test_core()
300 ifsd->status = SCAN_TEST_FAIL; in ifs_test_core()
303 ifsd->status = SCAN_NOT_TESTED; in ifs_test_core()
306 ifsd->status = SCAN_TEST_PASS; in ifs_test_core()
324 wrmsrl(MSR_ARRAY_BIST, command->data); in do_array_test()
326 rdmsrl(MSR_ARRAY_BIST, command->data); in do_array_test()
356 ifsd->scan_details = command.data; in ifs_array_test_core()
359 ifsd->status = SCAN_TEST_FAIL; in ifs_array_test_core()
361 ifsd->status = SCAN_NOT_TESTED; in ifs_array_test_core()
363 ifsd->status = SCAN_TEST_PASS; in ifs_array_test_core()
390 ifsd->scan_details = status; in ifs_array_test_gen1()
393 ifsd->status = SCAN_TEST_FAIL; in ifs_array_test_gen1()
395 ifsd->status = SCAN_TEST_PASS; in ifs_array_test_gen1()
424 [IFS_SBAF_INVALID_BUNDLE_INDEX] = "Non-valid sbaf bundles. Reload test image",
428 …ONCURRENT] = "Exceeded number of Logical Processors (LP) allowed to run Scan-At-Field concurrently…
444 dev_info(dev, "CPU(s) %*pbl: software timeout during scan\n", in sbaf_message_not_tested()
480 /* Signature for chunk is bad, or scan test failed */ in sbaf_can_restart()
517 ifsd = run_params->ifsd; in dosbaf()
525 * to this MSR (at most for activate.delay cycles). Then it in dosbaf()
526 * starts scan of each requested bundle. The core test happens in dosbaf()
529 wrmsrl(MSR_ACTIVATE_SBAF, run_params->activate->data); in dosbaf()
531 trace_ifs_sbaf(ifsd->cur_batch, *run_params->activate, status); in dosbaf()
535 run_params->status = status; in dosbaf()
553 activate.delay = IFS_THREAD_WAIT; in ifs_sbaf_test_core()
558 stop_bundle = ifsd->max_bundle; in ifs_sbaf_test_core()
588 if (--retries == 0) { in ifs_sbaf_test_core()
602 ifsd->scan_details = status.data; in ifs_sbaf_test_core()
606 ifsd->status = SCAN_TEST_FAIL; in ifs_sbaf_test_core()
610 ifsd->status = SCAN_NOT_TESTED; in ifs_sbaf_test_core()
613 ifsd->status = SCAN_TEST_PASS; in ifs_sbaf_test_core()
619 * its sibling cpu. Once all sibling threads wake up, the scan test gets executed and
620 * wait for all sibling threads to finish the scan test.
628 /* Prevent CPUs from being taken offline during the scan test */ in do_core_test()
633 ret = -EINVAL; in do_core_test()
637 switch (test->test_num) { in do_core_test()
639 if (!ifsd->loaded) in do_core_test()
640 ret = -EPERM; in do_core_test()
645 if (ifsd->array_gen == ARRAY_GEN0) in do_core_test()
651 if (!ifsd->loaded) in do_core_test()
652 ret = -EPERM; in do_core_test()
657 ret = -EINVAL; in do_core_test()