summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeechul Yun <hyun@nvidia.com>2011-07-05 19:03:55 -0700
committerVarun Colbert <vcolbert@nvidia.com>2011-07-15 16:01:45 -0700
commit6eeccbf7aee3ceae0d711df5df53f20f1195b1c7 (patch)
tree7916c00fec44f6dcab51931b4b3616b120947a24
parent4ae8208660f838a7e31bdc1691026dada2920126 (diff)
ARM: remove unnecessary dcache_clean_area
Cortex-A9 has PIPT D-cache which do not require clean the cache on creating page table. Change-Id: I42d528be83ea8def96045c7e575c7b3ed95f5980 Reviewed-on: http://git-master/r/40505 Reviewed-by: Heechul Yun <hyun@nvidia.com> Tested-by: Heechul Yun <hyun@nvidia.com> Reviewed-by: Krishna Reddy <vdumpa@nvidia.com> Reviewed-by: Scott Williams <scwilliams@nvidia.com>
-rw-r--r--arch/arm/include/asm/pgalloc.h4
-rw-r--r--arch/arm/mm/pgd.c3
2 files changed, 6 insertions, 1 deletions
diff --git a/arch/arm/include/asm/pgalloc.h b/arch/arm/include/asm/pgalloc.h
index b12cc98bbe04..23286e37f8ac 100644
--- a/arch/arm/include/asm/pgalloc.h
+++ b/arch/arm/include/asm/pgalloc.h
@@ -61,7 +61,9 @@ pte_alloc_one_kernel(struct mm_struct *mm, unsigned long addr)
pte = (pte_t *)__get_free_page(PGALLOC_GFP);
if (pte) {
+#if !defined(CONFIG_CPU_CACHE_V7) || !defined(CONFIG_SMP)
clean_dcache_area(pte, sizeof(pte_t) * PTRS_PER_PTE);
+#endif
pte += PTRS_PER_PTE;
}
@@ -79,10 +81,12 @@ pte_alloc_one(struct mm_struct *mm, unsigned long addr)
pte = alloc_pages(PGALLOC_GFP, 0);
#endif
if (pte) {
+#if !defined(CONFIG_CPU_CACHE_V7) || !defined(CONFIG_SMP)
if (!PageHighMem(pte)) {
void *page = page_address(pte);
clean_dcache_area(page, sizeof(pte_t) * PTRS_PER_PTE);
}
+#endif
pgtable_page_ctor(pte);
}
diff --git a/arch/arm/mm/pgd.c b/arch/arm/mm/pgd.c
index be5f58e153bf..ea92009b91df 100644
--- a/arch/arm/mm/pgd.c
+++ b/arch/arm/mm/pgd.c
@@ -41,8 +41,9 @@ pgd_t *get_pgd_slow(struct mm_struct *mm)
memcpy(new_pgd + FIRST_KERNEL_PGD_NR, init_pgd + FIRST_KERNEL_PGD_NR,
(PTRS_PER_PGD - FIRST_KERNEL_PGD_NR) * sizeof(pgd_t));
+#if !defined(CONFIG_CPU_CACHE_V7) || !defined(CONFIG_SMP)
clean_dcache_area(new_pgd, PTRS_PER_PGD * sizeof(pgd_t));
-
+#endif
if (!vectors_high()) {
/*
* On ARM, first page must always be allocated since it