linux/drivers/iommu/intel/perfmon.h

/* SPDX-License-Identifier: GPL-2.0 */

/*
 * PERFCFGOFF_REG, PERFFRZOFF_REG
 * PERFOVFOFF_REG, PERFCNTROFF_REG
 */
#define IOMMU_PMU_NUM_OFF_REGS
#define IOMMU_PMU_OFF_REGS_STEP

#define IOMMU_PMU_FILTER_REQUESTER_ID
#define IOMMU_PMU_FILTER_DOMAIN
#define IOMMU_PMU_FILTER_PASID
#define IOMMU_PMU_FILTER_ATS
#define IOMMU_PMU_FILTER_PAGE_TABLE

#define IOMMU_PMU_FILTER_EN

#define IOMMU_PMU_CFG_OFFSET
#define IOMMU_PMU_CFG_CNTRCAP_OFFSET
#define IOMMU_PMU_CFG_CNTREVCAP_OFFSET
#define IOMMU_PMU_CFG_SIZE
#define IOMMU_PMU_CFG_FILTERS_OFFSET

#define IOMMU_PMU_CAP_REGS_STEP

#define iommu_cntrcap_pcc(p)
#define iommu_cntrcap_cw(p)
#define iommu_cntrcap_ios(p)
#define iommu_cntrcap_egcnt(p)

#define IOMMU_EVENT_CFG_EGI_SHIFT
#define IOMMU_EVENT_CFG_ES_SHIFT
#define IOMMU_EVENT_CFG_INT

#define iommu_event_select(p)
#define iommu_event_group(p)

#ifdef CONFIG_INTEL_IOMMU_PERF_EVENTS
int alloc_iommu_pmu(struct intel_iommu *iommu);
void free_iommu_pmu(struct intel_iommu *iommu);
void iommu_pmu_register(struct intel_iommu *iommu);
void iommu_pmu_unregister(struct intel_iommu *iommu);
#else
static inline int
alloc_iommu_pmu(struct intel_iommu *iommu)
{
	return 0;
}

static inline void
free_iommu_pmu(struct intel_iommu *iommu)
{
}

static inline void
iommu_pmu_register(struct intel_iommu *iommu)
{
}

static inline void
iommu_pmu_unregister(struct intel_iommu *iommu)
{
}
#endif /* CONFIG_INTEL_IOMMU_PERF_EVENTS */