linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: james.morse@arm.com (James Morse)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 5/5] arm64: Fix behavior of maxcpus=N
Date: Thu, 07 Apr 2016 10:18:54 +0100	[thread overview]
Message-ID: <570625FE.4040001@arm.com> (raw)
In-Reply-To: <1459941854-5190-6-git-send-email-suzuki.poulose@arm.com>

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?


> -	/* Don't bother if we're effectively UP */
> -	if (max_cpus <= 1)
> -		return;
> -
>  	/*
>  	 * Initialise the present map (which describes the set of CPUs
>  	 * actually populated at the present time) and release the
>  	 * secondaries from the bootloader.
> -	 *
> -	 * Make sure we online at most (max_cpus - 1) additional CPUs.
>  	 */
> -	max_cpus--;
>  	for_each_possible_cpu(cpu) {
> -		if (max_cpus == 0)
> -			break;
>  
>  		if (cpu == smp_processor_id())
>  			continue;
> @@ -686,7 +677,6 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
>  			continue;
>  
>  		set_cpu_present(cpu, true);
> -		max_cpus--;
>  	}
>  }
>  
> 


Thanks,

James

  reply	other threads:[~2016-04-07  9:18 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 [this message]
2016-04-07  9:26     ` Suzuki K Poulose
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=570625FE.4040001@arm.com \
    --to=james.morse@arm.com \
    --cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).