aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/smp.h
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2013-06-19 19:49:39 -0400
committerDavid S. Miller <davem@davemloft.net>2013-06-19 19:49:39 -0400
commitd98cae64e4a733ff377184d78aa0b1f2b54faede (patch)
treee973e3c93fe7e17741567ac3947f5197bc9d582d /include/linux/smp.h
parent646093a29f85630d8efe2aa38fa585d2c3ea2e46 (diff)
parent4067c666f2dccf56f5db5c182713e68c40d46013 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts: drivers/net/wireless/ath/ath9k/Kconfig drivers/net/xen-netback/netback.c net/batman-adv/bat_iv_ogm.c net/wireless/nl80211.c The ath9k Kconfig conflict was a change of a Kconfig option name right next to the deletion of another option. The xen-netback conflict was overlapping changes involving the handling of the notify list in xen_netbk_rx_action(). Batman conflict resolution provided by Antonio Quartulli, basically keep everything in both conflict hunks. The nl80211 conflict is a little more involved. In 'net' we added a dynamic memory allocation to nl80211_dump_wiphy() to fix a race that Linus reported. Meanwhile in 'net-next' the handlers were converted to use pre and post doit handlers which use a flag to determine whether to hold the RTNL mutex around the operation. However, the dump handlers to not use this logic. Instead they have to explicitly do the locking. There were apparent bugs in the conversion of nl80211_dump_wiphy() in that we were not dropping the RTNL mutex in all the return paths, and it seems we very much should be doing so. So I fixed that whilst handling the overlapping changes. To simplify the initial returns, I take the RTNL mutex after we try to allocate 'tb'. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/smp.h')
-rw-r--r--include/linux/smp.h19
1 files changed, 12 insertions, 7 deletions
diff --git a/include/linux/smp.h b/include/linux/smp.h
index e6564c1dc552..c8488763277f 100644
--- a/include/linux/smp.h
+++ b/include/linux/smp.h
@@ -11,6 +11,7 @@
11#include <linux/list.h> 11#include <linux/list.h>
12#include <linux/cpumask.h> 12#include <linux/cpumask.h>
13#include <linux/init.h> 13#include <linux/init.h>
14#include <linux/irqflags.h>
14 15
15extern void cpu_idle(void); 16extern void cpu_idle(void);
16 17
@@ -139,13 +140,17 @@ static inline int up_smp_call_function(smp_call_func_t func, void *info)
139} 140}
140#define smp_call_function(func, info, wait) \ 141#define smp_call_function(func, info, wait) \
141 (up_smp_call_function(func, info)) 142 (up_smp_call_function(func, info))
142#define on_each_cpu(func,info,wait) \ 143
143 ({ \ 144static inline int on_each_cpu(smp_call_func_t func, void *info, int wait)
144 local_irq_disable(); \ 145{
145 func(info); \ 146 unsigned long flags;
146 local_irq_enable(); \ 147
147 0; \ 148 local_irq_save(flags);
148 }) 149 func(info);
150 local_irq_restore(flags);
151 return 0;
152}
153
149/* 154/*
150 * Note we still need to test the mask even for UP 155 * Note we still need to test the mask even for UP
151 * because we actually can get an empty mask from 156 * because we actually can get an empty mask from