summaryrefslogtreecommitdiff
path: root/arch/x86/mm
diff options
context:
space:
mode:
authorYinghai Lu <yinghai@kernel.org>2012-11-17 03:39:08 (GMT)
committerH. Peter Anvin <hpa@linux.intel.com>2012-11-17 19:59:37 (GMT)
commit148b20989e0b83cb301e1fcd9e987c7abde05333 (patch)
treea60b9f7e59c365a498a2bb47341264b430f70a9f /arch/x86/mm
parentcf47065961b48727b4e47bc3e2e67f4996878437 (diff)
downloadlinux-148b20989e0b83cb301e1fcd9e987c7abde05333.tar.xz
x86, mm: Move init_gbpages() out of setup.c
Put it in mm/init.c, and call it from probe_page_mask(). init_mem_mapping is calling probe_page_mask at first. So calling sequence is not changed. Signed-off-by: Yinghai Lu <yinghai@kernel.org> Link: http://lkml.kernel.org/r/1353123563-3103-32-git-send-email-yinghai@kernel.org Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'arch/x86/mm')
-rw-r--r--arch/x86/mm/init.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/x86/mm/init.c b/arch/x86/mm/init.c
index 3cadf10..8168bf8 100644
--- a/arch/x86/mm/init.c
+++ b/arch/x86/mm/init.c
@@ -98,6 +98,16 @@ int direct_gbpages
#endif
;
+static void __init init_gbpages(void)
+{
+#ifdef CONFIG_X86_64
+ if (direct_gbpages && cpu_has_gbpages)
+ printk(KERN_INFO "Using GB pages for direct mapping\n");
+ else
+ direct_gbpages = 0;
+#endif
+}
+
struct map_range {
unsigned long start;
unsigned long end;
@@ -108,6 +118,8 @@ static int page_size_mask;
static void __init probe_page_size_mask(void)
{
+ init_gbpages();
+
#if !defined(CONFIG_DEBUG_PAGEALLOC) && !defined(CONFIG_KMEMCHECK)
/*
* For CONFIG_DEBUG_PAGEALLOC, identity mapping will use small pages.