android_kernel_xiaomi_sm8350/init
Christoph Lameter 476f35348e Safer nr_node_ids and nr_node_ids determination and initial values
The nr_cpu_ids value is currently only calculated in smp_init.  However, it
may be needed before (SLUB needs it on kmem_cache_init!) and other kernel
components may also want to allocate dynamically sized per cpu array before
smp_init.  So move the determination of possible cpus into sched_init()
where we already loop over all possible cpus early in boot.

Also initialize both nr_node_ids and nr_cpu_ids with the highest value they
could take.  If we have accidental users before these values are determined
then the current valud of 0 may cause too small per cpu and per node arrays
to be allocated.  If it is set to the maximum possible then we only waste
some memory for early boot users.

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-07 12:12:51 -07:00
..
calibrate.c [PATCH] remove many unneeded #includes of sched.h 2007-02-14 08:09:54 -08:00
do_mounts_initrd.c
do_mounts_md.c
do_mounts_rd.c
do_mounts.c
do_mounts.h
initramfs.c [PATCH] Add retain_initrd boot option 2007-02-11 10:51:24 -08:00
Kconfig kbuild: clarify the creation of the LOCALVERSION_AUTO string. 2007-05-02 20:58:11 +02:00
main.c Safer nr_node_ids and nr_node_ids determination and initial values 2007-05-07 12:12:51 -07:00
Makefile [PATCH] disable init/initramfs.c 2007-02-11 10:51:25 -08:00
noinitramfs.c [PATCH] disable init/initramfs.c 2007-02-11 10:51:25 -08:00
version.c [PATCH] remove many unneeded #includes of sched.h 2007-02-14 08:09:54 -08:00