android_kernel_xiaomi_sm7250/drivers/iommu/iommu-logger.h
Patrick Daly f1746fc8a0 iommu: qti: Track iommu domains
Add a new module to track iommu domains, including those which
may not currently be active. Supports multiple types of smmu
drivers.

Change-Id: Iacb98d823db8a87a2cf0868c467914847351950b
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
2020-01-24 13:53:40 -08:00

26 lines
771 B
C

/* SPDX-License-Identifier: GPL-2.0-only */
/* Copyright (c) 2020, The Linux Foundation. All rights reserved. */
#ifndef __LINUX_QTI_IOMMU_LOGGER_H
#define __LINUX_QTI_IOMMU_LOGGER_H
struct iommu_debug_attachment;
#if IS_ENABLED(CONFIG_QTI_IOMMU_SUPPORT)
int iommu_logger_register(struct iommu_debug_attachment **a,
struct iommu_domain *domain,
struct iommu_group *group);
void iommu_logger_unregister(struct iommu_debug_attachment *a);
#else
static inline int iommu_logger_register(struct iommu_debug_attachment **a,
struct iommu_domain *domain,
struct iommu_group *group)
{
return 0;
}
static inline void iommu_logger_unregister(struct iommu_debug_attachment *a) {}
#endif /* CONFIG_QTI_IOMMU_LOGGER */
#endif /* __LINUX_QTI_IOMMU_LOGGER_H */