aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mm
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2011-07-02 09:56:42 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2012-01-26 15:06:22 -0500
commit6e78df176141f2cb673bed7fa47825e3c6a8719f (patch)
tree451b621572f7ba63d1121e7d9c2ed1f1432f2ded /arch/arm/mm
parentde27c308223dc9bd48de9742c7c2b53a15c1b012 (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')
-rw-r--r--arch/arm/mm/copypage-v4mc.c2
-rw-r--r--arch/arm/mm/copypage-v6.c6
-rw-r--r--arch/arm/mm/copypage-xscale.c2
3 files changed, 5 insertions, 5 deletions
diff --git a/arch/arm/mm/copypage-v4mc.c b/arch/arm/mm/copypage-v4mc.c
index 87a23ca1fc61..e4dc2f491123 100644
--- a/arch/arm/mm/copypage-v4mc.c
+++ b/arch/arm/mm/copypage-v4mc.c
@@ -74,7 +74,7 @@ void v4_mc_copy_user_highpage(struct page *to, struct page *from,
74 74
75 raw_spin_lock(&minicache_lock); 75 raw_spin_lock(&minicache_lock);
76 76
77 set_pte_ext(TOP_PTE(COPYPAGE_MINICACHE), pfn_pte(page_to_pfn(from), minicache_pgprot), 0); 77 set_pte_ext(TOP_PTE(COPYPAGE_MINICACHE), mk_pte(from, minicache_pgprot), 0);
78 flush_tlb_kernel_page(COPYPAGE_MINICACHE); 78 flush_tlb_kernel_page(COPYPAGE_MINICACHE);
79 79
80 mc_copy_user_page((void *)COPYPAGE_MINICACHE, kto); 80 mc_copy_user_page((void *)COPYPAGE_MINICACHE, kto);
diff --git a/arch/arm/mm/copypage-v6.c b/arch/arm/mm/copypage-v6.c
index c00a75014435..86524591b1b5 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,
90 kfrom = COPYPAGE_V6_FROM + (offset << PAGE_SHIFT); 90 kfrom = COPYPAGE_V6_FROM + (offset << PAGE_SHIFT);
91 kto = COPYPAGE_V6_TO + (offset << PAGE_SHIFT); 91 kto = COPYPAGE_V6_TO + (offset << PAGE_SHIFT);
92 92
93 set_pte_ext(TOP_PTE(kfrom), pfn_pte(page_to_pfn(from), PAGE_KERNEL), 0); 93 set_pte_ext(TOP_PTE(kfrom), mk_pte(from, PAGE_KERNEL), 0);
94 set_pte_ext(TOP_PTE(kto), pfn_pte(page_to_pfn(to), PAGE_KERNEL), 0); 94 set_pte_ext(TOP_PTE(kto), mk_pte(to, PAGE_KERNEL), 0);
95 95
96 flush_tlb_kernel_page(kfrom); 96 flush_tlb_kernel_page(kfrom);
97 flush_tlb_kernel_page(kto); 97 flush_tlb_kernel_page(kto);
@@ -119,7 +119,7 @@ static void v6_clear_user_highpage_aliasing(struct page *page, unsigned long vad
119 */ 119 */
120 raw_spin_lock(&v6_lock); 120 raw_spin_lock(&v6_lock);
121 121
122 set_pte_ext(TOP_PTE(to), pfn_pte(page_to_pfn(page), PAGE_KERNEL), 0); 122 set_pte_ext(TOP_PTE(to), mk_pte(page, PAGE_KERNEL), 0);
123 flush_tlb_kernel_page(to); 123 flush_tlb_kernel_page(to);
124 clear_page((void *)to); 124 clear_page((void *)to);
125 125
diff --git a/arch/arm/mm/copypage-xscale.c b/arch/arm/mm/copypage-xscale.c
index 90f3bb58eafa..2497dcf6d9ae 100644
--- a/arch/arm/mm/copypage-xscale.c
+++ b/arch/arm/mm/copypage-xscale.c
@@ -94,7 +94,7 @@ void xscale_mc_copy_user_highpage(struct page *to, struct page *from,
94 94
95 raw_spin_lock(&minicache_lock); 95 raw_spin_lock(&minicache_lock);
96 96
97 set_pte_ext(TOP_PTE(COPYPAGE_MINICACHE), pfn_pte(page_to_pfn(from), minicache_pgprot), 0); 97 set_pte_ext(TOP_PTE(COPYPAGE_MINICACHE), mk_pte(from, minicache_pgprot), 0);
98 flush_tlb_kernel_page(COPYPAGE_MINICACHE); 98 flush_tlb_kernel_page(COPYPAGE_MINICACHE);
99 99
100 mc_copy_user_page((void *)COPYPAGE_MINICACHE, kto); 100 mc_copy_user_page((void *)COPYPAGE_MINICACHE, kto);