Jiri Kosina 403a91b165 percpu: allow pcpu_alloc() to be called with IRQs off
pcpu_alloc() and pcpu_extend_area_map() perform a series of
spin_lock_irq()/spin_unlock_irq() calls, which make them unsafe
with respect to being called from contexts which have IRQs off.

This patch converts the code to perform save/restore of flags instead,
making pcpu_alloc() (or __alloc_percpu() respectively) to be called
from early kernel startup stage, where IRQs are off.

This is needed for proper initialization of per-cpu rq_weight data from
sched_init().

tj: added comment explaining why irqsave/restore is used in alloc path.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Tejun Heo <tj@kernel.org>
2009-10-29 00:25:59 +09:00
..
2009-04-01 08:59:13 -07:00
2009-06-16 19:47:28 -07:00
2009-09-22 07:17:41 -07:00
2009-09-23 07:39:41 -07:00
2009-09-22 07:17:35 -07:00
2009-09-22 07:17:40 -07:00
2009-09-27 11:39:25 -07:00
2009-09-24 08:41:47 -04:00
2008-06-12 18:05:41 -07:00
2007-10-20 01:27:18 +02:00
2009-06-23 12:50:05 -07:00
2009-09-22 07:17:29 -07:00