aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-04-05 13:33:07 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-04-05 13:33:07 -0400
commit90975ef71246c5c688ead04e8ff6f36dc92d28b3 (patch)
treeeda44b2efe91509719b0e62219c2efec13a9e762 /drivers
parentcab4e4c43f92582a2bfc026137b3d8a175bd0360 (diff)
parent558f6ab9106e6be701acb0257e7171df1bbccf04 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-cpumask
* git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-cpumask: (36 commits) cpumask: remove cpumask allocation from idle_balance, fix numa, cpumask: move numa_node_id default implementation to topology.h, fix cpumask: remove cpumask allocation from idle_balance x86: cpumask: x86 mmio-mod.c use cpumask_var_t for downed_cpus x86: cpumask: update 32-bit APM not to mug current->cpus_allowed x86: microcode: cleanup x86: cpumask: use work_on_cpu in arch/x86/kernel/microcode_core.c cpumask: fix CONFIG_CPUMASK_OFFSTACK=y cpu hotunplug crash numa, cpumask: move numa_node_id default implementation to topology.h cpumask: convert node_to_cpumask_map[] to cpumask_var_t cpumask: remove x86 cpumask_t uses. cpumask: use cpumask_var_t in uv_flush_tlb_others. cpumask: remove cpumask_t assignment from vector_allocation_domain() cpumask: make Xen use the new operators. cpumask: clean up summit's send_IPI functions cpumask: use new cpumask functions throughout x86 x86: unify cpu_callin_mask/cpu_callout_mask/cpu_initialized_mask/cpu_sibling_setup_mask cpumask: convert struct cpuinfo_x86's llc_shared_map to cpumask_var_t cpumask: convert node_to_cpumask_map[] to cpumask_var_t x86: unify 32 and 64-bit node_to_cpumask_map ...
Diffstat (limited to 'drivers')
-rw-r--r--drivers/base/node.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
6 files changed, 11 insertions, 31 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/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 c0cbbb5a245e..d76c4c85367e 100644
--- a/drivers/pci/pci-driver.c
+++ b/drivers/pci/pci-driver.c
@@ -277,10 +277,9 @@ static int pci_call_probe(struct pci_driver *drv, struct pci_dev *dev,
277 node = dev_to_node(&dev->dev); 277 node = dev_to_node(&dev->dev);
278 if (node >= 0) { 278 if (node >= 0) {
279 int cpu; 279 int cpu;
280 node_to_cpumask_ptr(nodecpumask, node);
281 280
282 get_online_cpus(); 281 get_online_cpus();
283 cpu = cpumask_any_and(nodecpumask, cpu_online_mask); 282 cpu = cpumask_any_and(cpumask_of_node(node), cpu_online_mask);
284 if (cpu < nr_cpu_ids) 283 if (cpu < nr_cpu_ids)
285 error = work_on_cpu(cpu, local_pci_probe, &ddi); 284 error = work_on_cpu(cpu, local_pci_probe, &ddi);
286 else 285 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)