1 From 63a8be65b593441a9ad374a23ac63ba447bfa71c Mon Sep 17 00:00:00 2001
2 From: Thomas Gleixner <tglx@linutronix.de>
3 Date: Sat, 27 Feb 2016 10:22:23 +0100
4 Subject: [PATCH 296/365] iommu/amd: Use WARN_ON_NORT in __attach_device()
6 RT does not disable interrupts here, but the protection is still
7 correct. Fixup the WARN_ON so it won't yell on RT.
9 Note: This WARN_ON is bogus anyway. The real thing this needs to check is that
10 amd_iommu_devtable_lock is held.
12 Reported-by: DIXLOR <dixlor@gmail.com>
13 Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
15 drivers/iommu/amd_iommu.c | 12 ++++++------
16 1 file changed, 6 insertions(+), 6 deletions(-)
18 diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c
19 index 5975d76..c8fc4c6 100644
20 --- a/drivers/iommu/amd_iommu.c
21 +++ b/drivers/iommu/amd_iommu.c
22 @@ -2022,10 +2022,10 @@ static int __attach_device(struct iommu_dev_data *dev_data,
26 - * Must be called with IRQs disabled. Warn here to detect early
28 + * Must be called with IRQs disabled on a non RT kernel. Warn here to
29 + * detect early when its not.
31 - WARN_ON(!irqs_disabled());
32 + WARN_ON_NONRT(!irqs_disabled());
35 spin_lock(&domain->lock);
36 @@ -2188,10 +2188,10 @@ static void __detach_device(struct iommu_dev_data *dev_data)
37 struct protection_domain *domain;
40 - * Must be called with IRQs disabled. Warn here to detect early
42 + * Must be called with IRQs disabled on a non RT kernel. Warn here to
43 + * detect early when its not.
45 - WARN_ON(!irqs_disabled());
46 + WARN_ON_NONRT(!irqs_disabled());
48 if (WARN_ON(!dev_data->domain))