blob: 91c418d9e37fa6f657efcf42c7c99b60da00d8ec [file] [log] [blame]
Patrick Dalyee7a25f2017-04-05 18:05:02 -07001/* Copyright (c) 2015-2017, The Linux Foundation. All rights reserved.
Mitchel Humpherys42296fb2015-06-23 16:29:16 -07002 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License version 2 and
5 * only version 2 as published by the Free Software Foundation.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 */
12
13#ifndef IOMMU_DEBUG_H
14#define IOMMU_DEBUG_H
15
16#ifdef CONFIG_IOMMU_DEBUG_TRACKING
17
18void iommu_debug_attach_device(struct iommu_domain *domain, struct device *dev);
Susheel Khianie66aa5b2015-08-25 17:25:42 +053019void iommu_debug_domain_remove(struct iommu_domain *domain);
Mitchel Humpherys42296fb2015-06-23 16:29:16 -070020
21#else /* !CONFIG_IOMMU_DEBUG_TRACKING */
22
23static inline void iommu_debug_attach_device(struct iommu_domain *domain,
24 struct device *dev)
25{
26}
27
Susheel Khianie66aa5b2015-08-25 17:25:42 +053028static inline void iommu_debug_domain_remove(struct iommu_domain *domain)
29{
30}
31
Mitchel Humpherys42296fb2015-06-23 16:29:16 -070032#endif /* CONFIG_IOMMU_DEBUG_TRACKING */
33
34#endif /* IOMMU_DEBUG_H */