Patrick Daly | ee7a25f | 2017-04-05 18:05:02 -0700 | [diff] [blame] | 1 | /* Copyright (c) 2015-2017, The Linux Foundation. All rights reserved. |
Mitchel Humpherys | 42296fb | 2015-06-23 16:29:16 -0700 | [diff] [blame] | 2 | * |
| 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 | |
| 18 | void iommu_debug_attach_device(struct iommu_domain *domain, struct device *dev); |
Susheel Khiani | e66aa5b | 2015-08-25 17:25:42 +0530 | [diff] [blame] | 19 | void iommu_debug_domain_remove(struct iommu_domain *domain); |
Mitchel Humpherys | 42296fb | 2015-06-23 16:29:16 -0700 | [diff] [blame] | 20 | |
| 21 | #else /* !CONFIG_IOMMU_DEBUG_TRACKING */ |
| 22 | |
| 23 | static inline void iommu_debug_attach_device(struct iommu_domain *domain, |
| 24 | struct device *dev) |
| 25 | { |
| 26 | } |
| 27 | |
Susheel Khiani | e66aa5b | 2015-08-25 17:25:42 +0530 | [diff] [blame] | 28 | static inline void iommu_debug_domain_remove(struct iommu_domain *domain) |
| 29 | { |
| 30 | } |
| 31 | |
Mitchel Humpherys | 42296fb | 2015-06-23 16:29:16 -0700 | [diff] [blame] | 32 | #endif /* CONFIG_IOMMU_DEBUG_TRACKING */ |
| 33 | |
| 34 | #endif /* IOMMU_DEBUG_H */ |