From edf20d3a05e5099347f58bd7ddf729a6489340c7 Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Sat, 12 Apr 2003 12:55:02 -0700 Subject: [PATCH] Remove flush_page_to_ram() From: Hugh Dickins 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. --- kernel/ptrace.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'kernel') diff --git a/kernel/ptrace.c b/kernel/ptrace.c index a971c2a43185..34527fc3df12 100644 --- a/kernel/ptrace.c +++ b/kernel/ptrace.c @@ -179,14 +179,18 @@ int access_process_vm(struct task_struct *tsk, unsigned long addr, void *buf, in flush_cache_page(vma, addr); + /* + * FIXME! We used to have flush_page_to_ram() in here, but + * that was wrong. davem says we need a new per-arch primitive + * to handle this correctly. + */ + maddr = kmap(page); if (write) { memcpy(maddr + offset, buf, bytes); - flush_page_to_ram(page); flush_icache_user_range(vma, page, addr, bytes); } else { memcpy(buf, maddr + offset, bytes); - flush_page_to_ram(page); } kunmap(page); page_cache_release(page); -- cgit v1.2.3