]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
UBUNTU: SAUCE: (noup) ppc64 boot: Wait for boot cpu to show up if nr_cpus limit is...
authorMahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
Tue, 2 Feb 2016 13:58:17 +0000 (19:28 +0530)
committerSeth Forshee <seth.forshee@canonical.com>
Tue, 5 Sep 2017 12:33:00 +0000 (07:33 -0500)
commitc0766c3f2d20f2b416c39d70ddedbaf09e8ba23c
tree39e0807b76e02e0db34f064dcc128f4931d0e69e
parente8c9456cf26c72f26f19eb0d9df1b317a6c8260a
UBUNTU: SAUCE: (noup) ppc64 boot: Wait for boot cpu to show up if nr_cpus limit is about to hit.

BugLink: http://bugs.launchpad.net/bugs/1560552
http://patchwork.ozlabs.org/patch/577193/

The kernel boot parameter 'nr_cpus=' allows one to specify number of
possible cpus in the system. In the normal scenario the first cpu (cpu0)
that shows up is the boot cpu and hence it gets covered under nr_cpus
limit.

But this assumption will be broken in kdump scenario where kdump kenrel
after a crash can boot up on an non-zero boot cpu. The paca structure
allocation depends on value of nr_cpus and is indexed using logical cpu
ids. This definetly will be an issue if boot cpu id > nr_cpus

This patch modifies allocate_pacas() and smp_setup_cpu_maps() to
accommodate boot cpu for the case where boot_cpuid > nr_cpu_ids.

This change would help to reduce the memory reservation requirement for
kdump on ppc64.

Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
arch/powerpc/include/asm/paca.h
arch/powerpc/include/asm/smp.h
arch/powerpc/kernel/paca.c
arch/powerpc/kernel/prom.c
arch/powerpc/kernel/setup-common.c