Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 144735
b: refs/heads/master
c: 4983439
h: refs/heads/master
i:
  144733: 62474c5
  144731: 77d2128
  144727: a3d8828
  144719: 44b0719
  144703: 1fd508f
v: v3
  • Loading branch information
Jan Beulich authored and H. Peter Anvin committed May 8, 2009
1 parent 62660fe commit 1b57bf3
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 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: 61438766514a2d7f191ce1b3cf6812eabbef4ef7
refs/heads/master: 498343967613183611ac37dccb2846496d954c06
18 changes: 17 additions & 1 deletion trunk/arch/x86/mm/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include <asm/page.h>
#include <asm/page_types.h>
#include <asm/sections.h>
#include <asm/setup.h>
#include <asm/system.h>
#include <asm/tlbflush.h>

Expand Down Expand Up @@ -304,8 +305,23 @@ unsigned long __init_refok init_memory_mapping(unsigned long start,
#endif

#ifdef CONFIG_X86_64
if (!after_bootmem)
if (!after_bootmem && !start) {
pud_t *pud;
pmd_t *pmd;

mmu_cr4_features = read_cr4();

/*
* _brk_end cannot change anymore, but it and _end may be
* located on different 2M pages. cleanup_highmap(), however,
* can only consider _end when it runs, so destroy any
* mappings beyond _brk_end here.
*/
pud = pud_offset(pgd_offset_k(_brk_end), _brk_end);
pmd = pmd_offset(pud, _brk_end - 1);
while (++pmd <= pmd_offset(pud, (unsigned long)_end - 1))
pmd_clear(pmd);
}
#endif
__flush_tlb_all();

Expand Down

0 comments on commit 1b57bf3

Please sign in to comment.