Ticket #907: preempt-has-no-spinlocks-here2.diff
| File preempt-has-no-spinlocks-here2.diff, 3.0 kB (added by Mark Glines <mark@glines.org>, 5 years ago) |
|---|
-
net80211/ieee80211_linux.h
old new 64 64 #define IEEE80211_RESCHEDULE schedule 65 65 66 66 /* Locking */ 67 /* NB: beware, spin_is_locked() is not usefully defined for UP+!PREEMPT67 /* NB: beware, spin_is_locked() is not usefully defined for non-SMP 68 68 * because spinlocks do not exist in this configuration. Instead IRQs 69 69 * are simply disabled, as this is all that is needed 70 70 */ … … 91 91 #define IEEE80211_LOCK(_ic) spin_lock(&(_ic)->ic_comlock) 92 92 #define IEEE80211_UNLOCK(_ic) spin_unlock(&(_ic)->ic_comlock) 93 93 94 #if (defined(CONFIG_SMP) || defined(CONFIG_PREEMPT)) && defined(spin_is_locked)94 #if defined(CONFIG_SMP) && defined(spin_is_locked) 95 95 #define IEEE80211_LOCK_ASSERT(_ic) \ 96 96 KASSERT(spin_is_locked(&(_ic)->ic_comlock),("ieee80211com not locked!")) 97 97 #else … … 114 114 } while (0) 115 115 #define IEEE80211_VAPS_UNLOCK_IRQ_EARLY(_ic) spin_unlock_irqrestore(&(_ic)->ic_vapslock, _vaps_lockflags) 116 116 117 #if (defined(CONFIG_SMP) || defined(CONFIG_PREEMPT)) && defined(spin_is_locked)117 #if defined(CONFIG_SMP) && defined(spin_is_locked) 118 118 #define IEEE80211_VAPS_LOCK_ASSERT(_ic) \ 119 119 KASSERT(spin_is_locked(&(_ic)->ic_vapslock), \ 120 120 ("ieee80211com_vaps not locked!")) … … 146 146 #define IEEE80211_NODE_UNLOCK_IRQ_EARLY(_ni) \ 147 147 spin_unlock_irqrestore(&(_ni)->ni_nodelock, __node_lockflags); 148 148 149 #if (defined(CONFIG_SMP) || defined(CONFIG_PREEMPT)) && defined(spin_is_locked)149 #if defined(CONFIG_SMP) && defined(spin_is_locked) 150 150 #define IEEE80211_NODE_LOCK_ASSERT(_nt) \ 151 151 KASSERT(spin_is_locked(&(_ni)->ni_nodelock), \ 152 152 ("802.11 node not locked!")) … … 177 177 #define IEEE80211_NODE_TABLE_UNLOCK_IRQ_EARLY(_nt) \ 178 178 spin_unlock_irqrestore(&(_nt)->nt_nodelock, __node_lockflags); 179 179 180 #if (defined(CONFIG_SMP) || defined(CONFIG_PREEMPT)) && defined(spin_is_locked)180 #if defined(CONFIG_SMP) && defined(spin_is_locked) 181 181 #define IEEE80211_NODE_TABLE_LOCK_ASSERT(_nt) \ 182 182 KASSERT(spin_is_locked(&(_nt)->nt_nodelock), \ 183 183 ("802.11 node table not locked!")) … … 202 202 #define IEEE80211_SCAN_UNLOCK_IRQ_EARLY(_nt) \ 203 203 spin_unlock_irqrestore(&(_nt)->nt_scanlock, __scan_lockflags); 204 204 205 #if (defined(CONFIG_SMP) || defined(CONFIG_PREEMPT)) && defined(spin_is_locked)205 #if defined(CONFIG_SMP) && defined(spin_is_locked) 206 206 #define IEEE80211_SCAN_LOCK_ASSERT(_nt) \ 207 207 KASSERT(spin_is_locked(&(_nt)->nt_scanlock), ("scangen not locked!")) 208 208 #else … … 220 220 #define ACL_LOCK_BH(_as) spin_lock_bh(&(_as)->as_lock) 221 221 #define ACL_UNLOCK_BH(_as) spin_unlock_bh(&(_as)->as_lock) 222 222 223 #if (defined(CONFIG_SMP) || defined(CONFIG_PREEMPT)) && defined(spin_is_locked)223 #if defined(CONFIG_SMP) && defined(spin_is_locked) 224 224 #define ACL_LOCK_ASSERT(_as) \ 225 225 KASSERT(spin_is_locked(&(_as)->as_lock), ("ACL not locked!")) 226 226 #else
