From: H. Peter Anvin Date: Wed, 21 Jul 2010 21:23:10 +0000 (-0700) Subject: x86, xsave: Make xstate_enable_boot_cpu() __init, protect on CPU 0 X-Git-Tag: v2.6.36-rc1~507^2 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1cff92d8fdb27684308864d9cdb324bee43b40ab;p=pandora-kernel.git x86, xsave: Make xstate_enable_boot_cpu() __init, protect on CPU 0 xstate_enable_boot_cpu() is, as the name implies, only used on the boot CPU; furthermore, it invokes alloc_bootmem(), which is __init; hence it needs to be tagged __init rather than __cpuinit. Furthermore, it is *not* safe in the long run to rely on CPU 0 only coming online during the early boot -- at some point we're going to support offlining (and re-onlining) the boot CPU, and at that point we must not call xstate_enable_boot_cpu() again. The code is a fair bit more obscure than one would like, because the __ref overrides aren't quite powerful enough. Signed-off-by: H. Peter Anvin Acked-by: Suresh Siddha Cc: Robert Richter LKML-Reference: <4C476236.1020302@zytor.com> --- Reading git-diff-tree failed