Lines Matching +full:activate +full:- +full:to +full:- +full:activate

1 // SPDX-License-Identifier: GPL-2.0-only
28 union ifs_scan *activate; member
35 union ifs_sbaf *activate; member
63 [IFS_INTERRUPTED_BEFORE_RENDEZVOUS] = "Interrupt occurred prior to SCAN coordination.",
65 "Core Abort SCAN Response due to power management condition.",
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",
88 cpumask_pr_args(cpu_smt_mask(cpu)), ifsd->cur_batch, ifsd->loaded_version); in message_not_tested()
116 * due to a bit flip from an alpha particle or neutron). If the problem in message_fail()
122 cpumask_pr_args(cpu_smt_mask(cpu)), ifsd->cur_batch, ifsd->loaded_version); in message_fail()
172 timeout -= SPINUNIT; in wait_for_sibling_cpu()
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()
205 * This WRMSR will wait for other HT threads to also write in doscan()
206 * to this MSR (at most for activate.delay cycles). Then it in doscan()
209 * take up to 200 milliseconds (in the case where all chunks 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()
219 params->status = status; in doscan()
225 * Use stop_core_cpuslocked() to synchronize writing to MSR_ACTIVATE_SCAN
226 * on all threads of the core to be tested. Loop if necessary to complete
227 * run of all chunks. Include some defensive tests to make sure forward
233 union ifs_scan activate; in ifs_test_core() local
243 activate.gen0.rsvd = 0; in ifs_test_core()
244 activate.delay = IFS_THREAD_WAIT; in ifs_test_core()
245 activate.sigmce = 0; in ifs_test_core()
247 to_stop = ifsd->valid_chunks - 1; in ifs_test_core()
251 if (ifsd->generation) { in ifs_test_core()
252 activate.gen2.start = to_start; in ifs_test_core()
253 activate.gen2.stop = to_stop; in ifs_test_core()
255 activate.gen0.start = to_start; in ifs_test_core()
256 activate.gen0.stop = to_stop; in ifs_test_core()
268 params.activate = &activate; 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()
289 activate.gen2.start = status_chunk; in ifs_test_core()
291 activate.gen0.start = status_chunk; 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()
319 * Only one logical CPU on a core needs to trigger the Array test via MSR write. in do_array_test()
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()
422 [IFS_SBAF_INTERRUPTED_BEFORE_RENDEZVOUS] = "Interrupt occurred prior to SBAF coordination.",
424 [IFS_SBAF_INVALID_BUNDLE_INDEX] = "Non-valid sbaf bundles. Reload test image",
428 …DS_CONCURRENT] = "Exceeded number of Logical Processors (LP) allowed to run Scan-At-Field concurre…
429 [IFS_SBAF_INTERRUPTED_DURING_EXECUTION] = "Interrupt occurred prior to SBAF start",
431 [IFS_SBAF_CORRUPTED_CHUNK] = "SBAF operation aborted due to corrupted chunk",
464 /* Failed to reach end of test */ in sbaf_message_fail()
466 dev_err(dev, "CPU(s) %*pbl: Failed to complete test\n", in sbaf_message_fail()
517 ifsd = run_params->ifsd; in dosbaf()
524 * This WRMSR will wait for other HT threads to also write in dosbaf()
525 * to this MSR (at most for activate.delay cycles). Then it 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()
544 union ifs_sbaf activate; in ifs_sbaf_test_core() local
552 activate.data = 0; in ifs_sbaf_test_core()
553 activate.delay = IFS_THREAD_WAIT; in ifs_sbaf_test_core()
557 activate.bundle_idx = 0; in ifs_sbaf_test_core()
558 stop_bundle = ifsd->max_bundle; in ifs_sbaf_test_core()
560 while (activate.bundle_idx <= stop_bundle) { in ifs_sbaf_test_core()
569 run_params.activate = &activate; in ifs_sbaf_test_core()
576 activate.bundle_idx = status.bundle_idx + 1; in ifs_sbaf_test_core()
577 activate.pgm_idx = 0; in ifs_sbaf_test_core()
586 if (status.pgm_idx == activate.pgm_idx) { in ifs_sbaf_test_core()
588 if (--retries == 0) { in ifs_sbaf_test_core()
596 activate.bundle_idx = status.bundle_idx; in ifs_sbaf_test_core()
597 activate.pgm_idx = status.pgm_idx; 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()
609 (activate.bundle_idx < stop_bundle)) { 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()
620 * wait for all sibling threads to finish the scan 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()