From: Borislav Petkov <bp@alien8.de>
To: Yinghai Lu <yinghai@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
Suresh Siddha <suresh.b.siddha@intel.com>,
Tejun Heo <tj@kernel.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] x86: Don't copy per_cpu cpuinfo for BSP two times
Date: Sat, 22 Jan 2011 12:13:07 +0100 [thread overview]
Message-ID: <20110122111307.GA11256@liondog.tnic> (raw)
In-Reply-To: <4D3A16F2.5090902@kernel.org>
On Fri, Jan 21, 2011 at 03:29:54PM -0800, Yinghai Lu wrote:
>
> smp_store_cpu_info(0) will do that.
>
> Signed-off-by: Yinghai Lu <yinghai@kernel.org>
>
> ---
> arch/x86/kernel/smpboot.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> Index: linux-2.6/arch/x86/kernel/smpboot.c
> ===================================================================
> --- linux-2.6.orig/arch/x86/kernel/smpboot.c
> +++ linux-2.6/arch/x86/kernel/smpboot.c
> @@ -1071,13 +1071,13 @@ void __init native_smp_prepare_cpus(unsi
>
> preempt_disable();
> smp_cpu_index_default();
> - memcpy(__this_cpu_ptr(&cpu_info), &boot_cpu_data, sizeof(cpu_info));
> - cpumask_copy(cpu_callin_mask, cpumask_of(0));
> - mb();
> +
> /*
> * Setup boot CPU information
> */
> smp_store_cpu_info(0); /* Final full version of the data */
> + cpumask_copy(cpu_callin_mask, cpumask_of(0));
> + mb();
Question: why do we need the memory barrier there? We're running on the
BSP and long before smp_init() to be all careful about the callin_mask.
It could be there as a left over from the 32 and 64-bit merge, AFAICT
from git history...
Thanks.
--
Regards/Gruss,
Boris.
next prev parent reply other threads:[~2011-01-22 11:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-21 23:29 Yinghai Lu
2011-01-22 11:13 ` Borislav Petkov [this message]
2011-01-26 10:59 ` [tip:x86/cpu] " tip-bot for Yinghai Lu
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=20110122111307.GA11256@liondog.tnic \
--to=bp@alien8.de \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=suresh.b.siddha@intel.com \
--cc=tglx@linutronix.de \
--cc=tj@kernel.org \
--cc=yinghai@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®