]> rtime.felk.cvut.cz Git - hercules2020/nv-tegra/linux-4.4.git/blob - rt-patches/0296-iommu-amd-Use-WARN_ON_NORT-in-__attach_device.patch
WAR:media:i2c:ov5693: add flip and mirror setting
[hercules2020/nv-tegra/linux-4.4.git] / rt-patches / 0296-iommu-amd-Use-WARN_ON_NORT-in-__attach_device.patch
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()
5
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.
8
9 Note: This WARN_ON is bogus anyway. The real thing this needs to check is that
10 amd_iommu_devtable_lock is held.
11
12 Reported-by: DIXLOR <dixlor@gmail.com>
13 Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
14 ---
15  drivers/iommu/amd_iommu.c | 12 ++++++------
16  1 file changed, 6 insertions(+), 6 deletions(-)
17
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,
23         int ret;
24  
25         /*
26 -        * Must be called with IRQs disabled. Warn here to detect early
27 -        * when its not.
28 +        * Must be called with IRQs disabled on a non RT kernel. Warn here to
29 +        * detect early when its not.
30          */
31 -       WARN_ON(!irqs_disabled());
32 +       WARN_ON_NONRT(!irqs_disabled());
33  
34         /* lock domain */
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;
38  
39         /*
40 -        * Must be called with IRQs disabled. Warn here to detect early
41 -        * when its not.
42 +        * Must be called with IRQs disabled on a non RT kernel. Warn here to
43 +        * detect early when its not.
44          */
45 -       WARN_ON(!irqs_disabled());
46 +       WARN_ON_NONRT(!irqs_disabled());
47  
48         if (WARN_ON(!dev_data->domain))
49                 return;
50 -- 
51 2.7.4
52