diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2005-12-08 22:20:52 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2005-12-09 00:30:48 -0500 |
commit | cbf52afdc0eb88492cf7808cc4b4f58a46f1b1ad (patch) | |
tree | 89910c9d9a054f0bf64670757a3715e19fcc62b2 /include | |
parent | dabcafd3f363bacd6b89f537af27dc79128e4806 (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.h | 3 |
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); |
221 | struct mm_struct; | 221 | struct mm_struct; |
222 | extern int hash_huge_page(struct mm_struct *mm, unsigned long access, | 222 | extern 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 | ||
225 | extern void htab_finish_init(void); | 226 | extern void htab_finish_init(void); |
226 | extern int htab_bolt_mapping(unsigned long vstart, unsigned long vend, | 227 | extern int htab_bolt_mapping(unsigned long vstart, unsigned long vend, |