Lines Matching refs:ops
10 const struct xe_lmtt_ops *ops; member
26 const struct xe_lmtt_ops *ops = p->ops; in test_ops() local
29 KUNIT_ASSERT_NOT_NULL(test, ops->lmtt_root_pd_level); in test_ops()
30 KUNIT_ASSERT_NOT_NULL(test, ops->lmtt_pte_num); in test_ops()
31 KUNIT_ASSERT_NOT_NULL(test, ops->lmtt_pte_size); in test_ops()
32 KUNIT_ASSERT_NOT_NULL(test, ops->lmtt_pte_shift); in test_ops()
33 KUNIT_ASSERT_NOT_NULL(test, ops->lmtt_pte_index); in test_ops()
34 KUNIT_ASSERT_NOT_NULL(test, ops->lmtt_pte_encode); in test_ops()
36 KUNIT_EXPECT_NE(test, ops->lmtt_root_pd_level(), 0); in test_ops()
38 for (n = 0; n <= ops->lmtt_root_pd_level(); n++) { in test_ops()
39 KUNIT_EXPECT_NE_MSG(test, ops->lmtt_pte_num(n), 0, in test_ops()
41 KUNIT_EXPECT_NE_MSG(test, ops->lmtt_pte_size(n), 0, in test_ops()
43 KUNIT_EXPECT_NE_MSG(test, ops->lmtt_pte_encode(0, n), LMTT_PTE_INVALID, in test_ops()
47 for (n = 0; n < ops->lmtt_root_pd_level(); n++) { in test_ops()
48 u64 addr = BIT_ULL(ops->lmtt_pte_shift(n)); in test_ops()
50 KUNIT_EXPECT_NE_MSG(test, ops->lmtt_pte_shift(n), 0, in test_ops()
52 KUNIT_EXPECT_EQ_MSG(test, ops->lmtt_pte_index(addr - 1, n), 0, in test_ops()
54 KUNIT_EXPECT_EQ_MSG(test, ops->lmtt_pte_index(addr + 1, n), 1, in test_ops()
56 KUNIT_EXPECT_EQ_MSG(test, ops->lmtt_pte_index(addr * 2 - 1, n), 1, in test_ops()
58 KUNIT_EXPECT_EQ_MSG(test, ops->lmtt_pte_index(addr * 2, n), 2, in test_ops()