Commit cc3100f3 authored by Ingo Molnar's avatar Ingo Molnar

use the following, much more intuitive interface names:

- pte_offset_map2 => pte_offset_map_nested
- pte_unmap2 => pte_unmap_nested
parent 98cb97ef
......@@ -342,10 +342,10 @@ static inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
((pte_t *) pmd_page_kernel(*(dir)) + __pte_offset(address))
#define pte_offset_map(dir, address) \
((pte_t *)kmap_atomic(pmd_page(*(dir)),KM_PTE0) + __pte_offset(address))
#define pte_offset_map2(dir, address) \
#define pte_offset_map_nested(dir, address) \
((pte_t *)kmap_atomic(pmd_page(*(dir)),KM_PTE1) + __pte_offset(address))
#define pte_unmap(pte) kunmap_atomic(pte, KM_PTE0)
#define pte_unmap2(pte) kunmap_atomic(pte, KM_PTE1)
#define pte_unmap_nested(pte) kunmap_atomic(pte, KM_PTE1)
/*
* The i386 doesn't have any external MMU info: the kernel page
......
......@@ -261,7 +261,7 @@ skip_copy_pte_range: address = (address + PMD_SIZE) & PMD_MASK;
if (!dst_pte)
goto nomem;
spin_lock(&src->page_table_lock);
src_pte = pte_offset_map2(src_pmd, address);
src_pte = pte_offset_map_nested(src_pmd, address);
do {
pte_t pte = *src_pte;
struct page *ptepage;
......@@ -295,14 +295,14 @@ skip_copy_pte_range: address = (address + PMD_SIZE) & PMD_MASK;
cont_copy_pte_range: set_pte(dst_pte, pte);
cont_copy_pte_range_noset: address += PAGE_SIZE;
if (address >= end) {
pte_unmap2(src_pte);
pte_unmap_nested(src_pte);
pte_unmap(dst_pte);
goto out_unlock;
}
src_pte++;
dst_pte++;
} while ((unsigned long)src_pte & PTE_TABLE_MASK);
pte_unmap2(src_pte-1);
pte_unmap_nested(src_pte-1);
pte_unmap(dst_pte-1);
spin_unlock(&src->page_table_lock);
......
......@@ -17,7 +17,7 @@
extern int vm_enough_memory(long pages);
static inline pte_t *get_one_pte_map2(struct mm_struct *mm, unsigned long addr)
static inline pte_t *get_one_pte_map_nested(struct mm_struct *mm, unsigned long addr)
{
pgd_t * pgd;
pmd_t * pmd;
......@@ -41,9 +41,9 @@ static inline pte_t *get_one_pte_map2(struct mm_struct *mm, unsigned long addr)
goto end;
}
pte = pte_offset_map2(pmd, addr);
pte = pte_offset_map_nested(pmd, addr);
if (pte_none(*pte)) {
pte_unmap2(pte);
pte_unmap_nested(pte);
pte = NULL;
}
end:
......@@ -84,11 +84,11 @@ static int move_one_page(struct mm_struct *mm, unsigned long old_addr, unsigned
pte_t *src, *dst;
spin_lock(&mm->page_table_lock);
src = get_one_pte_map2(mm, old_addr);
src = get_one_pte_map_nested(mm, old_addr);
if (src) {
dst = alloc_one_pte_map(mm, new_addr);
error = copy_one_pte(mm, src, dst);
pte_unmap2(src);
pte_unmap_nested(src);
pte_unmap(dst);
}
spin_unlock(&mm->page_table_lock);
......
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