summaryrefslogtreecommitdiff
path: root/include/asm-mips
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2002-02-12 20:27:37 -0800
committerLinus Torvalds <torvalds@home.transmeta.com>2002-02-12 20:27:37 -0800
commite97fde155f33869d5c6589cf239c1353684a09af (patch)
tree11200e41288eea0d2eccb49f19568e59dc386492 /include/asm-mips
parentebae1d3a25f0f3c7a4404afc90421ad6d454e0b2 (diff)
[PATCH] flush_icache_user_range (v2.5.4)
The patch below changes access_process_vm to use a new architecture hook, flush_icache_user_range, instead of flush_icache_page, and adds a definition of flush_icache_user_range which does the same thing as flush_icache_page for all architectures except PPC. (The PPC update that is in Linus' BK tree already includes a suitable definition of flush_icache_user_range.) The reason for doing this is that when flush_icache_page is called from do_no_page or do_swap_page, I want to be able to do the flush conditionally, based on the state of the page. In contrast, access_process_vm needs to do the flush unconditionally since it has just modified the page. In the access_process_vm case it is useful to have the information about the user address and length that have been modified since then we can just flush the affected cache lines rather than the whole page. This patch should make it easy to improve performance on alpha, since there (as I understand it) the icache flush is not needed at all in do_no_page or do_swap_page, but is needed in access_process_vm. All that is needed is to make flush_icache_page a noop on alpha. The patch below doesn't do this, I'll let the alpha maintainers push that change if they want.
Diffstat (limited to 'include/asm-mips')
-rw-r--r--include/asm-mips/pgtable.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/asm-mips/pgtable.h b/include/asm-mips/pgtable.h
index afc0148e9b83..e24c6bde77f5 100644
--- a/include/asm-mips/pgtable.h
+++ b/include/asm-mips/pgtable.h
@@ -51,6 +51,8 @@ extern void (*_flush_icache_page)(struct vm_area_struct *vma,
#define flush_icache_range(start, end) _flush_icache_range(start,end)
#define flush_icache_page(vma, page) _flush_icache_page(vma, page)
+#define flush_icache_user_range(vma, page, addr, len) \
+ _flush_icache_page((vma), (page))
/*