* Re: [PATCH] KVM: use modern cpumask primitives, no cpumask_t on stack [not found] <20081208160945.7535A25006E@cleopatra.tlv.redhat.com> @ 2008-12-11 16:51 ` Hollis Blanchard 2008-12-15 8:34 ` Rusty Russell 0 siblings, 1 reply; 7+ messages in thread From: Hollis Blanchard @ 2008-12-11 16:51 UTC (permalink / raw) To: Avi Kivity; +Cc: kvm-devel, Rusty Russell On Mon, 2008-12-08 at 16:09 +0000, Avi Kivity wrote: > diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c > index ba4275d..2d6ca79 100644 > --- a/virt/kvm/kvm_main.c > +++ b/virt/kvm/kvm_main.c > @@ -568,14 +570,17 @@ static bool make_all_cpus_request(struct kvm *kvm, unsigned int req) > if (test_and_set_bit(req, &vcpu->requests)) > continue; > cpu = vcpu->cpu; > - if (cpu != -1 && cpu != me) > - cpu_set(cpu, cpus); > - } > - if (!cpus_empty(cpus)) { > - smp_call_function_mask(cpus, ack_flush, NULL, 1); > - called = true; > + if (cpus != NULL && cpu != -1 && cpu != me) > + cpumask_set_cpu(cpu, cpus); > } > + if (unlikely(cpus == NULL)) > + smp_call_function_many(cpu_online_mask, ack_flush, NULL, 1); > + else if (!cpumask_empty(cpus)) > + smp_call_function_many(cpus, ack_flush, NULL, 1); > + else > + called = false; > put_cpu(); > + free_cpumask_var(cpus); > return called; > } This patch breaks uniprocessor builds, because smp_call_function_many() is only defined for CONFIG_SMP. Avi, I think you should be able to build a PowerPC KVM kernel at this point? That would have caught this error. Rusty, could you ack the following: cpumask: define smp_call_function_many() for non-SMP builds Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com> diff --git a/include/linux/smp.h b/include/linux/smp.h --- a/include/linux/smp.h +++ b/include/linux/smp.h @@ -67,13 +67,6 @@ int smp_call_function(void(*func)(void * /* Deprecated: use smp_call_function_many() which uses a cpumask ptr. */ int smp_call_function_mask(cpumask_t mask, void(*func)(void *info), void *info, int wait); - -static inline void smp_call_function_many(const struct cpumask *mask, - void (*func)(void *info), void *info, - int wait) -{ - smp_call_function_mask(*mask, func, info, wait); -} int smp_call_function_single(int cpuid, void (*func) (void *info), void *info, int wait); @@ -151,6 +144,13 @@ static inline void init_call_single_data } #endif /* !SMP */ +static inline void smp_call_function_many(const struct cpumask *mask, + void (*func)(void *info), void *info, + int wait) +{ + smp_call_function_mask(*mask, func, info, wait); +} + /* * smp_processor_id(): get the current CPU ID. * -- Hollis Blanchard IBM Linux Technology Center ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] KVM: use modern cpumask primitives, no cpumask_t on stack 2008-12-11 16:51 ` [PATCH] KVM: use modern cpumask primitives, no cpumask_t on stack Hollis Blanchard @ 2008-12-15 8:34 ` Rusty Russell 2008-12-18 22:10 ` [PATCH] Define smp_call_function_many for UP Rusty Russell 0 siblings, 1 reply; 7+ messages in thread From: Rusty Russell @ 2008-12-15 8:34 UTC (permalink / raw) To: Hollis Blanchard Cc: Avi Kivity, kvm-devel, Rusty Russell, Linus Torvalds, linux-kernel On Friday 12 December 2008 03:21:24 Hollis Blanchard wrote: > This patch breaks uniprocessor builds, because smp_call_function_many() > is only defined for CONFIG_SMP. Good catch. I missed it because it's fixed as a side-effect of a later patch in my series (before I convert users). Linus, can you please apply this fix? Thanks, Rusty. Subject: Define smp_call_function_many for UP Otherwise those using it in transition patches (eg. kvm) can't compile with CONFIG_SMP=n: arch/x86/kvm/../../../virt/kvm/kvm_main.c: In function 'make_all_cpus_request': arch/x86/kvm/../../../virt/kvm/kvm_main.c:380: error: implicit declaration of function 'smp_call_function_many' Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> diff --git a/include/linux/smp.h b/include/linux/smp.h --- a/include/linux/smp.h +++ b/include/linux/smp.h @@ -146,6 +147,8 @@ static inline void smp_send_reschedule(i }) #define smp_call_function_mask(mask, func, info, wait) \ (up_smp_call_function(func, info)) +#define smp_call_function_many(mask, func, info, wait) \ + (up_smp_call_function(func, info)) static inline void init_call_single_data(void) { } ^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH] Define smp_call_function_many for UP 2008-12-15 8:34 ` Rusty Russell @ 2008-12-18 22:10 ` Rusty Russell 2008-12-18 22:16 ` Linus Torvalds 0 siblings, 1 reply; 7+ messages in thread From: Rusty Russell @ 2008-12-18 22:10 UTC (permalink / raw) To: Linus Torvalds; +Cc: Hollis Blanchard, Avi Kivity, kvm-devel, linux-kernel Linus, please apply. Otherwise those using it in transition patches (eg. kvm) can't compile with CONFIG_SMP=n: arch/x86/kvm/../../../virt/kvm/kvm_main.c: In function 'make_all_cpus_request': arch/x86/kvm/../../../virt/kvm/kvm_main.c:380: error: implicit declaration of function 'smp_call_function_many' Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> --- include/linux/smp.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/linux/smp.h b/include/linux/smp.h --- a/include/linux/smp.h +++ b/include/linux/smp.h @@ -146,6 +147,8 @@ static inline void smp_send_reschedule(i }) #define smp_call_function_mask(mask, func, info, wait) \ (up_smp_call_function(func, info)) +#define smp_call_function_many(mask, func, info, wait) \ + (up_smp_call_function(func, info)) static inline void init_call_single_data(void) { } ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Define smp_call_function_many for UP 2008-12-18 22:10 ` [PATCH] Define smp_call_function_many for UP Rusty Russell @ 2008-12-18 22:16 ` Linus Torvalds 2008-12-19 5:43 ` Rusty Russell 0 siblings, 1 reply; 7+ messages in thread From: Linus Torvalds @ 2008-12-18 22:16 UTC (permalink / raw) To: Rusty Russell; +Cc: Hollis Blanchard, Avi Kivity, kvm-devel, linux-kernel On Fri, 19 Dec 2008, Rusty Russell wrote: > > Linus, please apply. Otherwise those using it in transition patches (eg. kvm) > can't compile with CONFIG_SMP=n: Umm. I already applied this a long time ago. It's commit d2ff911882b6bc693d86ca9566daac70aacbb2b3 Linus ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Define smp_call_function_many for UP 2008-12-18 22:16 ` Linus Torvalds @ 2008-12-19 5:43 ` Rusty Russell 2008-12-19 17:03 ` Linus Torvalds 0 siblings, 1 reply; 7+ messages in thread From: Rusty Russell @ 2008-12-19 5:43 UTC (permalink / raw) To: Linus Torvalds; +Cc: Hollis Blanchard, Avi Kivity, kvm-devel, linux-kernel On Friday 19 December 2008 08:46:37 Linus Torvalds wrote: > > On Fri, 19 Dec 2008, Rusty Russell wrote: > > > > Linus, please apply. Otherwise those using it in transition patches (eg. kvm) > > can't compile with CONFIG_SMP=n: > > Umm. I already applied this a long time ago. It's commit > d2ff911882b6bc693d86ca9566daac70aacbb2b3 Wow, it's like Santa came early! Thanks, Rusty. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Define smp_call_function_many for UP 2008-12-19 5:43 ` Rusty Russell @ 2008-12-19 17:03 ` Linus Torvalds 2008-12-21 8:11 ` Rusty Russell 0 siblings, 1 reply; 7+ messages in thread From: Linus Torvalds @ 2008-12-19 17:03 UTC (permalink / raw) To: Rusty Russell; +Cc: Hollis Blanchard, Avi Kivity, kvm-devel, linux-kernel On Fri, 19 Dec 2008, Rusty Russell wrote: > > On Friday 19 December 2008 08:46:37 Linus Torvalds wrote: > > > > Umm. I already applied this a long time ago. It's commit > > d2ff911882b6bc693d86ca9566daac70aacbb2b3 > > Wow, it's like Santa came early! Christmas at Rusty's house: Dreary. Linus ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Define smp_call_function_many for UP 2008-12-19 17:03 ` Linus Torvalds @ 2008-12-21 8:11 ` Rusty Russell 0 siblings, 0 replies; 7+ messages in thread From: Rusty Russell @ 2008-12-21 8:11 UTC (permalink / raw) To: Linus Torvalds; +Cc: Hollis Blanchard, Avi Kivity, kvm-devel, linux-kernel On Saturday 20 December 2008 03:33:26 Linus Torvalds wrote: > Christmas at Rusty's house: > > Dreary. Far from! Sure, it's Arabella's first Xmas, but a Very Kernel Christmas can be lots of fun. Why just this morning, we did this together! See if you can tell which bits are hers... Subject: Decorate lib/rbtree.c From: Rusty and Arabella Russell <rustabella@rustcorp.com.au> A slight enhancement to the comments in lib/rbtree.c. Signed-off-by: Rusty and Arabella Russell <rustabella@rustcorp.com.au> --- lib/rbtree.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/lib/rbtree.c b/lib/rbtree.c index 48499c2..7848186 100644 --- a/lib/rbtree.c +++ b/lib/rbtree.c @@ -17,7 +17,8 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - linux/lib/rbtree.c + An excellent description of this algorithm can be found at: + http://en.wikipedia.org/wiki/Red-black_tree */ #include <linux/rbtree.h> @@ -291,6 +292,7 @@ EXPORT_SYMBOL(rb_erase); /* * This function returns the first node (in sort order) of the tree. + * ssdddsddddddddddddd */ struct rb_node *rb_first(struct rb_root *root) { ^ permalink raw reply related [flat|nested] 7+ messages in thread
end of thread, other threads:[~2008-12-21 8:11 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20081208160945.7535A25006E@cleopatra.tlv.redhat.com>
2008-12-11 16:51 ` [PATCH] KVM: use modern cpumask primitives, no cpumask_t on stack Hollis Blanchard
2008-12-15 8:34 ` Rusty Russell
2008-12-18 22:10 ` [PATCH] Define smp_call_function_many for UP Rusty Russell
2008-12-18 22:16 ` Linus Torvalds
2008-12-19 5:43 ` Rusty Russell
2008-12-19 17:03 ` Linus Torvalds
2008-12-21 8:11 ` Rusty Russell
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox