An embedded and charset-unspecified text was scrubbed... Name: cpumask:convert-drivers.patch Url: http://lists.linux-foundation.org/pipermail/virtualization/attachments/20090107/f459eb35/attachment.txt
On Thursday 08 January 2009 06:28:35 Mike Travis wrote:> From: Rusty Russell <rusty at rustcorp.com.au> > > Impact: use new cpumask API. > > Convert misc driver functions to use struct cpumask....> @@ -593,15 +592,20 @@ static int __cpuinit iucv_cpu_notify(str > break; > case CPU_DOWN_PREPARE: > case CPU_DOWN_PREPARE_FROZEN: > - cpumask = iucv_buffer_cpumask; > - cpu_clear(cpu, cpumask); > - if (cpus_empty(cpumask)) > + if (!alloc_cpumask_var(&cpumask, GFP_KERNEL)) > + return NOTIFY_BAD; > + cpumask_copy(cpumask, &iucv_buffer_cpumask); > + cpumask_clear_cpu(cpu, cpumask); > + if (cpumask_empty(cpumask)) { > /* Can't offline last IUCV enabled cpu. */ > + free_cpumask_var(cpumask); > return NOTIFY_BAD; > + } > smp_call_function_single(cpu, iucv_retrieve_cpu, NULL, 1); > if (cpus_empty(iucv_irq_cpumask)) > smp_call_function_single(first_cpu(iucv_buffer_cpumask), > iucv_allow_cpu, NULL, 1); > + free_cpumask_var(cpumask); > break;Minor nit: this can be done better, actually: @@ -596,9 +594,7 @@ static int __cpuinit iucv_cpu_notify(str case CPU_DOWN_PREPARE_FROZEN: if (!iucv_path_table) break; - cpumask = iucv_buffer_cpumask; - cpu_clear(cpu, cpumask); - if (cpus_empty(cpumask)) + if (cpumask_any_but(&iucv_buffer_cpumask, cpu) >= nr_cpu_ids) /* Can't offline last IUCV enabled cpu. */ return NOTIFY_BAD; smp_call_function_single(cpu, iucv_retrieve_cpu, NULL, 1); Cheers, Rusty.
+void __exit buffer_sync_cleanup(void) +{ + free_cpumask_var(marked_cpus); +} This breaks ia64 with CONFIG_OPROFILE=y `buffer_sync_cleanup' referenced in section `.init.text' of arch/ia64/oprofile/built-in.o: defined in discarded section `.exit.text' of arch/ia64/oprofile/built-in.o make: *** [.tmp_vmlinux1] Error 1 -Tony
Tony Luck wrote:> +void __exit buffer_sync_cleanup(void) > +{ > + free_cpumask_var(marked_cpus); > +} > > This breaks ia64 with CONFIG_OPROFILE=y > > `buffer_sync_cleanup' referenced in section `.init.text' of > arch/ia64/oprofile/built-in.o: defined in discarded section > `.exit.text' of arch/ia64/oprofile/built-in.o > make: *** [.tmp_vmlinux1] Error 1 > > -TonyHi Tony, Hmm, that is a tricky error. I'll see what can be done to eliminate it. Thanks! Mike
On 07.01.09 11:58:35, Mike Travis wrote:> From: Rusty Russell <rusty at rustcorp.com.au> > > Impact: use new cpumask API. > > Convert misc driver functions to use struct cpumask. > > To Do: > - Convert iucv_buffer_cpumask to cpumask_var_t. > > Signed-off-by: Rusty Russell <rusty at rustcorp.com.au> > Signed-off-by: Mike Travis <travis at sgi.com> > Acked-by: Dean Nelson <dcn at sgi.com> > Cc: Robert Richter <robert.richter at amd.com> > Cc: oprofile-list at lists.sf.net > Cc: Jeremy Fitzhardinge <jeremy at xensource.com> > Cc: Chris Wright <chrisw at sous-sol.org> > Cc: virtualization at lists.osdl.org > Cc: xen-devel at lists.xensource.com > Cc: Ursula Braun <ursula.braun at de.ibm.com> > Cc: linux390 at de.ibm.com > Cc: linux-s390 at vger.kernel.org > --- > drivers/base/cpu.c | 2 +- > drivers/misc/sgi-xp/xpc_main.c | 2 +- > drivers/oprofile/buffer_sync.c | 22 ++++++++++++++++++---- > drivers/oprofile/buffer_sync.h | 4 ++++ > drivers/oprofile/oprof.c | 9 ++++++++-Acked-by: Robert Richter <robert.richter at amd.com> I will send out a delta patch that changes the initialization. -Robert> drivers/xen/manage.c | 2 +- > net/iucv/iucv.c | 28 ++++++++++++++++++---------- > 7 files changed, 51 insertions(+), 18 deletions(-)-- Advanced Micro Devices, Inc. Operating System Research Center email: robert.richter at amd.com
Seemingly Similar Threads
- [PATCH 3/5] cpumask: convert misc driver functions
- [PATCH 0/6] Clean up virtio device object handling [was Re: [PATCH] virtio: make PCI devices take a virtio_pci module ref]
- [PATCH 0/6] Clean up virtio device object handling [was Re: [PATCH] virtio: make PCI devices take a virtio_pci module ref]
- [PULL]: tip/cpus4096 updates
- [PULL]: tip/cpus4096 updates