Re: [git pull] scheduler/misc fixes
From: Peter Zijlstra
Date: Fri Apr 25 2008 - 04:24:59 EST
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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/