aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/base/node.c2
-rw-r--r--drivers/char/sysrq.c2
-rw-r--r--drivers/oprofile/buffer_sync.c20
-rw-r--r--drivers/oprofile/buffer_sync.h4
-rw-r--r--drivers/oprofile/oprof.c9
-rw-r--r--drivers/pci/pci-driver.c3
-rw-r--r--drivers/xen/cpu_hotplug.c4
7 files changed, 12 insertions, 32 deletions
diff --git a/drivers/base/node.c b/drivers/base/node.c
index f8f578a71b25..40b809742a1c 100644
--- a/drivers/base/node.c
+++ b/drivers/base/node.c
@@ -24,7 +24,7 @@ static struct sysdev_class node_class = {
24static ssize_t node_read_cpumap(struct sys_device *dev, int type, char *buf) 24static ssize_t node_read_cpumap(struct sys_device *dev, int type, char *buf)
25{ 25{
26 struct node *node_dev = to_node(dev); 26 struct node *node_dev = to_node(dev);
27 node_to_cpumask_ptr(mask, node_dev->sysdev.id); 27 const struct cpumask *mask = cpumask_of_node(node_dev->sysdev.id);
28 int len; 28 int len;
29 29
30 /* 2008/04/07: buf currently PAGE_SIZE, need 9 chars per 32 bits. */ 30 /* 2008/04/07: buf currently PAGE_SIZE, need 9 chars per 32 bits. */
diff --git a/drivers/char/sysrq.c b/drivers/char/sysrq.c
index 33a9351c896d..3df694e54545 100644
--- a/drivers/char/sysrq.c
+++ b/drivers/char/sysrq.c
@@ -35,7 +35,7 @@
35#include <linux/vt_kern.h> 35#include <linux/vt_kern.h>
36#include <linux/workqueue.h> 36#include <linux/workqueue.h>
37#include <linux/kexec.h> 37#include <linux/kexec.h>
38#include <linux/irq.h> 38#include <linux/interrupt.h>
39#include <linux/hrtimer.h> 39#include <linux/hrtimer.h>
40#include <linux/oom.h> 40#include <linux/oom.h>
41 41
diff --git a/drivers/oprofile/buffer_sync.c b/drivers/oprofile/buffer_sync.c
index 2c9aa49e43cd..8574622e36a5 100644
--- a/drivers/oprofile/buffer_sync.c
+++ b/drivers/oprofile/buffer_sync.c
@@ -154,6 +154,10 @@ int sync_start(void)
154{ 154{
155 int err; 155 int err;
156 156
157 if (!alloc_cpumask_var(&marked_cpus, GFP_KERNEL))
158 return -ENOMEM;
159 cpumask_clear(marked_cpus);
160
157 start_cpu_work(); 161 start_cpu_work();
158 162
159 err = task_handoff_register(&task_free_nb); 163 err = task_handoff_register(&task_free_nb);
@@ -179,6 +183,7 @@ out2:
179 task_handoff_unregister(&task_free_nb); 183 task_handoff_unregister(&task_free_nb);
180out1: 184out1:
181 end_sync(); 185 end_sync();
186 free_cpumask_var(marked_cpus);
182 goto out; 187 goto out;
183} 188}
184 189
@@ -190,6 +195,7 @@ void sync_stop(void)
190 profile_event_unregister(PROFILE_TASK_EXIT, &task_exit_nb); 195 profile_event_unregister(PROFILE_TASK_EXIT, &task_exit_nb);
191 task_handoff_unregister(&task_free_nb); 196 task_handoff_unregister(&task_free_nb);
192 end_sync(); 197 end_sync();
198 free_cpumask_var(marked_cpus);
193} 199}
194 200
195 201
@@ -565,20 +571,6 @@ void sync_buffer(int cpu)
565 mutex_unlock(&buffer_mutex); 571 mutex_unlock(&buffer_mutex);
566} 572}
567 573
568int __init buffer_sync_init(void)
569{
570 if (!alloc_cpumask_var(&marked_cpus, GFP_KERNEL))
571 return -ENOMEM;
572
573 cpumask_clear(marked_cpus);
574 return 0;
575}
576
577void buffer_sync_cleanup(void)
578{
579 free_cpumask_var(marked_cpus);
580}
581
582/* The function can be used to add a buffer worth of data directly to 574/* The function can be used to add a buffer worth of data directly to
583 * the kernel buffer. The buffer is assumed to be a circular buffer. 575 * the kernel buffer. The buffer is assumed to be a circular buffer.
584 * Take the entries from index start and end at index end, wrapping 576 * Take the entries from index start and end at index end, wrapping
diff --git a/drivers/oprofile/buffer_sync.h b/drivers/oprofile/buffer_sync.h
index 0ebf5db62679..3110732c1835 100644
--- a/drivers/oprofile/buffer_sync.h
+++ b/drivers/oprofile/buffer_sync.h
@@ -19,8 +19,4 @@ void sync_stop(void);
19/* sync the given CPU's buffer */ 19/* sync the given CPU's buffer */
20void sync_buffer(int cpu); 20void sync_buffer(int cpu);
21 21
22/* initialize/destroy the buffer system. */
23int buffer_sync_init(void);
24void buffer_sync_cleanup(void);
25
26#endif /* OPROFILE_BUFFER_SYNC_H */ 22#endif /* OPROFILE_BUFFER_SYNC_H */
diff --git a/drivers/oprofile/oprof.c b/drivers/oprofile/oprof.c
index ced39f602292..3cffce90f82a 100644
--- a/drivers/oprofile/oprof.c
+++ b/drivers/oprofile/oprof.c
@@ -183,10 +183,6 @@ static int __init oprofile_init(void)
183{ 183{
184 int err; 184 int err;
185 185
186 err = buffer_sync_init();
187 if (err)
188 return err;
189
190 err = oprofile_arch_init(&oprofile_ops); 186 err = oprofile_arch_init(&oprofile_ops);
191 187
192 if (err < 0 || timer) { 188 if (err < 0 || timer) {
@@ -195,10 +191,8 @@ static int __init oprofile_init(void)
195 } 191 }
196 192
197 err = oprofilefs_register(); 193 err = oprofilefs_register();
198 if (err) { 194 if (err)
199 oprofile_arch_exit(); 195 oprofile_arch_exit();
200 buffer_sync_cleanup();
201 }
202 196
203 return err; 197 return err;
204} 198}
@@ -208,7 +202,6 @@ static void __exit oprofile_exit(void)
208{ 202{
209 oprofilefs_unregister(); 203 oprofilefs_unregister();
210 oprofile_arch_exit(); 204 oprofile_arch_exit();
211 buffer_sync_cleanup();
212} 205}
213 206
214 207
diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c
index 267de88551c9..16240390bcde 100644
--- a/drivers/pci/pci-driver.c
+++ b/drivers/pci/pci-driver.c
@@ -212,10 +212,9 @@ static int pci_call_probe(struct pci_driver *drv, struct pci_dev *dev,
212 node = dev_to_node(&dev->dev); 212 node = dev_to_node(&dev->dev);
213 if (node >= 0) { 213 if (node >= 0) {
214 int cpu; 214 int cpu;
215 node_to_cpumask_ptr(nodecpumask, node);
216 215
217 get_online_cpus(); 216 get_online_cpus();
218 cpu = cpumask_any_and(nodecpumask, cpu_online_mask); 217 cpu = cpumask_any_and(cpumask_of_node(node), cpu_online_mask);
219 if (cpu < nr_cpu_ids) 218 if (cpu < nr_cpu_ids)
220 error = work_on_cpu(cpu, local_pci_probe, &ddi); 219 error = work_on_cpu(cpu, local_pci_probe, &ddi);
221 else 220 else
diff --git a/drivers/xen/cpu_hotplug.c b/drivers/xen/cpu_hotplug.c
index 974f56d1ebe1..5f54c01c1568 100644
--- a/drivers/xen/cpu_hotplug.c
+++ b/drivers/xen/cpu_hotplug.c
@@ -10,7 +10,7 @@ static void enable_hotplug_cpu(int cpu)
10 if (!cpu_present(cpu)) 10 if (!cpu_present(cpu))
11 arch_register_cpu(cpu); 11 arch_register_cpu(cpu);
12 12
13 cpu_set(cpu, cpu_present_map); 13 set_cpu_present(cpu, true);
14} 14}
15 15
16static void disable_hotplug_cpu(int cpu) 16static void disable_hotplug_cpu(int cpu)
@@ -18,7 +18,7 @@ static void disable_hotplug_cpu(int cpu)
18 if (cpu_present(cpu)) 18 if (cpu_present(cpu))
19 arch_unregister_cpu(cpu); 19 arch_unregister_cpu(cpu);
20 20
21 cpu_clear(cpu, cpu_present_map); 21 set_cpu_present(cpu, false);
22} 22}
23 23
24static void vcpu_hotplug(unsigned int cpu) 24static void vcpu_hotplug(unsigned int cpu)