summaryrefslogtreecommitdiff
path: root/include/asm-mips
diff options
context:
space:
mode:
authorAndrew Morton <akpm@digeo.com>2003-04-12 12:55:02 -0700
committerJames Bottomley <jejb@raven.il.steeleye.com>2003-04-12 12:55:02 -0700
commitedf20d3a05e5099347f58bd7ddf729a6489340c7 (patch)
tree37078e37a3c1b7728cc22eb32849341a48391993 /include/asm-mips
parent831cbe240825abad390981d90b18eedec8f419b5 (diff)
[PATCH] Remove flush_page_to_ram()
From: Hugh Dickins <hugh@veritas.com> This patch removes the long deprecated flush_page_to_ram. We have two different schemes for doing this cache flushing stuff, the old flush_page_to_ram way and the not so old flush_dcache_page etc. way: see DaveM's Documentation/cachetlb.txt. Keeping flush_page_to_ram around is confusing, and makes it harder to get this done right. All architectures are updated, but the only ones where it amounts to more than deleting a line or two are m68k, mips, mips64 and v850. I followed a prescription from DaveM (though not to the letter), that those arches with non-nop flush_page_to_ram need to do what it did in their clear_user_page and copy_user_page and flush_dcache_page. Dave is consterned that, in the v850 nb85e case, this patch leaves its flush_dcache_page as was, uses it in clear_user_page and copy_user_page, instead of making them all flush icache as well. That may be wrong: I'm just hesitant to add cruft blindly, changing a flush_dcache macro to flush icache too; and naively hope that the necessary flush_icache calls are already in place. Miles, please let us know which way is right for v850 nb85e - thanks.
Diffstat (limited to 'include/asm-mips')
-rw-r--r--include/asm-mips/page.h11
-rw-r--r--include/asm-mips/pgtable.h5
2 files changed, 10 insertions, 6 deletions
diff --git a/include/asm-mips/page.h b/include/asm-mips/page.h
index 5cd2c52cb14f..015ebf1f9aab 100644
--- a/include/asm-mips/page.h
+++ b/include/asm-mips/page.h
@@ -25,8 +25,15 @@ extern void (*_copy_page)(void * to, void * from);
#define clear_page(page) _clear_page(page)
#define copy_page(to, from) _copy_page(to, from)
-#define clear_user_page(page, vaddr) clear_page(page)
-#define copy_user_page(to, from, vaddr) copy_page(to, from)
+
+#define clear_user_page(addr, vaddr, page) \
+ do { clear_page(addr); \
+ flush_dcache_page(page); \
+ } while (0)
+#define copy_user_page(to, from, vaddr, page) \
+ do { copy_page(to, from); \
+ flush_dcache_page(page); \
+ } while (0)
/*
* These are used to make use of C type-checking..
diff --git a/include/asm-mips/pgtable.h b/include/asm-mips/pgtable.h
index 8a0fb426172f..0ba782b65479 100644
--- a/include/asm-mips/pgtable.h
+++ b/include/asm-mips/pgtable.h
@@ -24,7 +24,6 @@
* - flush_cache_mm(mm) flushes the specified mm context's cache lines
* - flush_cache_page(mm, vmaddr) flushes a single page
* - flush_cache_range(vma, start, end) flushes a range of pages
- * - flush_page_to_ram(page) write back kernel page to ram
* - flush_icache_range(start, end) flush a range of instructions
*/
extern void (*_flush_cache_all)(void);
@@ -39,15 +38,13 @@ extern void (*_flush_icache_range)(unsigned long start, unsigned long end);
extern void (*_flush_icache_page)(struct vm_area_struct *vma,
struct page *page);
-#define flush_dcache_page(page) do { } while (0)
-
#define flush_cache_all() _flush_cache_all()
#define __flush_cache_all() ___flush_cache_all()
#define flush_cache_mm(mm) _flush_cache_mm(mm)
#define flush_cache_range(vma,start,end) _flush_cache_range(vma,start,end)
#define flush_cache_page(vma,page) _flush_cache_page(vma, page)
#define flush_cache_sigtramp(addr) _flush_cache_sigtramp(addr)
-#define flush_page_to_ram(page) _flush_page_to_ram(page)
+#define flush_dcache_page(page) _flush_page_to_ram(page)
#define flush_icache_range(start, end) _flush_icache_range(start,end)
#define flush_icache_page(vma, page) _flush_icache_page(vma, page)