From: Yisheng Xie <xieyisheng1@huawei.com>
To: David Daney <ddaney.cavm@gmail.com>,
<linux-kernel@vger.kernel.org>,
"Marc Zyngier" <marc.zyngier@arm.com>,
Hanjun Guo <hanjun.guo@linaro.org>,
"Will Deacon" <will.deacon@arm.com>,
Ganapatrao Kulkarni <gkulkarni@caviumnetworks.com>,
Catalin Marinas <catalin.marinas@arm.com>,
Mark Rutland <mark.rutland@arm.com>,
Suzuki K Poulose <suzuki.poulose@arm.com>
Cc: Robert Richter <rric@kernel.org>,
<linux-arm-kernel@lists.infradead.org>,
David Daney <david.daney@cavium.com>
Subject: Re: [PATCH] arm64: Call numa_store_cpu_info() earlier.
Date: Thu, 22 Sep 2016 11:04:04 +0800 [thread overview]
Message-ID: <20bc1c5f-7e8f-a18c-0061-24d97b3a62fe@huawei.com> (raw)
In-Reply-To: <1474397195-16520-1-git-send-email-ddaney.cavm@gmail.com>
On 2016/9/21 2:46, David Daney wrote:
> From: David Daney <david.daney@cavium.com>
>
> Fix by moving call to numa_store_cpu_info() for all CPUs into
> smp_prepare_cpus(), which happens before wq_numa_init(). Since
> smp_store_cpu_info() now contains only a single function call,
> simplify by removing the function and out-lining its contents.
>
> Suggested-by: Robert Richter <rric@kernel.org>
> fixes: 1a2db300348b ("arm64, numa: Add NUMA support for arm64 platforms.")
> Cc: <stable@vger.kernel.org> # 4.7.x-
> Signed-off-by: David Daney <david.daney@cavium.com>
> ---
Tested-by: Yisheng Xie <xieyisheng1@huawei.com>
Thanks.
> arch/arm64/kernel/smp.c | 14 ++++++--------
> 1 file changed, 6 insertions(+), 8 deletions(-)
>
> diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c
> index d93d433..3ff173e 100644
> --- a/arch/arm64/kernel/smp.c
> +++ b/arch/arm64/kernel/smp.c
> @@ -201,12 +201,6 @@ int __cpu_up(unsigned int cpu, struct task_struct *idle)
> return ret;
> }
>
> -static void smp_store_cpu_info(unsigned int cpuid)
> -{
> - store_cpu_topology(cpuid);
> - numa_store_cpu_info(cpuid);
> -}
> -
> /*
> * This is the secondary CPU boot entry. We're using this CPUs
> * idle thread stack, but a set of temporary page tables.
> @@ -254,7 +248,7 @@ asmlinkage void secondary_start_kernel(void)
> */
> notify_cpu_starting(cpu);
>
> - smp_store_cpu_info(cpu);
> + store_cpu_topology(cpu);
>
> /*
> * OK, now it's safe to let the boot CPU continue. Wait for
> @@ -689,10 +683,13 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
> {
> int err;
> unsigned int cpu;
> + unsigned int this_cpu;
>
> init_cpu_topology();
>
> - smp_store_cpu_info(smp_processor_id());
> + this_cpu = smp_processor_id();
> + store_cpu_topology(this_cpu);
> + numa_store_cpu_info(this_cpu);
>
> /*
> * If UP is mandated by "nosmp" (which implies "maxcpus=0"), don't set
> @@ -719,6 +716,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
> continue;
>
> set_cpu_present(cpu, true);
> + numa_store_cpu_info(cpu);
> }
> }
>
>
next prev parent reply other threads:[~2016-09-22 3:04 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-20 18:46 David Daney
2016-09-21 6:55 ` Robert Richter
2016-09-22 3:04 ` Yisheng Xie [this message]
2016-09-22 17:06 ` Catalin Marinas
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=20bc1c5f-7e8f-a18c-0061-24d97b3a62fe@huawei.com \
--to=xieyisheng1@huawei.com \
--cc=catalin.marinas@arm.com \
--cc=david.daney@cavium.com \
--cc=ddaney.cavm@gmail.com \
--cc=gkulkarni@caviumnetworks.com \
--cc=hanjun.guo@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marc.zyngier@arm.com \
--cc=mark.rutland@arm.com \
--cc=rric@kernel.org \
--cc=suzuki.poulose@arm.com \
--cc=will.deacon@arm.com \
/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®