Lines Matching refs:t
151 int (*alloc)(struct nfit_test *t);
152 void (*setup)(struct nfit_test *t);
261 struct nfit_test *t = container_of(acpi_desc, typeof(*t), acpi_desc); in nfit_test_ctl() local
284 t->label[i]); in nfit_test_ctl()
288 t->label[i]); in nfit_test_ctl()
336 static void *__test_alloc(struct nfit_test *t, size_t size, dma_addr_t *dma, in __test_alloc() argument
339 struct device *dev = &t->pdev.dev; in __test_alloc()
359 list_add(&nfit_res->list, &t->resources); in __test_alloc()
373 static void *test_alloc(struct nfit_test *t, size_t size, dma_addr_t *dma) in test_alloc() argument
378 return __test_alloc(t, size, dma, buf); in test_alloc()
381 static void *test_alloc_coherent(struct nfit_test *t, size_t size, in test_alloc_coherent() argument
384 struct device *dev = &t->pdev.dev; in test_alloc_coherent()
387 return __test_alloc(t, size, dma, buf); in test_alloc_coherent()
396 struct nfit_test *t = instances[i]; in nfit_test_lookup() local
398 if (!t) in nfit_test_lookup()
401 list_for_each_entry(n, &t->resources, list) { in nfit_test_lookup()
421 static int nfit_test0_alloc(struct nfit_test *t) in nfit_test0_alloc() argument
430 t->nfit_buf = test_alloc(t, nfit_size, &t->nfit_dma); in nfit_test0_alloc()
431 if (!t->nfit_buf) in nfit_test0_alloc()
433 t->nfit_size = nfit_size; in nfit_test0_alloc()
435 t->spa_set[0] = test_alloc_coherent(t, SPA0_SIZE, &t->spa_set_dma[0]); in nfit_test0_alloc()
436 if (!t->spa_set[0]) in nfit_test0_alloc()
439 t->spa_set[1] = test_alloc_coherent(t, SPA1_SIZE, &t->spa_set_dma[1]); in nfit_test0_alloc()
440 if (!t->spa_set[1]) in nfit_test0_alloc()
443 t->spa_set[2] = test_alloc_coherent(t, SPA0_SIZE, &t->spa_set_dma[2]); in nfit_test0_alloc()
444 if (!t->spa_set[2]) in nfit_test0_alloc()
448 t->dimm[i] = test_alloc(t, DIMM_SIZE, &t->dimm_dma[i]); in nfit_test0_alloc()
449 if (!t->dimm[i]) in nfit_test0_alloc()
452 t->label[i] = test_alloc(t, LABEL_SIZE, &t->label_dma[i]); in nfit_test0_alloc()
453 if (!t->label[i]) in nfit_test0_alloc()
455 sprintf(t->label[i], "label%d", i); in nfit_test0_alloc()
457 t->flush[i] = test_alloc(t, 8, &t->flush_dma[i]); in nfit_test0_alloc()
458 if (!t->flush[i]) in nfit_test0_alloc()
463 t->dcr[i] = test_alloc(t, LABEL_SIZE, &t->dcr_dma[i]); in nfit_test0_alloc()
464 if (!t->dcr[i]) in nfit_test0_alloc()
471 static int nfit_test1_alloc(struct nfit_test *t) in nfit_test1_alloc() argument
477 t->nfit_buf = test_alloc(t, nfit_size, &t->nfit_dma); in nfit_test1_alloc()
478 if (!t->nfit_buf) in nfit_test1_alloc()
480 t->nfit_size = nfit_size; in nfit_test1_alloc()
482 t->spa_set[0] = test_alloc_coherent(t, SPA2_SIZE, &t->spa_set_dma[0]); in nfit_test1_alloc()
483 if (!t->spa_set[0]) in nfit_test1_alloc()
489 static void nfit_test0_setup(struct nfit_test *t) in nfit_test0_setup() argument
494 void *nfit_buf = t->nfit_buf; in nfit_test0_setup()
511 spa->address = t->spa_set_dma[0]; in nfit_test0_setup()
524 spa->address = t->spa_set_dma[1]; in nfit_test0_setup()
533 spa->address = t->dcr_dma[0]; in nfit_test0_setup()
542 spa->address = t->dcr_dma[1]; in nfit_test0_setup()
551 spa->address = t->dcr_dma[2]; in nfit_test0_setup()
560 spa->address = t->dcr_dma[3]; in nfit_test0_setup()
569 spa->address = t->dimm_dma[0]; in nfit_test0_setup()
578 spa->address = t->dimm_dma[1]; in nfit_test0_setup()
587 spa->address = t->dimm_dma[2]; in nfit_test0_setup()
596 spa->address = t->dimm_dma[3]; in nfit_test0_setup()
610 memdev->region_offset = t->spa_set_dma[0]; in nfit_test0_setup()
625 memdev->region_offset = t->spa_set_dma[0] + SPA0_SIZE/2; in nfit_test0_setup()
640 memdev->region_offset = t->spa_set_dma[1]; in nfit_test0_setup()
655 memdev->region_offset = t->spa_set_dma[1] + SPA1_SIZE/4; in nfit_test0_setup()
670 memdev->region_offset = t->spa_set_dma[1] + 2*SPA1_SIZE/4; in nfit_test0_setup()
685 memdev->region_offset = t->spa_set_dma[1] + 3*SPA1_SIZE/4; in nfit_test0_setup()
927 flush->hint_address[0] = t->flush_dma[0]; in nfit_test0_setup()
935 flush->hint_address[0] = t->flush_dma[1]; in nfit_test0_setup()
943 flush->hint_address[0] = t->flush_dma[2]; in nfit_test0_setup()
951 flush->hint_address[0] = t->flush_dma[3]; in nfit_test0_setup()
953 if (t->setup_hotplug) { in nfit_test0_setup()
990 spa->address = t->dcr_dma[4]; in nfit_test0_setup()
1003 spa->address = t->spa_set_dma[2]; in nfit_test0_setup()
1012 spa->address = t->dimm_dma[4]; in nfit_test0_setup()
1042 memdev->region_offset = t->spa_set_dma[2]; in nfit_test0_setup()
1070 flush->hint_address[0] = t->flush_dma[4]; in nfit_test0_setup()
1073 acpi_desc = &t->acpi_desc; in nfit_test0_setup()
1084 static void nfit_test1_setup(struct nfit_test *t) in nfit_test1_setup() argument
1087 void *nfit_buf = t->nfit_buf; in nfit_test1_setup()
1099 spa->address = t->spa_set_dma[0]; in nfit_test1_setup()