Lines Matching refs:lstat
20 struct latency_statistic *lstat = iommu->perf_statistic; in dmar_latency_enabled() local
22 return lstat && lstat[type].enabled; in dmar_latency_enabled()
27 struct latency_statistic *lstat; in dmar_latency_enable() local
36 iommu->perf_statistic = kcalloc(DMAR_LATENCY_NUM, sizeof(*lstat), in dmar_latency_enable()
44 lstat = iommu->perf_statistic; in dmar_latency_enable()
46 if (!lstat[type].enabled) { in dmar_latency_enable()
47 lstat[type].enabled = true; in dmar_latency_enable()
48 lstat[type].counter[COUNTS_MIN] = UINT_MAX; in dmar_latency_enable()
59 struct latency_statistic *lstat = iommu->perf_statistic; in dmar_latency_disable() local
66 memset(&lstat[type], 0, sizeof(*lstat) * DMAR_LATENCY_NUM); in dmar_latency_disable()
72 struct latency_statistic *lstat = iommu->perf_statistic; in dmar_latency_update() local
81 lstat[type].counter[COUNTS_10e2]++; in dmar_latency_update()
83 lstat[type].counter[COUNTS_10e3]++; in dmar_latency_update()
85 lstat[type].counter[COUNTS_10e4]++; in dmar_latency_update()
87 lstat[type].counter[COUNTS_10e5]++; in dmar_latency_update()
89 lstat[type].counter[COUNTS_10e6]++; in dmar_latency_update()
91 lstat[type].counter[COUNTS_10e7]++; in dmar_latency_update()
93 lstat[type].counter[COUNTS_10e8_plus]++; in dmar_latency_update()
95 min = lstat[type].counter[COUNTS_MIN]; in dmar_latency_update()
96 max = lstat[type].counter[COUNTS_MAX]; in dmar_latency_update()
97 lstat[type].counter[COUNTS_MIN] = min_t(u64, min, latency); in dmar_latency_update()
98 lstat[type].counter[COUNTS_MAX] = max_t(u64, max, latency); in dmar_latency_update()
99 lstat[type].counter[COUNTS_SUM] += latency; in dmar_latency_update()
100 lstat[type].samples++; in dmar_latency_update()
118 struct latency_statistic *lstat = iommu->perf_statistic; in dmar_latency_snapshot() local
137 u64 val = lstat[i].counter[j]; in dmar_latency_snapshot()
150 if (lstat[i].samples) in dmar_latency_snapshot()
151 val = div_u64(val, (lstat[i].samples * 1000)); in dmar_latency_snapshot()