diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2011-07-19 11:02:07 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2011-09-13 05:12:20 -0400 |
commit | 3b8f40481513a7b6123def5a02db4cff96ae2198 (patch) | |
tree | b183c44200f644f5f84484aa7603924815b7adbb /drivers/iommu | |
parent | 96f8e98bfeba3efa82eca85343bc058f6eced888 (diff) |
locking, x86, iommu: Annotate qi->q_lock as raw
The qi->q_lock lock can be taken in atomic context and therefore
cannot be preempted on -rt - annotate it.
In mainline this change documents the low level nature of
the lock - otherwise there's no functional difference. Lockdep
and Sparse checking will work as usual.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'drivers/iommu')
-rw-r--r-- | drivers/iommu/dmar.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/iommu/dmar.c b/drivers/iommu/dmar.c index be4164b3ebe8..388a1189e552 100644 --- a/drivers/iommu/dmar.c +++ b/drivers/iommu/dmar.c | |||
@@ -921,11 +921,11 @@ int qi_submit_sync(struct qi_desc *desc, struct intel_iommu *iommu) | |||
921 | restart: | 921 | restart: |
922 | rc = 0; | 922 | rc = 0; |
923 | 923 | ||
924 | spin_lock_irqsave(&qi->q_lock, flags); | 924 | raw_spin_lock_irqsave(&qi->q_lock, flags); |
925 | while (qi->free_cnt < 3) { | 925 | while (qi->free_cnt < 3) { |
926 | spin_unlock_irqrestore(&qi->q_lock, flags); | 926 | raw_spin_unlock_irqrestore(&qi->q_lock, flags); |
927 | cpu_relax(); | 927 | cpu_relax(); |
928 | spin_lock_irqsave(&qi->q_lock, flags); | 928 | raw_spin_lock_irqsave(&qi->q_lock, flags); |
929 | } | 929 | } |
930 | 930 | ||
931 | index = qi->free_head; | 931 | index = qi->free_head; |
@@ -965,15 +965,15 @@ restart: | |||
965 | if (rc) | 965 | if (rc) |
966 | break; | 966 | break; |
967 | 967 | ||
968 | spin_unlock(&qi->q_lock); | 968 | raw_spin_unlock(&qi->q_lock); |
969 | cpu_relax(); | 969 | cpu_relax(); |
970 | spin_lock(&qi->q_lock); | 970 | raw_spin_lock(&qi->q_lock); |
971 | } | 971 | } |
972 | 972 | ||
973 | qi->desc_status[index] = QI_DONE; | 973 | qi->desc_status[index] = QI_DONE; |
974 | 974 | ||
975 | reclaim_free_desc(qi); | 975 | reclaim_free_desc(qi); |
976 | spin_unlock_irqrestore(&qi->q_lock, flags); | 976 | raw_spin_unlock_irqrestore(&qi->q_lock, flags); |
977 | 977 | ||
978 | if (rc == -EAGAIN) | 978 | if (rc == -EAGAIN) |
979 | goto restart; | 979 | goto restart; |
@@ -1159,7 +1159,7 @@ int dmar_enable_qi(struct intel_iommu *iommu) | |||
1159 | qi->free_head = qi->free_tail = 0; | 1159 | qi->free_head = qi->free_tail = 0; |
1160 | qi->free_cnt = QI_LENGTH; | 1160 | qi->free_cnt = QI_LENGTH; |
1161 | 1161 | ||
1162 | spin_lock_init(&qi->q_lock); | 1162 | raw_spin_lock_init(&qi->q_lock); |
1163 | 1163 | ||
1164 | __dmar_enable_qi(iommu); | 1164 | __dmar_enable_qi(iommu); |
1165 | 1165 | ||