Lines Matching refs:fake_props

71 	struct mpam_props fake_props = { };  in __prepare_percent_value_test()  local
78 mpam_set_feature(mpam_feat_mbw_max, &fake_props); in __prepare_percent_value_test()
79 fake_props.bwa_wd = param->width; in __prepare_percent_value_test()
83 res->value = percent_to_mbw_max(param->pc, &fake_props); in __prepare_percent_value_test()
84 res->pc = mbw_max_to_percent(param->value << res->shift, &fake_props); in __prepare_percent_value_test()
90 struct mpam_props fake_props = { }; in test_get_mba_granularity() local
93 mpam_set_feature(mpam_feat_mbw_max, &fake_props); in test_get_mba_granularity()
95 fake_props.bwa_wd = 0; in test_get_mba_granularity()
96 KUNIT_EXPECT_FALSE(test, mba_class_use_mbw_max(&fake_props)); in test_get_mba_granularity()
98 fake_props.bwa_wd = 1; in test_get_mba_granularity()
99 KUNIT_EXPECT_TRUE(test, mba_class_use_mbw_max(&fake_props)); in test_get_mba_granularity()
102 fake_props.bwa_wd = 16; in test_get_mba_granularity()
103 KUNIT_EXPECT_TRUE(test, mba_class_use_mbw_max(&fake_props)); in test_get_mba_granularity()
106 fake_props.bwa_wd = 0; in test_get_mba_granularity()
107 ret = get_mba_granularity(&fake_props); in test_get_mba_granularity()
110 fake_props.bwa_wd = 1; in test_get_mba_granularity()
111 ret = get_mba_granularity(&fake_props); in test_get_mba_granularity()
114 fake_props.bwa_wd = 2; in test_get_mba_granularity()
115 ret = get_mba_granularity(&fake_props); in test_get_mba_granularity()
118 fake_props.bwa_wd = 3; in test_get_mba_granularity()
119 ret = get_mba_granularity(&fake_props); in test_get_mba_granularity()
122 fake_props.bwa_wd = 6; in test_get_mba_granularity()
123 ret = get_mba_granularity(&fake_props); in test_get_mba_granularity()
126 fake_props.bwa_wd = 7; in test_get_mba_granularity()
127 ret = get_mba_granularity(&fake_props); in test_get_mba_granularity()
131 fake_props.bwa_wd = 16; /* architectural maximum */ in test_get_mba_granularity()
132 ret = get_mba_granularity(&fake_props); in test_get_mba_granularity()
202 struct mpam_props fake_props = {0}; in test_mbw_max_to_percent_limits() local
205 mpam_set_feature(mpam_feat_mbw_max, &fake_props); in test_mbw_max_to_percent_limits()
206 fake_props.bwa_wd = test_get_bwa_wd(test); in test_mbw_max_to_percent_limits()
207 max_value = GENMASK(15, 16 - fake_props.bwa_wd); in test_mbw_max_to_percent_limits()
209 KUNIT_EXPECT_EQ(test, mbw_max_to_percent(max_value, &fake_props), in test_mbw_max_to_percent_limits()
211 KUNIT_EXPECT_EQ(test, mbw_max_to_percent(0, &fake_props), in test_mbw_max_to_percent_limits()
212 get_mba_min(&fake_props)); in test_mbw_max_to_percent_limits()
220 if (fake_props.bwa_wd >= 8) in test_mbw_max_to_percent_limits()
221 KUNIT_EXPECT_EQ(test, mbw_max_to_percent(0, &fake_props), 0); in test_mbw_max_to_percent_limits()
223 if (fake_props.bwa_wd < 8 && in test_mbw_max_to_percent_limits()
224 mbw_max_to_percent(0, &fake_props) == 0) in test_mbw_max_to_percent_limits()
226 fake_props.bwa_wd); in test_mbw_max_to_percent_limits()
235 struct mpam_props fake_props = {0}; in test_percent_max_roundtrip_stability() local
239 mpam_set_feature(mpam_feat_mbw_max, &fake_props); in test_percent_max_roundtrip_stability()
240 fake_props.bwa_wd = test_get_bwa_wd(test); in test_percent_max_roundtrip_stability()
241 shift = 16 - fake_props.bwa_wd; in test_percent_max_roundtrip_stability()
247 if (fake_props.bwa_wd >= 7) { in test_percent_max_roundtrip_stability()
249 for (pc = get_mba_min(&fake_props); pc <= MAX_MBA_BW; pc++) { in test_percent_max_roundtrip_stability()
250 max = percent_to_mbw_max(pc, &fake_props); in test_percent_max_roundtrip_stability()
251 pc2 = mbw_max_to_percent(max, &fake_props); in test_percent_max_roundtrip_stability()
257 pc = mbw_max_to_percent(max, &fake_props); in test_percent_max_roundtrip_stability()
258 max2 = percent_to_mbw_max(pc, &fake_props); in test_percent_max_roundtrip_stability()