Skip to contentSkip to conversation

x86: fix section mismatch warning - spp_getpage()

PATCH Superseded Marcin Slusarz 1 participant 1 message Aug 12, 2008

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86: fix section mismatch warning - spp_getpage()

WARNING: vmlinux.o(.text+0x17a3e): Section mismatch in reference from the function set_pte_vaddr_pud() to the function .init.text:spp_getpage() The function set_pte_vaddr_pud() references
the function __init spp_getpage().
This is often because set_pte_vaddr_pud lacks a __init
annotation or the annotation of spp_getpage is wrong.

mark set_pte_vaddr_pud __init and all functions calling it

Cc Thomas Gleixner <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc H. Peter Anvin <[email protected]>
Cc Jeremy Fitzhardinge <[email protected]>
---
 arch/x86/mm/init_64.c    |    4 ++--
 arch/x86/mm/pgtable.c    |    4 ++--
 arch/x86/mm/pgtable_32.c |    2 +-
 arch/x86/xen/enlighten.c |    2 +-
 arch/x86/xen/mmu.c       |    2 +-
 5 files changed, 7 insertions(+), 7 deletions(-)
arch/x86/mm/init_64.c +2 -2
index 129618c..486c93c 100644
@@ -107,7 +107,7 @@ static __init void *spp_getpage(void)
 	return ptr;
 }
 
-void
+void __init
 set_pte_vaddr_pud(pud_t *pud_page, unsigned long vaddr, pte_t new_pte)
 {
 	pud_t *pud;
@@ -147,7 +147,7 @@ set_pte_vaddr_pud(pud_t *pud_page, unsigned long vaddr, pte_t new_pte)
 	__flush_tlb_one(vaddr);
 }
 
-void
+void __init
 set_pte_vaddr(unsigned long vaddr, pte_t pteval)
 {
 	pgd_t *pgd;
arch/x86/mm/pgtable.c +2 -2
index d503027..de44260 100644
@@ -317,7 +317,7 @@ int ptep_clear_flush_young(struct vm_area_struct *vma,
 
 int fixmaps_set;
 
-void __native_set_fixmap(enum fixed_addresses idx, pte_t pte)
+void __init __native_set_fixmap(enum fixed_addresses idx, pte_t pte)
 {
 	unsigned long address = __fix_to_virt(idx);
 
@@ -329,7 +329,7 @@ void __native_set_fixmap(enum fixed_addresses idx, pte_t pte)
 	fixmaps_set++;
 }
 
-void native_set_fixmap(enum fixed_addresses idx, unsigned long phys, pgprot_t flags)
+void __init native_set_fixmap(enum fixed_addresses idx, unsigned long phys, pgprot_t flags)
 {
 	__native_set_fixmap(idx, pfn_pte(phys >> PAGE_SHIFT, flags));
 }
arch/x86/mm/pgtable_32.c +1 -1
index cab0abb..62d4dd4 100644
@@ -24,7 +24,7 @@
  * Associate a virtual page frame with a given physical page frame 
  * and protection flags for that frame.
  */ 
-void set_pte_vaddr(unsigned long vaddr, pte_t pteval)
+void __init set_pte_vaddr(unsigned long vaddr, pte_t pteval)
 {
 	pgd_t *pgd;
 	pud_t *pud;
arch/x86/xen/enlighten.c +1 -1
index 9ff6e3c..d7f8807 100644
@@ -1114,7 +1114,7 @@ static unsigned xen_patch(u8 type, u16 clobbers, void *insnbuf,
 	return ret;
 }
 
-static void xen_set_fixmap(unsigned idx, unsigned long phys, pgprot_t prot)
+static void __init xen_set_fixmap(unsigned idx, unsigned long phys, pgprot_t prot)
 {
 	pte_t pte;
 
arch/x86/xen/mmu.c +1 -1
index aa37469..1f444c3 100644
@@ -288,7 +288,7 @@ void xen_set_pmd(pmd_t *ptr, pmd_t val)
  * Associate a virtual page frame with a given physical page frame
  * and protection flags for that frame.
  */
-void set_pte_mfn(unsigned long vaddr, unsigned long mfn, pgprot_t flags)
+void __init set_pte_mfn(unsigned long vaddr, unsigned long mfn, pgprot_t flags)
 {
 	set_pte_vaddr(vaddr, mfn_pte(mfn, flags));
 }
Signature · 1 line
1.5.4.5