53 lines
1.6 KiB
Diff
53 lines
1.6 KiB
Diff
From 9849d5c25683b98de80b939fc33bc8ef9bdd2edb Mon Sep 17 00:00:00 2001
|
|
From: Thomas Gleixner <tglx@linutronix.de>
|
|
Date: Sat, 27 Feb 2016 10:22:23 +0100
|
|
Subject: [PATCH 073/365] iommu/amd: Use WARN_ON_NORT in __attach_device()
|
|
|
|
RT does not disable interrupts here, but the protection is still
|
|
correct. Fixup the WARN_ON so it won't yell on RT.
|
|
|
|
Note: This WARN_ON is bogus anyway. The real thing this needs to check is that
|
|
amd_iommu_devtable_lock is held.
|
|
|
|
Reported-by: DIXLOR <dixlor@gmail.com>
|
|
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
|
|
---
|
|
drivers/iommu/amd_iommu.c | 12 ++++++------
|
|
1 file changed, 6 insertions(+), 6 deletions(-)
|
|
|
|
diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c
|
|
index f4a15d9f2bbb..e5693cbc0e3b 100644
|
|
--- a/drivers/iommu/amd_iommu.c
|
|
+++ b/drivers/iommu/amd_iommu.c
|
|
@@ -1953,10 +1953,10 @@ static int __attach_device(struct iommu_dev_data *dev_data,
|
|
int ret;
|
|
|
|
/*
|
|
- * Must be called with IRQs disabled. Warn here to detect early
|
|
- * when its not.
|
|
+ * Must be called with IRQs disabled on a non RT kernel. Warn here to
|
|
+ * detect early when its not.
|
|
*/
|
|
- WARN_ON(!irqs_disabled());
|
|
+ WARN_ON_NONRT(!irqs_disabled());
|
|
|
|
/* lock domain */
|
|
spin_lock(&domain->lock);
|
|
@@ -2126,10 +2126,10 @@ static void __detach_device(struct iommu_dev_data *dev_data)
|
|
struct protection_domain *domain;
|
|
|
|
/*
|
|
- * Must be called with IRQs disabled. Warn here to detect early
|
|
- * when its not.
|
|
+ * Must be called with IRQs disabled on a non RT kernel. Warn here to
|
|
+ * detect early when its not.
|
|
*/
|
|
- WARN_ON(!irqs_disabled());
|
|
+ WARN_ON_NONRT(!irqs_disabled());
|
|
|
|
if (WARN_ON(!dev_data->domain))
|
|
return;
|
|
--
|
|
2.28.0
|
|
|