Commit 1d487624fcc17a40aa67acaa9e8f3815fb7cd0f0
Committed by
Ingo Molnar
1 parent
d47cc0db8f
Exists in
master
and in
7 other branches
x86, SMEP: Fix section mismatch warnings
Fix these kernel compilation warnings: WARNING: arch/x86/built-in.o(.cpuinit.text+0x1e07): Section mismatch ... WARNING: arch/x86/built-in.o(.cpuinit.text+0x1b10): Section mismatch ... introduced by: de5397ad5b9a: x86, cpu: Enable/disable Supervisor Mode Execution Protection Change disable_smep from __initdata to __cpuinitdata. Change setup_smep() from __init to __cpuinit. Reported-by: Yinghai Lu <yinghai@kernel.org> Signed-off-by: Fenghua Yu <fenghua.yu@intel.com> Cc: Asit K Mallick <asit.k.mallick@intel.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Link: http://lkml.kernel.org/r/1305930797-11409-1-git-send-email-fenghua.yu@intel.com Signed-off-by: Ingo Molnar <mingo@elte.hu>
Showing 1 changed file with 2 additions and 2 deletions Side-by-side Diff
arch/x86/kernel/cpu/common.c
... | ... | @@ -254,7 +254,7 @@ |
254 | 254 | } |
255 | 255 | #endif |
256 | 256 | |
257 | -static int disable_smep __initdata; | |
257 | +static int disable_smep __cpuinitdata; | |
258 | 258 | static __init int setup_disable_smep(char *arg) |
259 | 259 | { |
260 | 260 | disable_smep = 1; |
... | ... | @@ -262,7 +262,7 @@ |
262 | 262 | } |
263 | 263 | __setup("nosmep", setup_disable_smep); |
264 | 264 | |
265 | -static __init void setup_smep(struct cpuinfo_x86 *c) | |
265 | +static __cpuinit void setup_smep(struct cpuinfo_x86 *c) | |
266 | 266 | { |
267 | 267 | if (cpu_has(c, X86_FEATURE_SMEP)) { |
268 | 268 | if (unlikely(disable_smep)) { |