From: Christoph Lameter <cl@linux.com>
Subject: [PATCH] ARM64: Introduce CONFIG_MAXSMP

Ampere Computing develops high end ARM processor that support an ever
increasing number of processors. The default 256 processors are
not enough for our newer products. The default is used by
distros and therefore our customers cannot use distro kernels because
the number of processors is not supported.

The x86 arch has support for a "CONFIG_MAXSMP" configuration option that
enables support for the largest known configurations. This usually means
hundreds or thousands of processors. For those sizes it is no longer
practical to allocate bitmaps of cpus on the kernel stack. There is
a kernel option CONFIG_CPUMASK_OFFSTACK that makes the kernel allocate
and free bitmaps for cpu masks from slab memory instead of keeping it
on the stack etc.

With that is becomes possible to dynamically size the allocation of
the bitmap depending on the quantity of processors detected on
bootup.

This patch enables that logic if CONFIG_MAXSMP is enabled.

If CONFIG_MAXSMP is disabled then a default of 64 processors
is supported. A bitmap for 64 processors fits into one word and
therefore can be efficiently handled on the stack. Using a pointer
to a bitmap would be overkill.

The number of processors can be manually configured if
CONFIG_MAXSMP is not set.

Currently the default for CONFIG_MAXSMP is 512 processors.
This will have to be increased if ARM processor vendors start
supporting more processors.

Signed-off-by: Christoph Lameter (Ampere) <cl@linux.com>
2 files changed