From: Peter Zijlstra <a.p.zijlstra@chello.nl>
To: David Miller <davem@davemloft.net>
Cc: mingo@elte.hu, torvalds@linux-foundation.org,
linux-kernel@vger.kernel.org, akpm@linux-foundation.org,
viro@zeniv.linux.org.uk, alan@lxorguk.ukuu.org.uk,
tglx@linutronix.de
Subject: Re: [git pull] scheduler/misc fixes
Date: Fri, 25 Apr 2008 10:24:18 +0200 [thread overview]
Message-ID: <1209111858.7115.405.camel@twins> (raw)
In-Reply-To: <20080425.005738.114887644.davem@davemloft.net>
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.
next prev parent reply other threads:[~2008-04-25 8:24 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-24 22:55 [git pull] scheduler/misc fixes Ingo Molnar
2008-04-25 3:46 ` David Miller
2008-04-25 7:48 ` Peter Zijlstra
2008-04-25 7:57 ` David Miller
2008-04-25 8:13 ` Peter Zijlstra
2008-04-25 8:24 ` Peter Zijlstra [this message]
2008-04-25 8:30 ` David Miller
2008-04-25 10:19 ` Peter Zijlstra
2008-04-25 10:51 ` Ingo Molnar
2008-04-25 20:07 ` David Miller
2008-04-27 18:05 ` Thomas Gleixner
2008-04-25 8:04 ` Ingo Molnar
2008-04-25 8:07 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1209111858.7115.405.camel@twins \
--to=a.p.zijlstra@chello.nl \
--cc=akpm@linux-foundation.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.