From: Jiri Kosina Date: Wed, 28 Oct 2009 15:25:59 +0000 (+0900) Subject: percpu: allow pcpu_alloc() to be called with IRQs off X-Git-Tag: v2.6.32-rc6~33^2~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=403a91b1659cb149dbddc5885f892734ae4542d8;p=pandora-kernel.git 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 Acked-by: Ingo Molnar Signed-off-by: Tejun Heo --- Reading git-diff-tree failed