aboutsummaryrefslogtreecommitdiffstats
path: root/include
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 /include
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 'include')
-rw-r--r--include/asm-powerpc/mmu.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/asm-powerpc/mmu.h b/include/asm-powerpc/mmu.h
index c1b4bbabbe97..29b0bb0086d3 100644
--- a/include/asm-powerpc/mmu.h
+++ b/include/asm-powerpc/mmu.h
@@ -220,7 +220,8 @@ extern int __hash_page_64K(unsigned long ea, unsigned long access,
220 unsigned int local); 220 unsigned int local);
221struct mm_struct; 221struct mm_struct;
222extern int hash_huge_page(struct mm_struct *mm, unsigned long access, 222extern int hash_huge_page(struct mm_struct *mm, unsigned long access,
223 unsigned long ea, unsigned long vsid, int local); 223 unsigned long ea, unsigned long vsid, int local,
224 unsigned long trap);
224 225
225extern void htab_finish_init(void); 226extern void htab_finish_init(void);
226extern int htab_bolt_mapping(unsigned long vstart, unsigned long vend, 227extern int htab_bolt_mapping(unsigned long vstart, unsigned long vend,