diff options
author | H. Peter Anvin <hpa@linux.intel.com> | 2010-07-21 23:23:10 +0200 |
---|---|---|
committer | H. Peter Anvin <hpa@linux.intel.com> | 2010-07-22 00:33:54 +0200 |
commit | 1cff92d8fdb27684308864d9cdb324bee43b40ab (patch) | |
tree | 65a6060dab843f5f2e32a8e0fce0200eeb9d44ef /kernel/power/process.c | |
parent | x86, xsave: Add __init attribute to setup_xstate_features() (diff) | |
download | linux-1cff92d8fdb27684308864d9cdb324bee43b40ab.tar.xz linux-1cff92d8fdb27684308864d9cdb324bee43b40ab.zip |
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 <hpa@linux.intel.com>
Acked-by: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: Robert Richter <robert.richter@amd.com>
LKML-Reference: <4C476236.1020302@zytor.com>
Diffstat (limited to 'kernel/power/process.c')
0 files changed, 0 insertions, 0 deletions