Skip to content

Instantly share code, notes, and snippets.

@dileks
Created April 17, 2011 14:24
Show Gist options
  • Select an option

  • Save dileks/924070 to your computer and use it in GitHub Desktop.

Select an option

Save dileks/924070 to your computer and use it in GitHub Desktop.
[PATCH -next] x86/mm: Fix section mismatch derived from native_pagetable_reserve()
From 3ebcb8e56a9888d9518d9293a4f0d06bee710f60 Mon Sep 17 00:00:00 2001
From: Sedat Dilek <sedat.dilek@gmail.com>
Date: Sun, 17 Apr 2011 16:17:34 +0200
Subject: [PATCH -next] x86/mm: Fix section mismatch derived from
native_pagetable_reserve()
With CONFIG_DEBUG_SECTION_MISMATCH=y I see these warnings in next-20110415:
LD vmlinux.o
MODPOST vmlinux.o
WARNING: vmlinux.o(.text+0x1ba48): Section mismatch in reference from the function native_pagetable_reserve() to the function .init.text:memblock_x86_reserve_range()
The function native_pagetable_reserve() references
the function __init memblock_x86_reserve_range().
This is often because native_pagetable_reserve lacks a __init
annotation or the annotation of memblock_x86_reserve_range is wrong.
This patch fixes the issue.
Thanks to pipacs from PaX project for help on IRC.
Signed-off-by: Sedat Dilek <sedat.dilek@gmail.com>
---
arch/x86/mm/init.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/x86/mm/init.c b/arch/x86/mm/init.c
index ed0650b..ae1ff24 100644
--- a/arch/x86/mm/init.c
+++ b/arch/x86/mm/init.c
@@ -81,7 +81,7 @@ static void __init find_early_table_space(unsigned long end, int use_pse,
end, pgt_buf_start << PAGE_SHIFT, pgt_buf_top << PAGE_SHIFT);
}
-void native_pagetable_reserve(u64 start, u64 end)
+void __init native_pagetable_reserve(u64 start, u64 end)
{
memblock_x86_reserve_range(start, end, "PGTABLE");
}
--
1.7.4.4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment