]> nv-tegra.nvidia Code Review - linux-2.6.git/commit
ia64: allocate percpu area for cpu0 like percpu areas for other cpus
authorTejun Heo <tj@kernel.org>
Fri, 2 Oct 2009 04:28:56 +0000 (13:28 +0900)
committerTejun Heo <tj@kernel.org>
Fri, 2 Oct 2009 04:28:56 +0000 (13:28 +0900)
commit36886478f59ec0fdc24a8877c572b92f8d416aba
treeeda76efcb0f05011531e3d83a524cf80d0c67cef
parent12cda817779ce5381a9a4ba8d464abe17c50a9e2
ia64: allocate percpu area for cpu0 like percpu areas for other cpus

cpu0 used special percpu area reserved by the linker, __cpu0_per_cpu,
which is set up early in boot by head.S.  However, this doesn't
guarantee that the area will be on the same node as cpu0 and the
percpu area for cpu0 ends up very far away from percpu areas for other
cpus which cause problems for congruent percpu allocator.

This patch makes percpu area initialization allocate percpu area for
cpu0 like any other cpus and copy it from __cpu0_per_cpu which now
resides in the __init area.  This means that for cpu0, percpu area is
first setup at __cpu0_per_cpu early by head.S and then moved to an
area in the linear mapping during memory initialization and it's not
allowed to take a pointer to percpu variables between head.S and
memory initialization.

Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: linux-ia64 <linux-ia64@vger.kernel.org>
arch/ia64/kernel/vmlinux.lds.S
arch/ia64/mm/contig.c
arch/ia64/mm/discontig.c