From: Randy Dunlap <rdunlap@xenotime.net>
To: Gilad Ben-Yossef <gilad@benyossef.com>
Cc: linux-kernel@vger.kernel.org, Jiri Kosina <trivial@kernel.org>
Subject: Re: [PATCH Resend][Trivial] Match on_each_cpu behaviour on UP to SMP
Date: Tue, 13 Sep 2011 12:02:06 -0700 [thread overview]
Message-ID: <4E6FA8AE.5010308@xenotime.net> (raw)
In-Reply-To: <1315465029-4203-1-git-send-email-gilad@benyossef.com>
On 09/07/11 23:57, Gilad Ben-Yossef wrote:
> The comment in the SMP implementation of on_each_cpu says:
> "May be used during early boot while
> early_boot_irqs_disabled is set. Use local_irq_save/restore() instead
> of local_irq_disable/enable()."
>
> but the existing UP macro version uses local_irq_disable/enable().
>
> Do the safe thing - make the UP version match the SMP one.
>
> Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
> CC: Jiri Kosina <trivial@kernel.org>
> ---
> include/linux/smp.h | 5 +++--
> 1 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/include/linux/smp.h b/include/linux/smp.h
> index 8cc38d3..7c9b9d4 100644
> --- a/include/linux/smp.h
> +++ b/include/linux/smp.h
> @@ -127,9 +127,10 @@ static inline int up_smp_call_function(smp_call_func_t func, void *info)
> (up_smp_call_function(func, info))
> #define on_each_cpu(func,info,wait) \
> ({ \
> - local_irq_disable(); \
> + unsigned long __flags; \
> + local_irq_save(__flags); \
> func(info); \
> - local_irq_enable(); \
> + local_irq_retore(__flags); \
You tested that? ^^^^^^
> 0; \
> })
> static inline void smp_send_reschedule(int cpu) { }
--
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
next prev parent reply other threads:[~2011-09-13 19:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-08 6:57 Gilad Ben-Yossef
2011-09-13 19:02 ` Randy Dunlap [this message]
2011-09-15 7:43 ` Gilad Ben-Yossef
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=4E6FA8AE.5010308@xenotime.net \
--to=rdunlap@xenotime.net \
--cc=gilad@benyossef.com \
--cc=linux-kernel@vger.kernel.org \
--cc=trivial@kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®