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

1 // SPDX-License-Identifier: GPL-2.0-only
5 #include <linux/delay.h>
48 [IFS_NO_ERROR] = "SCAN no error",
50 [IFS_INTERRUPTED_BEFORE_RENDEZVOUS] = "Interrupt occurred prior to SCAN coordination.",
52 "Core Abort SCAN Response due to power management condition.",
55 [IFS_CORE_NOT_CAPABLE_CURRENTLY] = "Core not capable of performing SCAN currently",
58 "Exceeded number of Logical Processors (LP) allowed to run Scan-At-Field concurrently",
59 [IFS_INTERRUPTED_DURING_EXECUTION] = "Interrupt occurred prior to SCAN start",
61 [IFS_CORRUPTED_CHUNK] = "Scan operation aborted due to corrupted image. Try reloading",
67 dev_info(dev, "CPU(s) %*pbl: SCAN operation did not start. %s\n", in message_not_tested()
71 dev_info(dev, "CPU(s) %*pbl: software timeout during scan\n", in message_not_tested()
76 "Not all scan chunks were executed. Maximum forward progress retries exceeded"); in message_not_tested()
78 dev_info(dev, "CPU(s) %*pbl: SCAN unknown status %llx\n", in message_not_tested()
93 …dev_err(dev, "CPU(s) %*pbl: could not execute from loaded scan image. Batch: %02x version: 0x%x\n", in message_fail()
94 cpumask_pr_args(cpu_smt_mask(cpu)), ifsd->cur_batch, ifsd->loaded_version); in message_fail()
98 * signature_error is set when the output from the scan chains does not in message_fail()
106 cpumask_pr_args(cpu_smt_mask(cpu)), ifsd->cur_batch, ifsd->loaded_version); in message_fail()
114 /* Signature for chunk is bad, or scan test failed */ in can_restart()
138 * Execute the scan. Called "simultaneously" on all threads of a core
152 * to this MSR (at most for activate.delay cycles). Then it in doscan()
153 * starts scan of each requested chunk. The core scan happens in doscan()
161 /* Pass back the result of the scan */ in doscan()
188 activate.delay = IFS_THREAD_WAIT; in ifs_test_core()
191 to_stop = ifsd->valid_chunks - 1; in ifs_test_core()
193 if (ifsd->generation) { in ifs_test_core()
221 status_chunk = ifsd->generation ? status.gen2.chunk_num : status.gen0.chunk_num; in ifs_test_core()
224 if (--retries == 0) { in ifs_test_core()
231 if (ifsd->generation) in ifs_test_core()
240 ifsd->scan_details = status.data; in ifs_test_core()
243 ifsd->status = SCAN_TEST_FAIL; in ifs_test_core()
246 ifsd->status = SCAN_NOT_TESTED; in ifs_test_core()
249 ifsd->status = SCAN_TEST_PASS; in ifs_test_core()
270 timeout -= SPINUNIT; in wait_for_sibling_cpu()
287 wrmsrl(MSR_ARRAY_BIST, command->data); in do_array_test()
289 rdmsrl(MSR_ARRAY_BIST, command->data); in do_array_test()
322 ifsd->scan_details = command.data; in ifs_array_test_core()
325 ifsd->status = SCAN_TEST_FAIL; in ifs_array_test_core()
327 ifsd->status = SCAN_NOT_TESTED; in ifs_array_test_core()
329 ifsd->status = SCAN_TEST_PASS; in ifs_array_test_core()
356 ifsd->scan_details = status; in ifs_array_test_gen1()
359 ifsd->status = SCAN_TEST_FAIL; in ifs_array_test_gen1()
361 ifsd->status = SCAN_TEST_PASS; in ifs_array_test_gen1()
366 * its sibling cpu. Once all sibling threads wake up, the scan test gets executed and
367 * wait for all sibling threads to finish the scan test.
375 /* Prevent CPUs from being taken offline during the scan test */ in do_core_test()
380 ret = -EINVAL; in do_core_test()
384 switch (test->test_num) { in do_core_test()
386 if (!ifsd->loaded) in do_core_test()
387 ret = -EPERM; in do_core_test()
392 if (ifsd->array_gen == ARRAY_GEN0) in do_core_test()
398 ret = -EINVAL; in do_core_test()