aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/mm/hash_utils_64.c
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2005-12-08 22:20:52 -0500
committerPaul Mackerras <paulus@samba.org>2005-12-09 00:30:48 -0500
commitcbf52afdc0eb88492cf7808cc4b4f58a46f1b1ad (patch)
tree89910c9d9a054f0bf64670757a3715e19fcc62b2 /arch/powerpc/mm/hash_utils_64.c
parentdabcafd3f363bacd6b89f537af27dc79128e4806 (diff)
[PATCH] powerpc: Add missing icache flushes for hugepages
On most powerpc CPUs, the dcache and icache are not coherent so between writing and executing a page, the caches must be flushed. Userspace programs assume pages given to them by the kernel are icache clean, so we must do this flush between the kernel clearing a page and it being mapped into userspace for execute. We were not doing this for hugepages, this patch corrects the situation. We use the same lazy mechanism as we use for normal pages, delaying the flush until userspace actually attempts to execute from the page in question. Tested on G5. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/mm/hash_utils_64.c')
-rw-r--r--arch/powerpc/mm/hash_utils_64.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/mm/hash_utils_64.c b/arch/powerpc/mm/hash_utils_64.c
index 706e8a63ced9..a33583f3b0e7 100644
--- a/arch/powerpc/mm/hash_utils_64.c
+++ b/arch/powerpc/mm/hash_utils_64.c
@@ -601,7 +601,7 @@ int hash_page(unsigned long ea, unsigned long access, unsigned long trap)
601 /* Handle hugepage regions */ 601 /* Handle hugepage regions */
602 if (unlikely(in_hugepage_area(mm->context, ea))) { 602 if (unlikely(in_hugepage_area(mm->context, ea))) {
603 DBG_LOW(" -> huge page !\n"); 603 DBG_LOW(" -> huge page !\n");
604 return hash_huge_page(mm, access, ea, vsid, local); 604 return hash_huge_page(mm, access, ea, vsid, local, trap);
605 } 605 }
606 606
607 /* Get PTE and page size from page tables */ 607 /* Get PTE and page size from page tables */