* [PATCH -tip] x86: mm/init.c declare direct_gbpages and free_initrd_mem before they get used
@ 2009-04-09 17:29 Jaswinder Singh Rajput
0 siblings, 0 replies; only message in thread
From: Jaswinder Singh Rajput @ 2009-04-09 17:29 UTC (permalink / raw)
To: Ingo Molnar, x86 maintainers, Andrew Morton, LKML
Impact: fix sparse warnings:
arch/x86/mm/init.c:19:5: warning: symbol 'direct_gbpages' was not declared. Should it be static?
arch/x86/mm/init.c:390:6: warning: symbol 'free_initrd_mem' was not declared. Should it be static?
direct_gbpages is required for both 32 and 64 bit, so move direct_gbpages declaration from pgtable_64.h to pgtable.h
Also fixed extra ifndef __ASSEMBLY__ in pgtable_64.h
Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
---
arch/x86/include/asm/pgtable.h | 2 ++
arch/x86/include/asm/pgtable_64.h | 6 ------
arch/x86/mm/init.c | 1 +
3 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h
index 205f6a9..577485b 100644
--- a/arch/x86/include/asm/pgtable.h
+++ b/arch/x86/include/asm/pgtable.h
@@ -510,6 +510,8 @@ static inline int pte_hidden(pte_t pte)
#ifndef __ASSEMBLY__
+extern int direct_gbpages;
+
/* local pte updates need not use xchg for locking */
static inline pte_t native_local_ptep_get_and_clear(pte_t *ptep)
{
diff --git a/arch/x86/include/asm/pgtable_64.h b/arch/x86/include/asm/pgtable_64.h
index 6b87bc6..abde308 100644
--- a/arch/x86/include/asm/pgtable_64.h
+++ b/arch/x86/include/asm/pgtable_64.h
@@ -25,10 +25,6 @@ extern pgd_t init_level4_pgt[];
extern void paging_init(void);
-#endif /* !__ASSEMBLY__ */
-
-#ifndef __ASSEMBLY__
-
#define pte_ERROR(e) \
printk("%s:%d: bad pte %p(%016lx).\n", \
__FILE__, __LINE__, &(e), pte_val(e))
@@ -135,8 +131,6 @@ static inline int pgd_large(pgd_t pgd) { return 0; }
#define update_mmu_cache(vma, address, pte) do { } while (0)
-extern int direct_gbpages;
-
/* Encode and de-code a swap entry */
#if _PAGE_BIT_FILE < _PAGE_BIT_PROTNONE
#define SWP_TYPE_BITS (_PAGE_BIT_FILE - _PAGE_BIT_PRESENT - 1)
diff --git a/arch/x86/mm/init.c b/arch/x86/mm/init.c
index 51ae5ea..688c008 100644
--- a/arch/x86/mm/init.c
+++ b/arch/x86/mm/init.c
@@ -1,3 +1,4 @@
+#include <linux/initrd.h> /* free_initrd_mem */
#include <linux/ioport.h>
#include <linux/swap.h>
--
1.6.0.6
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-04-09 17:30 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-09 17:29 [PATCH -tip] x86: mm/init.c declare direct_gbpages and free_initrd_mem before they get used Jaswinder Singh Rajput
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®