* [PATCH 1/1] x86/kernel/cpu/common.c: Fix section mismatch warnings
@ 2011-05-20 22:33 Fenghua Yu
2011-05-21 17:19 ` [tip:x86/urgent] x86, SMEP: " tip-bot for Fenghua Yu
0 siblings, 1 reply; 2+ messages in thread
From: Fenghua Yu @ 2011-05-20 22:33 UTC (permalink / raw)
To: Ingo Molnar, Thomas Gleixner, H Peter Anvin, Yinghai Lu,
Asit K Mallick, Linus Torvalds, Andrew Morton
Cc: linux-kernel, Fenghua Yu
From: Fenghua Yu <fenghua.yu@intel.com>
Fix kernel compilation warnings from commit:
de5397ad5b9ad22e2401c4dacdf1bb3b19c05679
WARNING: arch/x86/built-in.o(.cpuinit.text+0x1e07): Section mismatch in reference from the function generic_identify() to the variable .init.data:disable_smep
The function __cpuinit generic_identify() references
a variable __initdata disable_smep.
If disable_smep is only used by generic_identify then
annotate disable_smep with a matching annotation.
WARNING: arch/x86/built-in.o(.cpuinit.text+0x1b10): Section mismatch in reference from the function identify_cpu() to the function .init.text:setup_smep() The function __cpuinit identify_cpu() references a function __init setup_smep().
If setup_smep is only used by identify_cpu then annotate setup_smep with a matching annotation.
Change disable_smep from __initdata to __cpuinitdata.
Change setup_smep() from __init to __cpuinit.
Signed-off-by: Fenghua Yu <fenghua.yu@intel.com>
---
arch/x86/kernel/cpu/common.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
index cbc70a2..c8b4162 100644
--- a/arch/x86/kernel/cpu/common.c
+++ b/arch/x86/kernel/cpu/common.c
@@ -254,7 +254,7 @@ 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;
@@ -262,7 +262,7 @@ static __init int setup_disable_smep(char *arg)
}
__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)) {
--
1.7.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [tip:x86/urgent] x86, SMEP: Fix section mismatch warnings
2011-05-20 22:33 [PATCH 1/1] x86/kernel/cpu/common.c: Fix section mismatch warnings Fenghua Yu
@ 2011-05-21 17:19 ` tip-bot for Fenghua Yu
0 siblings, 0 replies; 2+ messages in thread
From: tip-bot for Fenghua Yu @ 2011-05-21 17:19 UTC (permalink / raw)
To: linux-tip-commits
Cc: linux-kernel, hpa, mingo, yinghai, torvalds, asit.k.mallick,
fenghua.yu, tglx, mingo
Commit-ID: 1d487624fcc17a40aa67acaa9e8f3815fb7cd0f0
Gitweb: http://git.kernel.org/tip/1d487624fcc17a40aa67acaa9e8f3815fb7cd0f0
Author: Fenghua Yu <fenghua.yu@intel.com>
AuthorDate: Fri, 20 May 2011 15:33:17 -0700
Committer: Ingo Molnar <mingo@elte.hu>
CommitDate: Sat, 21 May 2011 12:46:24 +0200
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>
---
arch/x86/kernel/cpu/common.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
index cbc70a2..c8b4162 100644
--- a/arch/x86/kernel/cpu/common.c
+++ b/arch/x86/kernel/cpu/common.c
@@ -254,7 +254,7 @@ 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;
@@ -262,7 +262,7 @@ static __init int setup_disable_smep(char *arg)
}
__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)) {
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-05-21 17:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-20 22:33 [PATCH 1/1] x86/kernel/cpu/common.c: Fix section mismatch warnings Fenghua Yu
2011-05-21 17:19 ` [tip:x86/urgent] x86, SMEP: " tip-bot for Fenghua Yu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).