Lines Matching refs:status
29 union ifs_status status; member
36 union ifs_sbaf_status status; member
77 static void message_not_tested(struct device *dev, int cpu, union ifs_status status) in message_not_tested() argument
86 if (status.control_error) { in message_not_tested()
92 if (status.error_code < ARRAY_SIZE(scan_test_status)) { in message_not_tested()
95 scan_test_status[status.error_code]); in message_not_tested()
96 } else if (status.error_code == IFS_SW_TIMEOUT) { in message_not_tested()
99 } else if (status.error_code == IFS_SW_PARTIAL_COMPLETION) { in message_not_tested()
105 cpumask_pr_args(cpu_smt_mask(cpu)), status.data); in message_not_tested()
109 static void message_fail(struct device *dev, int cpu, union ifs_status status) in message_fail() argument
120 if (status.signature_error) { in message_fail()
126 static bool can_restart(union ifs_status status) in can_restart() argument
128 enum ifs_status_err_code err_code = status.error_code; in can_restart()
131 if (status.signature_error || status.control_error) in can_restart()
185 union ifs_status status; in doscan() local
213 rdmsrl(MSR_SCAN_STATUS, status.data); in doscan()
215 trace_ifs_status(ifsd->cur_batch, start, stop, status.data); in doscan()
219 params->status = status; in doscan()
232 union ifs_status status = {}; in ifs_test_core() local
264 status.error_code = IFS_SW_TIMEOUT; in ifs_test_core()
272 status = params.status; in ifs_test_core()
275 if (!can_restart(status)) in ifs_test_core()
278 status_chunk = ifsd->generation ? status.gen2.chunk_num : status.gen0.chunk_num; in ifs_test_core()
282 if (status.error_code == IFS_NO_ERROR) in ifs_test_core()
283 status.error_code = IFS_SW_PARTIAL_COMPLETION; in ifs_test_core()
297 ifsd->scan_details = status.data; in ifs_test_core()
299 if (status.signature_error) { in ifs_test_core()
300 ifsd->status = SCAN_TEST_FAIL; in ifs_test_core()
301 message_fail(dev, cpu, status); in ifs_test_core()
302 } else if (status.control_error || status.error_code) { in ifs_test_core()
303 ifsd->status = SCAN_NOT_TESTED; in ifs_test_core()
304 message_not_tested(dev, cpu, status); in ifs_test_core()
306 ifsd->status = SCAN_TEST_PASS; in ifs_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()
369 static int do_array_test_gen1(void *status) in do_array_test_gen1() argument
378 rdmsrl(MSR_ARRAY_STATUS, *((u64 *)status)); in do_array_test_gen1()
387 u64 status = 0; in ifs_array_test_gen1() local
389 stop_core_cpuslocked(cpu, do_array_test_gen1, &status); in ifs_array_test_gen1()
390 ifsd->scan_details = status; in ifs_array_test_gen1()
392 if (status & ARRAY_GEN1_STATUS_FAIL) 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()
437 union ifs_sbaf_status status = (union ifs_sbaf_status)status_data; in sbaf_message_not_tested() local
439 if (status.error_code < ARRAY_SIZE(sbaf_test_status)) { in sbaf_message_not_tested()
442 sbaf_test_status[status.error_code]); in sbaf_message_not_tested()
443 } else if (status.error_code == IFS_SW_TIMEOUT) { in sbaf_message_not_tested()
446 } else if (status.error_code == IFS_SW_PARTIAL_COMPLETION) { in sbaf_message_not_tested()
452 cpumask_pr_args(cpu_smt_mask(cpu)), status.data); in sbaf_message_not_tested()
456 static void sbaf_message_fail(struct device *dev, int cpu, union ifs_sbaf_status status) in sbaf_message_fail() argument
459 if (status.sbaf_status == SBAF_STATUS_SIGN_FAIL) { in sbaf_message_fail()
465 if (status.sbaf_status == SBAF_STATUS_TEST_FAIL) { in sbaf_message_fail()
471 static bool sbaf_bundle_completed(union ifs_sbaf_status status) in sbaf_bundle_completed() argument
473 return !(status.sbaf_status || status.error_code); in sbaf_bundle_completed()
476 static bool sbaf_can_restart(union ifs_sbaf_status status) in sbaf_can_restart() argument
478 enum sbaf_status_err_code err_code = status.error_code; in sbaf_can_restart()
481 if (status.sbaf_status == SBAF_STATUS_SIGN_FAIL || in sbaf_can_restart()
482 status.sbaf_status == SBAF_STATUS_TEST_FAIL) in sbaf_can_restart()
513 union ifs_sbaf_status status; in dosbaf() local
530 rdmsrl(MSR_SBAF_STATUS, status.data); in dosbaf()
531 trace_ifs_sbaf(ifsd->cur_batch, *run_params->activate, status); in dosbaf()
535 run_params->status = status; in dosbaf()
543 union ifs_sbaf_status status = {}; in ifs_sbaf_test_core() local
562 status.error_code = IFS_SW_TIMEOUT; in ifs_sbaf_test_core()
573 status = run_params.status; in ifs_sbaf_test_core()
575 if (sbaf_bundle_completed(status)) { in ifs_sbaf_test_core()
576 activate.bundle_idx = status.bundle_idx + 1; in ifs_sbaf_test_core()
583 if (!sbaf_can_restart(status)) in ifs_sbaf_test_core()
586 if (status.pgm_idx == activate.pgm_idx) { in ifs_sbaf_test_core()
589 if (status.error_code == IFS_NO_ERROR) in ifs_sbaf_test_core()
590 status.error_code = IFS_SW_PARTIAL_COMPLETION; 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()
604 if (status.sbaf_status == SBAF_STATUS_SIGN_FAIL || in ifs_sbaf_test_core()
605 status.sbaf_status == SBAF_STATUS_TEST_FAIL) { in ifs_sbaf_test_core()
606 ifsd->status = SCAN_TEST_FAIL; in ifs_sbaf_test_core()
607 sbaf_message_fail(dev, cpu, status); in ifs_sbaf_test_core()
608 } else if (status.error_code || status.sbaf_status == SBAF_STATUS_INTR || in ifs_sbaf_test_core()
610 ifsd->status = SCAN_NOT_TESTED; in ifs_sbaf_test_core()
611 sbaf_message_not_tested(dev, cpu, status.data); in ifs_sbaf_test_core()
613 ifsd->status = SCAN_TEST_PASS; in ifs_sbaf_test_core()