diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-07-02 14:56:42 +0100 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2012-01-26 20:06:22 +0000 |
commit | 6e78df176141f2cb673bed7fa47825e3c6a8719f (patch) | |
tree | 451b621572f7ba63d1121e7d9c2ed1f1432f2ded /arch/arm/mm/copypage-v6.c | |
parent | de27c308223dc9bd48de9742c7c2b53a15c1b012 (diff) |
ARM: pgtable: use mk_pte rather than pfn_pte(page_to_pfn())
mk_pte is provided to do this translation for us, so use it rather
than open-coding it in the copypage code.
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mm/copypage-v6.c')
-rw-r--r-- | arch/arm/mm/copypage-v6.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/arm/mm/copypage-v6.c b/arch/arm/mm/copypage-v6.c index c00a7501443..86524591b1b 100644 --- a/arch/arm/mm/copypage-v6.c +++ b/arch/arm/mm/copypage-v6.c @@ -90,8 +90,8 @@ static void v6_copy_user_highpage_aliasing(struct page *to, kfrom = COPYPAGE_V6_FROM + (offset << PAGE_SHIFT); kto = COPYPAGE_V6_TO + (offset << PAGE_SHIFT); - set_pte_ext(TOP_PTE(kfrom), pfn_pte(page_to_pfn(from), PAGE_KERNEL), 0); - set_pte_ext(TOP_PTE(kto), pfn_pte(page_to_pfn(to), PAGE_KERNEL), 0); + set_pte_ext(TOP_PTE(kfrom), mk_pte(from, PAGE_KERNEL), 0); + set_pte_ext(TOP_PTE(kto), mk_pte(to, PAGE_KERNEL), 0); flush_tlb_kernel_page(kfrom); flush_tlb_kernel_page(kto); @@ -119,7 +119,7 @@ static void v6_clear_user_highpage_aliasing(struct page *page, unsigned long vad */ raw_spin_lock(&v6_lock); - set_pte_ext(TOP_PTE(to), pfn_pte(page_to_pfn(page), PAGE_KERNEL), 0); + set_pte_ext(TOP_PTE(to), mk_pte(page, PAGE_KERNEL), 0); flush_tlb_kernel_page(to); clear_page((void *)to); |