Skip to content

Commit

Permalink
x86, SMEP: Fix section mismatch warnings
Browse files Browse the repository at this point in the history
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:

  de5397a: 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 <[email protected]>
Signed-off-by: Fenghua Yu <[email protected]>
Cc: Asit K Mallick <[email protected]>
Cc: Linus Torvalds <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
  • Loading branch information
fyu1 authored and Ingo Molnar committed May 21, 2011
1 parent d47cc0d commit 1d48762
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/x86/kernel/cpu/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -254,15 +254,15 @@ static inline void squash_the_stupid_serial_number(struct cpuinfo_x86 *c)
}
#endif

static int disable_smep __initdata;
static int disable_smep __cpuinitdata;
static __init int setup_disable_smep(char *arg)
{
disable_smep = 1;
return 1;
}
__setup("nosmep", setup_disable_smep);

static __init void setup_smep(struct cpuinfo_x86 *c)
static __cpuinit void setup_smep(struct cpuinfo_x86 *c)
{
if (cpu_has(c, X86_FEATURE_SMEP)) {
if (unlikely(disable_smep)) {
Expand Down

0 comments on commit 1d48762

Please sign in to comment.