aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-07-22 20:04:04 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-07-22 20:04:04 -0400
commitdc43d9fa73d82083656fb9c02f4823bcdcfb9f91 (patch)
treef5303b6d7ff3e0157ab3312b5dc3182785972fec /include
parent80775068dbcf849dca81316e43bcc309985956ac (diff)
parent50c31e4a2497ea17747b587e8f96b278f07f5483 (diff)
Merge branch 'x86-mtrr-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'x86-mtrr-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: x86, mtrr: Use pci_dev->revision x86, mtrr: use stop_machine APIs for doing MTRR rendezvous stop_machine: implement stop_machine_from_inactive_cpu() stop_machine: reorganize stop_cpus() implementation x86, mtrr: lock stop machine during MTRR rendezvous sequence
Diffstat (limited to 'include')
-rw-r--r--include/linux/stop_machine.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/include/linux/stop_machine.h b/include/linux/stop_machine.h
index 092dc9b1ce7d..4a9d0c7edc65 100644
--- a/include/linux/stop_machine.h
+++ b/include/linux/stop_machine.h
@@ -124,15 +124,19 @@ int stop_machine(int (*fn)(void *), void *data, const struct cpumask *cpus);
124 */ 124 */
125int __stop_machine(int (*fn)(void *), void *data, const struct cpumask *cpus); 125int __stop_machine(int (*fn)(void *), void *data, const struct cpumask *cpus);
126 126
127int stop_machine_from_inactive_cpu(int (*fn)(void *), void *data,
128 const struct cpumask *cpus);
129
127#else /* CONFIG_STOP_MACHINE && CONFIG_SMP */ 130#else /* CONFIG_STOP_MACHINE && CONFIG_SMP */
128 131
129static inline int __stop_machine(int (*fn)(void *), void *data, 132static inline int __stop_machine(int (*fn)(void *), void *data,
130 const struct cpumask *cpus) 133 const struct cpumask *cpus)
131{ 134{
135 unsigned long flags;
132 int ret; 136 int ret;
133 local_irq_disable(); 137 local_irq_save(flags);
134 ret = fn(data); 138 ret = fn(data);
135 local_irq_enable(); 139 local_irq_restore(flags);
136 return ret; 140 return ret;
137} 141}
138 142
@@ -142,5 +146,11 @@ static inline int stop_machine(int (*fn)(void *), void *data,
142 return __stop_machine(fn, data, cpus); 146 return __stop_machine(fn, data, cpus);
143} 147}
144 148
149static inline int stop_machine_from_inactive_cpu(int (*fn)(void *), void *data,
150 const struct cpumask *cpus)
151{
152 return __stop_machine(fn, data, cpus);
153}
154
145#endif /* CONFIG_STOP_MACHINE && CONFIG_SMP */ 155#endif /* CONFIG_STOP_MACHINE && CONFIG_SMP */
146#endif /* _LINUX_STOP_MACHINE */ 156#endif /* _LINUX_STOP_MACHINE */