Skip to contentSkip to conversation

x86: fix wrong section of pat_disable & make it static

PATCH In review Marcin Slusarz 1 participant 2 messages Apr 10, 2009 – Apr 12, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86: fix wrong section of pat_disable & make it static

pat_disable cannot be __cpuinit anymore because it's called from pat_init and the callchain looks like this:
pat_disable [cpuinit] <- pat_init <- generic_set_all <-
ipi_handler <- set_mtrr <- (other non init/cpuinit functions)

WARNING: arch/x86/mm/built-in.o(.text+0x449e): Section mismatch in reference from the function pat_init() to the function .cpuinit.text:pat_disable() The function pat_init() references
the function __cpuinit pat_disable().
This is often because pat_init lacks a __cpuinit
annotation or the annotation of pat_disable is wrong.

Non CONFIG_X86_PAT version of pat_disable is static inline, so this version can be static too (and there are no callers outside of this file).

Cc H. Peter Anvin <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Thomas Gleixner <[email protected]>
---
 arch/x86/mm/pat.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/x86/mm/pat.c +1 -1
index 640339e..c009a24 100644
@@ -31,7 +31,7 @@
 #ifdef CONFIG_X86_PAT
 int __read_mostly pat_enabled = 1;
 
-void __cpuinit pat_disable(const char *reason)
+static inline void pat_disable(const char *reason)
 {
 	pat_enabled = 0;
 	printk(KERN_INFO "%s\n", reason);
Signature · 1 line
1.6.0.6
#1 lore raw
Commit-ID:  1ee4bd92a7aa49eb66c8d5672e837090d3e7b7ff
Gitweb:     http://git.kernel.org/tip/1ee4bd92a7aa49eb66c8d5672e837090d3e7b7ff
Author:     Marcin Slusarz <[email protected]>
AuthorDate: Fri, 10 Apr 2009 22:47:17 +0200
Committer:  Ingo Molnar <[email protected]>
CommitDate: Sun, 12 Apr 2009 12:34:23 +0200

x86: fix wrong section of pat_disable & make it static

pat_disable cannot be __cpuinit anymore because it's called from pat_init and the callchain looks like this:
pat_disable [cpuinit] <- pat_init <- generic_set_all <-
ipi_handler <- set_mtrr <- (other non init/cpuinit functions)

WARNING: arch/x86/mm/built-in.o(.text+0x449e): Section mismatch in reference from the function pat_init() to the function .cpuinit.text:pat_disable() The function pat_init() references
the function __cpuinit pat_disable().
This is often because pat_init lacks a __cpuinit
annotation or the annotation of pat_disable is wrong.

Non CONFIG_X86_PAT version of pat_disable is static inline, so this version can be static too (and there are no callers outside of this file).

LKML-Reference: <[email protected]>

---
 arch/x86/mm/pat.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/x86/mm/pat.c +1 -1
index 640339e..c009a24 100644
@@ -31,7 +31,7 @@
 #ifdef CONFIG_X86_PAT
 int __read_mostly pat_enabled = 1;
 
-void __cpuinit pat_disable(const char *reason)
+static inline void pat_disable(const char *reason)
 {
 	pat_enabled = 0;
 	printk(KERN_INFO "%s\n", reason);