Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 356211
b: refs/heads/master
c: 148b209
h: refs/heads/master
i:
  356209: e9a3e50
  356207: 4509840
v: v3
  • Loading branch information
Yinghai Lu authored and H. Peter Anvin committed Nov 17, 2012
1 parent 25924d0 commit a718ceb
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 15 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: cf47065961b48727b4e47bc3e2e67f4996878437
refs/heads/master: 148b20989e0b83cb301e1fcd9e987c7abde05333
15 changes: 1 addition & 14 deletions trunk/arch/x86/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -282,18 +282,7 @@ void * __init extend_brk(size_t size, size_t align)
return ret;
}

#ifdef CONFIG_X86_64
static void __init init_gbpages(void)
{
if (direct_gbpages && cpu_has_gbpages)
printk(KERN_INFO "Using GB pages for direct mapping\n");
else
direct_gbpages = 0;
}
#else
static inline void init_gbpages(void)
{
}
#ifdef CONFIG_X86_32
static void __init cleanup_highmap(void)
{
}
Expand Down Expand Up @@ -933,8 +922,6 @@ void __init setup_arch(char **cmdline_p)

setup_real_mode();

init_gbpages();

init_mem_mapping();

memblock.current_limit = get_max_mapped();
Expand Down
12 changes: 12 additions & 0 deletions trunk/arch/x86/mm/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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.
Expand Down

0 comments on commit a718ceb

Please sign in to comment.