Commit c7fb9c90 authored by Linus Torvalds's avatar Linus Torvalds

Clean up more x86 MM init details after splitup

parent edcc875f
......@@ -249,9 +249,9 @@ static void __init pagetable_init (void)
{
unsigned long vaddr;
pgd_t *pgd_base = swapper_pg_dir;
int i;
#if CONFIG_X86_PAE
int i;
/* Init entries of the first-level page table to the zero page */
for (i = 0; i < PTRS_PER_PGD; i++)
set_pgd(pgd_base + i, __pgd(__pa(empty_zero_page) | _PAGE_PRESENT));
......
......@@ -52,7 +52,7 @@ void show_mem(void)
* Associate a virtual page frame with a given physical page frame
* and protection flags for that frame.
*/
static void set_pte_phys (unsigned long vaddr, unsigned long phys, pgprot_t flags)
static void set_pte_pfn(unsigned long vaddr, unsigned long pfn, pgprot_t flags)
{
pgd_t *pgd;
pmd_t *pmd;
......@@ -69,8 +69,8 @@ static void set_pte_phys (unsigned long vaddr, unsigned long phys, pgprot_t flag
return;
}
pte = pte_offset_kernel(pmd, vaddr);
/* <phys,flags> stored as-is, to permit clearing entries */
set_pte(pte, pfn_pte(phys >> PAGE_SHIFT, flags));
/* <pfn,flags> stored as-is, to permit clearing entries */
set_pte(pte, pfn_pte(pfn, flags));
/*
* It's enough to flush this one mapping.
......@@ -87,7 +87,7 @@ void __set_fixmap (enum fixed_addresses idx, unsigned long phys, pgprot_t flags)
BUG();
return;
}
set_pte_phys(address, phys, flags);
set_pte_pfn(address, phys >> PAGE_SHIFT, flags);
}
pte_t *pte_alloc_one_kernel(struct mm_struct *mm, unsigned long address)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment