aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/mm/mem.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/mm/mem.c')
-rw-r--r--arch/powerpc/mm/mem.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c
index 15aac0d78dfa..550517c2dd42 100644
--- a/arch/powerpc/mm/mem.c
+++ b/arch/powerpc/mm/mem.c
@@ -435,17 +435,12 @@ void clear_user_page(void *page, unsigned long vaddr, struct page *pg)
435{ 435{
436 clear_page(page); 436 clear_page(page);
437 437
438 if (cpu_has_feature(CPU_FTR_COHERENT_ICACHE))
439 return;
440 /* 438 /*
441 * We shouldnt have to do this, but some versions of glibc 439 * We shouldnt have to do this, but some versions of glibc
442 * require it (ld.so assumes zero filled pages are icache clean) 440 * require it (ld.so assumes zero filled pages are icache clean)
443 * - Anton 441 * - Anton
444 */ 442 */
445 443 flush_dcache_page(pg);
446 /* avoid an atomic op if possible */
447 if (test_bit(PG_arch_1, &pg->flags))
448 clear_bit(PG_arch_1, &pg->flags);
449} 444}
450EXPORT_SYMBOL(clear_user_page); 445EXPORT_SYMBOL(clear_user_page);
451 446
@@ -469,12 +464,7 @@ void copy_user_page(void *vto, void *vfrom, unsigned long vaddr,
469 return; 464 return;
470#endif 465#endif
471 466
472 if (cpu_has_feature(CPU_FTR_COHERENT_ICACHE)) 467 flush_dcache_page(pg);
473 return;
474
475 /* avoid an atomic op if possible */
476 if (test_bit(PG_arch_1, &pg->flags))
477 clear_bit(PG_arch_1, &pg->flags);
478} 468}
479 469
480void flush_icache_user_range(struct vm_area_struct *vma, struct page *page, 470void flush_icache_user_range(struct vm_area_struct *vma, struct page *page,