All of lore.kernel.org
 help / color / mirror / Atom feed
* Patch "arm64: Honor nosmp kernel command line option" has been added to the 4.7-stable tree
@ 2016-08-17 12:54 gregkh
  0 siblings, 0 replies; only message in thread
From: gregkh @ 2016-08-17 12:54 UTC (permalink / raw)
  To: suzuki.poulose, catalin.marinas, gregkh, james.morse,
	mark.rutland, will.deacon
  Cc: stable, stable-commits


This is a note to let you know that I've just added the patch titled

    arm64: Honor nosmp kernel command line option

to the 4.7-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     arm64-honor-nosmp-kernel-command-line-option.patch
and it can be found in the queue-4.7 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


>From e75118a7b581b19b08282c7819c1ec6f68b91b79 Mon Sep 17 00:00:00 2001
From: Suzuki K Poulose <suzuki.poulose@arm.com>
Date: Thu, 21 Jul 2016 11:15:27 +0100
Subject: arm64: Honor nosmp kernel command line option

From: Suzuki K Poulose <suzuki.poulose@arm.com>

commit e75118a7b581b19b08282c7819c1ec6f68b91b79 upstream.

Passing "nosmp" should boot the kernel with a single processor, without
provision to enable secondary CPUs even if they are present. "nosmp" is
implemented by setting maxcpus=0. At the moment we still mark the secondary
CPUs present even with nosmp, which allows the userspace to bring them
up. This patch corrects the smp_prepare_cpus() to honor the maxcpus == 0.

Commit 44dbcc93ab67145 ("arm64: Fix behavior of maxcpus=N") fixed the
behavior for maxcpus >= 1, but broke maxcpus = 0.

Fixes: 44dbcc93ab67 ("arm64: Fix behavior of maxcpus=N")
Cc: Will Deacon <will.deacon@arm.com>
Cc: James Morse <james.morse@arm.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Acked-by: Mark Rutland <mark.rutland@arm.com>
[catalin.marinas@arm.com: updated code comment]
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 arch/arm64/kernel/smp.c |    7 +++++++
 1 file changed, 7 insertions(+)

--- a/arch/arm64/kernel/smp.c
+++ b/arch/arm64/kernel/smp.c
@@ -693,6 +693,13 @@ void __init smp_prepare_cpus(unsigned in
 	smp_store_cpu_info(smp_processor_id());
 
 	/*
+	 * If UP is mandated by "nosmp" (which implies "maxcpus=0"), don't set
+	 * secondary CPUs present.
+	 */
+	if (max_cpus == 0)
+		return;
+
+	/*
 	 * Initialise the present map (which describes the set of CPUs
 	 * actually populated at the present time) and release the
 	 * secondaries from the bootloader.


Patches currently in stable-queue which might be from suzuki.poulose@arm.com are

queue-4.7/arm64-fix-incorrect-per-cpu-usage-for-boot-cpu.patch
queue-4.7/arm64-honor-nosmp-kernel-command-line-option.patch

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-08-17 12:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-17 12:54 Patch "arm64: Honor nosmp kernel command line option" has been added to the 4.7-stable tree gregkh

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.