From: Suzuki K Poulose <Suzuki.Poulose@arm.com>
To: James Morse <james.morse@arm.com>
Cc: linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, marc.zyngier@arm.com,
will.deacon@arm.com, catalin.marinas@arm.com,
mark.rutland@arm.com, Vadim.Lomovtsev@caviumnetworks.com
Subject: Re: [PATCH 5/5] arm64: Fix behavior of maxcpus=N
Date: Thu, 7 Apr 2016 10:26:49 +0100 [thread overview]
Message-ID: <570627D9.6080805@arm.com> (raw)
In-Reply-To: <570625FE.4040001@arm.com>
On 07/04/16 10:18, James Morse wrote:
> Hi Suzuki,
>
> On 06/04/16 12:24, Suzuki K Poulose wrote:
>> maxcpu=n sets the number of CPUs activated at boot time to a max of n,
>> but allowing the remaining CPUs to be brought up later if the user
>> decides to do so. However, on arm64 due to various reasons, we disallowed
>> hotplugging CPUs beyond n, by marking them not present. Now that
>> we have checks in place to make sure the hotplugged CPUs have compatible
>> features with system and requires no new errata, relax the restriction.
>
>> diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c
>> index b2d5f4e..0988ccc 100644
>> --- a/arch/arm64/kernel/smp.c
>> +++ b/arch/arm64/kernel/smp.c
>> @@ -659,21 +659,12 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
>> if (max_cpus > ncores)
>> max_cpus = ncores;
>
> This "if (max_cpus > ncores)" is the only user of max_cpus left in this
> function, and 'ncores' isn't used for anything else. Dead code?
Yes, it is. We already do for_each_possible_cpu() and ncores was set to num_possible_cpus().
So, the ncores was kind of superfluous to begin with. Thanks for pointing it
out, I will remove it.
Cheers
Suzuki
next prev parent reply other threads:[~2016-04-07 9:26 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-06 11:24 [PATCH 0/5] arm64: Fix behavior of maxcpus=n Suzuki K Poulose
2016-04-06 11:24 ` [PATCH 1/5] arm64: cpufeature: Add scope for capability check Suzuki K Poulose
2016-04-14 17:38 ` Will Deacon
2016-04-14 17:47 ` Suzuki K Poulose
2016-04-15 12:55 ` Will Deacon
2016-04-15 13:26 ` Suzuki K Poulose
2016-04-06 11:24 ` [PATCH 2/5] arm64: Allow a capability to be checked on a single CPU Suzuki K Poulose
2016-04-06 11:24 ` [PATCH 3/5] irqchip/gic: Restore CPU interface checking Suzuki K Poulose
2016-04-06 11:24 ` [PATCH 4/5] arm64: Verify CPU errata work arounds on hotplugged CPU Suzuki K Poulose
2016-04-14 17:39 ` Will Deacon
2016-04-14 17:49 ` Suzuki K Poulose
2016-04-15 14:10 ` Suzuki K Poulose
2016-04-15 14:12 ` Will Deacon
2016-04-18 13:41 ` Suzuki K Poulose
2016-04-06 11:24 ` [PATCH 5/5] arm64: Fix behavior of maxcpus=N Suzuki K Poulose
2016-04-07 9:18 ` James Morse
2016-04-07 9:26 ` Suzuki K Poulose [this message]
2016-04-07 10:07 ` [UPDATED] " Suzuki K Poulose
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=570627D9.6080805@arm.com \
--to=suzuki.poulose@arm.com \
--cc=Vadim.Lomovtsev@caviumnetworks.com \
--cc=catalin.marinas@arm.com \
--cc=james.morse@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marc.zyngier@arm.com \
--cc=mark.rutland@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;
as well as URLs for NNTP newsgroup(s).