]> git.karo-electronics.de Git - mv-sheeva.git/commit
MIPS: Move idle task creation to work queue
authorMaksim Rayskiy <mrayskiy@broadcom.com>
Sat, 12 Feb 2011 18:21:32 +0000 (10:21 -0800)
committerRalf Baechle <ralf@linux-mips.org>
Mon, 14 Mar 2011 20:07:27 +0000 (21:07 +0100)
commit6667deb69ee3b8a31ea88e1303cf3ad7d4f221da
tree575e660bec3cdb905f31940ab3ca64d7185202be
parentba9786f32473410bbec256db9745a7fbcaace69f
MIPS: Move idle task creation to work queue

To avoid forking usermode thread when creating an idle task, move fork_idle
to a work queue.

If kernel starts with maxcpus= option which does not bring all available
cpus online at boot time, idle tasks for offline cpus are not created. If
later offline cpus are hotplugged through sysfs, __cpu_up is called in
the context of the user task, and fork_idle copies its non-zero mm
pointer.  This causes BUG() in per_cpu_trap_init.

This also avoids issues with resource limits of the CPU writing to sysfs,
containers, maybe others.

Signed-off-by: Maksim Rayskiy <mrayskiy@broadcom.com>
To: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/2070/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/kernel/smp.c