Skip to content

Commit

Permalink
x86_64/setup: unconditionally populate the pgd
Browse files Browse the repository at this point in the history
When allocating a new pud, unconditionally populate the pgd (why did
we bother to create a new pud if we weren't going to populate it?).

This will only happen if the pgd slot was empty, since any existing
pud will be reused.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Cc: Stephen Tweedie <sct@redhat.com>
Cc: Eduardo Habkost <ehabkost@redhat.com>
Cc: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Jeremy Fitzhardinge authored and Ingo Molnar committed Jul 8, 2008
1 parent aea5f9f commit 574977a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions arch/x86/mm/init_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -616,9 +616,8 @@ unsigned long __init_refok init_memory_mapping(unsigned long start, unsigned lon

last_map_addr = phys_pud_init(pud, __pa(start), __pa(next));
unmap_low_page(pud);
if (!after_bootmem)
pgd_populate(&init_mm, pgd_offset_k(start),
__va(pud_phys));
pgd_populate(&init_mm, pgd_offset_k(start),
__va(pud_phys));
}

if (!after_bootmem)
Expand Down

0 comments on commit 574977a

Please sign in to comment.