Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 283524
b: refs/heads/master
c: 855c743
h: refs/heads/master
v: v3
  • Loading branch information
Stanislaw Gruszka authored and Ingo Molnar committed Dec 6, 2011
1 parent 7160ae7 commit df276b1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 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: 706d9a9c8b5758390036b9980a2b12d809599777
refs/heads/master: 855c743a27bb58a9a521bdc485ef5acfdb69badc
13 changes: 11 additions & 2 deletions trunk/arch/x86/mm/init_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -744,6 +744,17 @@ void __init mem_init(void)
#ifdef CONFIG_FLATMEM
BUG_ON(!mem_map);
#endif
/*
* With CONFIG_DEBUG_PAGEALLOC initialization of highmem pages has to
* be done before free_all_bootmem(). Memblock use free low memory for
* temporary data (see find_range_array()) and for this purpose can use
* pages that was already passed to the buddy allocator, hence marked as
* not accessible in the page tables when compiled with
* CONFIG_DEBUG_PAGEALLOC. Otherwise order of initialization is not
* important here.
*/
set_highmem_pages_init();

/* this will put all low memory onto the freelists */
totalram_pages += free_all_bootmem();

Expand All @@ -755,8 +766,6 @@ void __init mem_init(void)
if (page_is_ram(tmp) && PageReserved(pfn_to_page(tmp)))
reservedpages++;

set_highmem_pages_init();

codesize = (unsigned long) &_etext - (unsigned long) &_text;
datasize = (unsigned long) &_edata - (unsigned long) &_etext;
initsize = (unsigned long) &__init_end - (unsigned long) &__init_begin;
Expand Down

0 comments on commit df276b1

Please sign in to comment.