lkml.org 
[lkml]   [2008]   [Apr]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [git pull] scheduler/misc fixes
From
Date
On Fri, 2008-04-25 at 00:57 -0700, David Miller wrote:

> diff --git a/arch/sparc64/kernel/smp.c b/arch/sparc64/kernel/smp.c
> index 524b889..bf4ef84 100644
> --- a/arch/sparc64/kernel/smp.c
> +++ b/arch/sparc64/kernel/smp.c
> @@ -866,14 +866,21 @@ void smp_call_function_client(int irq, struct pt_regs *regs)
> void *info = call_data->info;
>
> clear_softint(1 << irq);
> +
> + irq_enter();
> +
> + if (!call_data->wait) {
> + /* let initiator proceed after getting data */
> + atomic_inc(&call_data->finished);
> + }
> +
> + func(info);
> +
> + irq_exit();
> +
> if (call_data->wait) {
> /* let initiator proceed only after completion */
> - func(info);
> - atomic_inc(&call_data->finished);
> - } else {
> - /* let initiator proceed after getting data */
> atomic_inc(&call_data->finished);
> - func(info);
> }
> }


FWIW I do think this is a valid 'bug' fix in that the called user func()
can now see its from interrupt context. in_interrupt() would have
reported false due to the missing irq_enter()/irq_exit() - not sure if
any smp_call_function() relies on it though.





\
 
 \ /
  Last update: 2008-04-25 10:27    [W:0.051 / U:0.408 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site