linux/drivers/iommu/intel/perf.h

/* SPDX-License-Identifier: GPL-2.0 */
/*
 * perf.h - performance monitor header
 *
 * Copyright (C) 2021 Intel Corporation
 *
 * Author: Lu Baolu <[email protected]>
 */

enum latency_type {};

enum latency_count {};

struct latency_statistic {};

#ifdef CONFIG_DMAR_PERF
int dmar_latency_enable(struct intel_iommu *iommu, enum latency_type type);
void dmar_latency_disable(struct intel_iommu *iommu, enum latency_type type);
bool dmar_latency_enabled(struct intel_iommu *iommu, enum latency_type type);
void dmar_latency_update(struct intel_iommu *iommu, enum latency_type type,
			 u64 latency);
int dmar_latency_snapshot(struct intel_iommu *iommu, char *str, size_t size);
#else
static inline int
dmar_latency_enable(struct intel_iommu *iommu, enum latency_type type)
{
	return -EINVAL;
}

static inline void
dmar_latency_disable(struct intel_iommu *iommu, enum latency_type type)
{
}

static inline bool
dmar_latency_enabled(struct intel_iommu *iommu, enum latency_type type)
{
	return false;
}

static inline void
dmar_latency_update(struct intel_iommu *iommu, enum latency_type type, u64 latency)
{
}

static inline int
dmar_latency_snapshot(struct intel_iommu *iommu, char *str, size_t size)
{
	return 0;
}
#endif /* CONFIG_DMAR_PERF */