• Home
  • Raw
  • Download

Lines Matching refs:t

199 	int (*alloc)(struct nfit_test *t);
200 void (*setup)(struct nfit_test *t);
230 static int nd_intel_test_get_fw_info(struct nfit_test *t, in nd_intel_test_get_fw_info() argument
234 struct device *dev = &t->pdev.dev; in nd_intel_test_get_fw_info()
235 struct nfit_test_fw *fw = &t->fw[idx]; in nd_intel_test_get_fw_info()
238 __func__, t, nd_cmd, buf_len, idx); in nd_intel_test_get_fw_info()
256 static int nd_intel_test_start_update(struct nfit_test *t, in nd_intel_test_start_update() argument
260 struct device *dev = &t->pdev.dev; in nd_intel_test_start_update()
261 struct nfit_test_fw *fw = &t->fw[idx]; in nd_intel_test_start_update()
264 __func__, t, nd_cmd, buf_len, idx); in nd_intel_test_start_update()
286 static int nd_intel_test_send_data(struct nfit_test *t, in nd_intel_test_send_data() argument
290 struct device *dev = &t->pdev.dev; in nd_intel_test_send_data()
291 struct nfit_test_fw *fw = &t->fw[idx]; in nd_intel_test_send_data()
295 __func__, t, nd_cmd, buf_len, idx); in nd_intel_test_send_data()
337 static int nd_intel_test_finish_fw(struct nfit_test *t, in nd_intel_test_finish_fw() argument
341 struct device *dev = &t->pdev.dev; in nd_intel_test_finish_fw()
342 struct nfit_test_fw *fw = &t->fw[idx]; in nd_intel_test_finish_fw()
345 __func__, t, nd_cmd, buf_len, idx); in nd_intel_test_finish_fw()
388 static int nd_intel_test_finish_query(struct nfit_test *t, in nd_intel_test_finish_query() argument
392 struct device *dev = &t->pdev.dev; in nd_intel_test_finish_query()
393 struct nfit_test_fw *fw = &t->fw[idx]; in nd_intel_test_finish_query()
396 __func__, t, nd_cmd, buf_len, idx); in nd_intel_test_finish_query()
566 static int nfit_test_cmd_ars_start(struct nfit_test *t, in nfit_test_cmd_ars_start() argument
581 post_ars_status(ars_state, &t->badrange, ars_start->address, in nfit_test_cmd_ars_start()
612 static int nfit_test_cmd_clear_error(struct nfit_test *t, in nfit_test_cmd_clear_error() argument
623 badrange_forget(&t->badrange, clear_err->address, clear_err->length); in nfit_test_cmd_clear_error()
816 struct nfit_test *t = container_of(work, typeof(*t), work); in uc_error_notify() local
818 __acpi_nfit_notify(&t->pdev.dev, t, NFIT_NOTIFY_UC_MEMORY_ERROR); in uc_error_notify()
821 static int nfit_test_cmd_ars_error_inject(struct nfit_test *t, in nfit_test_cmd_ars_error_inject() argument
836 rc = badrange_add(&t->badrange, err_inj->err_inj_spa_range_base, in nfit_test_cmd_ars_error_inject()
842 queue_work(nfit_wq, &t->work); in nfit_test_cmd_ars_error_inject()
852 static int nfit_test_cmd_ars_inject_clear(struct nfit_test *t, in nfit_test_cmd_ars_inject_clear() argument
867 badrange_forget(&t->badrange, err_clr->err_inj_clr_spa_range_base, in nfit_test_cmd_ars_inject_clear()
878 static int nfit_test_cmd_ars_inject_status(struct nfit_test *t, in nfit_test_cmd_ars_inject_status() argument
887 spin_lock(&t->badrange.lock); in nfit_test_cmd_ars_inject_status()
888 list_for_each_entry(be, &t->badrange.list, list) { in nfit_test_cmd_ars_inject_status()
895 spin_unlock(&t->badrange.lock); in nfit_test_cmd_ars_inject_status()
901 static int nd_intel_test_cmd_set_lss_status(struct nfit_test *t, in nd_intel_test_cmd_set_lss_status() argument
904 struct device *dev = &t->pdev.dev; in nd_intel_test_cmd_set_lss_status()
940 static int nd_intel_test_cmd_security_status(struct nfit_test *t, in nd_intel_test_cmd_security_status() argument
944 struct device *dev = &t->pdev.dev; in nd_intel_test_cmd_security_status()
955 static int nd_intel_test_cmd_unlock_unit(struct nfit_test *t, in nd_intel_test_cmd_unlock_unit() argument
959 struct device *dev = &t->pdev.dev; in nd_intel_test_cmd_unlock_unit()
981 static int nd_intel_test_cmd_set_pass(struct nfit_test *t, in nd_intel_test_cmd_set_pass() argument
985 struct device *dev = &t->pdev.dev; in nd_intel_test_cmd_set_pass()
1006 static int nd_intel_test_cmd_freeze_lock(struct nfit_test *t, in nd_intel_test_cmd_freeze_lock() argument
1010 struct device *dev = &t->pdev.dev; in nd_intel_test_cmd_freeze_lock()
1025 static int nd_intel_test_cmd_disable_pass(struct nfit_test *t, in nd_intel_test_cmd_disable_pass() argument
1029 struct device *dev = &t->pdev.dev; in nd_intel_test_cmd_disable_pass()
1049 static int nd_intel_test_cmd_secure_erase(struct nfit_test *t, in nd_intel_test_cmd_secure_erase() argument
1053 struct device *dev = &t->pdev.dev; in nd_intel_test_cmd_secure_erase()
1080 static int nd_intel_test_cmd_overwrite(struct nfit_test *t, in nd_intel_test_cmd_overwrite() argument
1084 struct device *dev = &t->pdev.dev; in nd_intel_test_cmd_overwrite()
1103 static int nd_intel_test_cmd_query_overwrite(struct nfit_test *t, in nd_intel_test_cmd_query_overwrite() argument
1107 struct device *dev = &t->pdev.dev; in nd_intel_test_cmd_query_overwrite()
1126 static int nd_intel_test_cmd_master_set_pass(struct nfit_test *t, in nd_intel_test_cmd_master_set_pass() argument
1130 struct device *dev = &t->pdev.dev; in nd_intel_test_cmd_master_set_pass()
1153 static int nd_intel_test_cmd_master_secure_erase(struct nfit_test *t, in nd_intel_test_cmd_master_secure_erase() argument
1157 struct device *dev = &t->pdev.dev; in nd_intel_test_cmd_master_secure_erase()
1200 struct nfit_test *t = container_of(acpi_desc, typeof(*t), acpi_desc); in nfit_test_ctl() local
1230 rc = nd_intel_test_cmd_security_status(t, in nfit_test_ctl()
1234 rc = nd_intel_test_cmd_unlock_unit(t, in nfit_test_ctl()
1238 rc = nd_intel_test_cmd_set_pass(t, in nfit_test_ctl()
1242 rc = nd_intel_test_cmd_disable_pass(t, in nfit_test_ctl()
1246 rc = nd_intel_test_cmd_freeze_lock(t, in nfit_test_ctl()
1250 rc = nd_intel_test_cmd_secure_erase(t, in nfit_test_ctl()
1254 rc = nd_intel_test_cmd_overwrite(t, in nfit_test_ctl()
1255 buf, buf_len, i - t->dcr_idx); in nfit_test_ctl()
1258 rc = nd_intel_test_cmd_query_overwrite(t, in nfit_test_ctl()
1259 buf, buf_len, i - t->dcr_idx); in nfit_test_ctl()
1262 rc = nd_intel_test_cmd_master_set_pass(t, in nfit_test_ctl()
1266 rc = nd_intel_test_cmd_master_secure_erase(t, in nfit_test_ctl()
1270 rc = nd_intel_test_cmd_set_lss_status(t, in nfit_test_ctl()
1274 rc = nd_intel_test_get_fw_info(t, buf, in nfit_test_ctl()
1275 buf_len, i - t->dcr_idx); in nfit_test_ctl()
1278 rc = nd_intel_test_start_update(t, buf, in nfit_test_ctl()
1279 buf_len, i - t->dcr_idx); in nfit_test_ctl()
1282 rc = nd_intel_test_send_data(t, buf, in nfit_test_ctl()
1283 buf_len, i - t->dcr_idx); in nfit_test_ctl()
1286 rc = nd_intel_test_finish_fw(t, buf, in nfit_test_ctl()
1287 buf_len, i - t->dcr_idx); in nfit_test_ctl()
1290 rc = nd_intel_test_finish_query(t, buf, in nfit_test_ctl()
1291 buf_len, i - t->dcr_idx); in nfit_test_ctl()
1295 &t->smart[i - t->dcr_idx]); in nfit_test_ctl()
1300 &t->smart_threshold[i - in nfit_test_ctl()
1301 t->dcr_idx]); in nfit_test_ctl()
1306 &t->smart_threshold[i - in nfit_test_ctl()
1307 t->dcr_idx], in nfit_test_ctl()
1308 &t->smart[i - t->dcr_idx], in nfit_test_ctl()
1309 &t->pdev.dev, t->dimm_dev[i]); in nfit_test_ctl()
1314 &t->smart_threshold[i - in nfit_test_ctl()
1315 t->dcr_idx], in nfit_test_ctl()
1316 &t->smart[i - t->dcr_idx], in nfit_test_ctl()
1317 &t->pdev.dev, t->dimm_dev[i]); in nfit_test_ctl()
1339 t->label[i - t->dcr_idx]); in nfit_test_ctl()
1343 t->label[i - t->dcr_idx]); in nfit_test_ctl()
1350 struct ars_state *ars_state = &t->ars_state; in nfit_test_ctl()
1368 rc = nfit_test_cmd_ars_error_inject(t, buf, in nfit_test_ctl()
1372 rc = nfit_test_cmd_ars_inject_clear(t, buf, in nfit_test_ctl()
1376 rc = nfit_test_cmd_ars_inject_status(t, buf, in nfit_test_ctl()
1392 rc = nfit_test_cmd_ars_start(t, ars_state, buf, in nfit_test_ctl()
1400 rc = nfit_test_cmd_clear_error(t, buf, buf_len, cmd_rc); in nfit_test_ctl()
1428 static void *__test_alloc(struct nfit_test *t, size_t size, dma_addr_t *dma, in __test_alloc() argument
1431 struct device *dev = &t->pdev.dev; in __test_alloc()
1451 list_add(&nfit_res->list, &t->resources); in __test_alloc()
1464 static void *test_alloc(struct nfit_test *t, size_t size, dma_addr_t *dma) in test_alloc() argument
1476 return __test_alloc(t, size, dma, buf); in test_alloc()
1485 struct nfit_test *t = instances[i]; in nfit_test_lookup() local
1487 if (!t) in nfit_test_lookup()
1490 list_for_each_entry(n, &t->resources, list) { in nfit_test_lookup()
1523 struct nfit_test *t = data; in put_dimms() local
1526 for (i = 0; i < t->num_dcr; i++) in put_dimms()
1527 if (t->dimm_dev[i]) in put_dimms()
1528 device_unregister(t->dimm_dev[i]); in put_dimms()
1642 static int nfit_test_dimm_init(struct nfit_test *t) in nfit_test_dimm_init() argument
1646 if (devm_add_action_or_reset(&t->pdev.dev, put_dimms, t)) in nfit_test_dimm_init()
1648 for (i = 0; i < t->num_dcr; i++) { in nfit_test_dimm_init()
1649 t->dimm_dev[i] = device_create_with_groups(nfit_test_dimm, in nfit_test_dimm_init()
1650 &t->pdev.dev, 0, NULL, in nfit_test_dimm_init()
1652 "test_dimm%d", i + t->dcr_idx); in nfit_test_dimm_init()
1653 if (!t->dimm_dev[i]) in nfit_test_dimm_init()
1659 static void security_init(struct nfit_test *t) in security_init() argument
1663 for (i = 0; i < t->num_dcr; i++) { in security_init()
1670 static void smart_init(struct nfit_test *t) in smart_init() argument
1681 for (i = 0; i < t->num_dcr; i++) { in smart_init()
1682 memcpy(&t->smart[i], &smart_def, sizeof(smart_def)); in smart_init()
1683 memcpy(&t->smart_threshold[i], &smart_t_data, in smart_init()
1688 static int nfit_test0_alloc(struct nfit_test *t) in nfit_test0_alloc() argument
1701 t->nfit_buf = test_alloc(t, nfit_size, &t->nfit_dma); in nfit_test0_alloc()
1702 if (!t->nfit_buf) in nfit_test0_alloc()
1704 t->nfit_size = nfit_size; in nfit_test0_alloc()
1706 t->spa_set[0] = test_alloc(t, SPA0_SIZE, &t->spa_set_dma[0]); in nfit_test0_alloc()
1707 if (!t->spa_set[0]) in nfit_test0_alloc()
1710 t->spa_set[1] = test_alloc(t, SPA1_SIZE, &t->spa_set_dma[1]); in nfit_test0_alloc()
1711 if (!t->spa_set[1]) in nfit_test0_alloc()
1714 t->spa_set[2] = test_alloc(t, SPA0_SIZE, &t->spa_set_dma[2]); in nfit_test0_alloc()
1715 if (!t->spa_set[2]) in nfit_test0_alloc()
1718 for (i = 0; i < t->num_dcr; i++) { in nfit_test0_alloc()
1719 t->dimm[i] = test_alloc(t, DIMM_SIZE, &t->dimm_dma[i]); in nfit_test0_alloc()
1720 if (!t->dimm[i]) in nfit_test0_alloc()
1723 t->label[i] = test_alloc(t, LABEL_SIZE, &t->label_dma[i]); in nfit_test0_alloc()
1724 if (!t->label[i]) in nfit_test0_alloc()
1726 sprintf(t->label[i], "label%d", i); in nfit_test0_alloc()
1728 t->flush[i] = test_alloc(t, max(PAGE_SIZE, in nfit_test0_alloc()
1730 &t->flush_dma[i]); in nfit_test0_alloc()
1731 if (!t->flush[i]) in nfit_test0_alloc()
1735 for (i = 0; i < t->num_dcr; i++) { in nfit_test0_alloc()
1736 t->dcr[i] = test_alloc(t, LABEL_SIZE, &t->dcr_dma[i]); in nfit_test0_alloc()
1737 if (!t->dcr[i]) in nfit_test0_alloc()
1741 t->_fit = test_alloc(t, sizeof(union acpi_object **), &t->_fit_dma); in nfit_test0_alloc()
1742 if (!t->_fit) in nfit_test0_alloc()
1745 if (nfit_test_dimm_init(t)) in nfit_test0_alloc()
1747 smart_init(t); in nfit_test0_alloc()
1748 security_init(t); in nfit_test0_alloc()
1749 return ars_state_init(&t->pdev.dev, &t->ars_state); in nfit_test0_alloc()
1752 static int nfit_test1_alloc(struct nfit_test *t) in nfit_test1_alloc() argument
1759 t->nfit_buf = test_alloc(t, nfit_size, &t->nfit_dma); in nfit_test1_alloc()
1760 if (!t->nfit_buf) in nfit_test1_alloc()
1762 t->nfit_size = nfit_size; in nfit_test1_alloc()
1764 t->spa_set[0] = test_alloc(t, SPA2_SIZE, &t->spa_set_dma[0]); in nfit_test1_alloc()
1765 if (!t->spa_set[0]) in nfit_test1_alloc()
1768 for (i = 0; i < t->num_dcr; i++) { in nfit_test1_alloc()
1769 t->label[i] = test_alloc(t, LABEL_SIZE, &t->label_dma[i]); in nfit_test1_alloc()
1770 if (!t->label[i]) in nfit_test1_alloc()
1772 sprintf(t->label[i], "label%d", i); in nfit_test1_alloc()
1775 t->spa_set[1] = test_alloc(t, SPA_VCD_SIZE, &t->spa_set_dma[1]); in nfit_test1_alloc()
1776 if (!t->spa_set[1]) in nfit_test1_alloc()
1779 if (nfit_test_dimm_init(t)) in nfit_test1_alloc()
1781 smart_init(t); in nfit_test1_alloc()
1782 return ars_state_init(&t->pdev.dev, &t->ars_state); in nfit_test1_alloc()
1795 static void nfit_test0_setup(struct nfit_test *t) in nfit_test0_setup() argument
1801 void *nfit_buf = t->nfit_buf; in nfit_test0_setup()
1819 spa->address = t->spa_set_dma[0]; in nfit_test0_setup()
1833 spa->address = t->spa_set_dma[1]; in nfit_test0_setup()
1843 spa->address = t->dcr_dma[0]; in nfit_test0_setup()
1853 spa->address = t->dcr_dma[1]; in nfit_test0_setup()
1863 spa->address = t->dcr_dma[2]; in nfit_test0_setup()
1873 spa->address = t->dcr_dma[3]; in nfit_test0_setup()
1883 spa->address = t->dimm_dma[0]; in nfit_test0_setup()
1893 spa->address = t->dimm_dma[1]; in nfit_test0_setup()
1903 spa->address = t->dimm_dma[2]; in nfit_test0_setup()
1913 spa->address = t->dimm_dma[3]; in nfit_test0_setup()
2312 flush->hint_address[i] = t->flush_dma[0] + i * sizeof(u64); in nfit_test0_setup()
2322 flush->hint_address[i] = t->flush_dma[1] + i * sizeof(u64); in nfit_test0_setup()
2332 flush->hint_address[i] = t->flush_dma[2] + i * sizeof(u64); in nfit_test0_setup()
2342 flush->hint_address[i] = t->flush_dma[3] + i * sizeof(u64); in nfit_test0_setup()
2353 if (t->setup_hotplug) { in nfit_test0_setup()
2400 spa->address = t->dcr_dma[4]; in nfit_test0_setup()
2414 spa->address = t->spa_set_dma[2]; in nfit_test0_setup()
2424 spa->address = t->dimm_dma[4]; in nfit_test0_setup()
2484 flush->hint_address[i] = t->flush_dma[4] in nfit_test0_setup()
2489 WARN_ON(offset != t->nfit_size); in nfit_test0_setup()
2492 t->nfit_filled = offset; in nfit_test0_setup()
2494 post_ars_status(&t->ars_state, &t->badrange, t->spa_set_dma[0], in nfit_test0_setup()
2497 acpi_desc = &t->acpi_desc; in nfit_test0_setup()
2536 static void nfit_test1_setup(struct nfit_test *t) in nfit_test1_setup() argument
2539 void *nfit_buf = t->nfit_buf; in nfit_test1_setup()
2552 spa->address = t->spa_set_dma[0]; in nfit_test1_setup()
2562 spa->address = t->spa_set_dma[1]; in nfit_test1_setup()
2626 WARN_ON(offset != t->nfit_size); in nfit_test1_setup()
2628 t->nfit_filled = offset; in nfit_test1_setup()
2630 post_ars_status(&t->ars_state, &t->badrange, t->spa_set_dma[0], in nfit_test1_setup()
2633 acpi_desc = &t->acpi_desc; in nfit_test1_setup()