diff options
| author | Andrew Morton <akpm@osdl.org> | 2003-10-01 10:57:58 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.osdl.org> | 2003-10-01 10:57:58 -0700 |
| commit | b2dd867477c080de713e366809b71fd500a6b300 (patch) | |
| tree | 9866629de17001fcfad1f6f343165b279ee37c54 /include/asm-alpha | |
| parent | bd094583b3b5366523facd026d7a1e76c2a5e9ad (diff) | |
[PATCH] memory writeback/invalidation fixes
From: "David S. Miller" <davem@redhat.com>
This attempts to take care of 2 of the MM todos I had on
my backlog:
1) Zap the stupid flush_cache_all() thing with more meaningful
interfaces.
2) Resolve the ptrace user page access issues, first stage.
The "first stage" mentioned for #2 is simply creating the
user page accesor interfaces. The next stage needs to be
mucking with get_user_pages() so that we can control when
the flush_dcache_page() occurs. Then we:
1) For every platform where flush_dcache_page() is a non-nop
add a call to the beginning of copy_{from,to}_user_page().
2) Make access_process_vm() set the "no dcache flush" bit in
it's call to get_user_pages().
The idea also was that we'd consolidate the write etc. boolean
args passed to get_user_pages() into flag bits too.
But at least with the below, we can delete that reminder FIXME
comment from kernel/ptrace.c, the platforms have the necessary
tools and just need to make use of it :)
As a bonus I noticed that VMALLOC_VMADDR() did absolutely nothing.
After all of this I only have 1 real TODO left, and that's dealing
with the SMP TLB/pte invalidation stuff, very low priority until
someone starts doing more work with sparc32/SMP in 2.6.x :)
Diffstat (limited to 'include/asm-alpha')
| -rw-r--r-- | include/asm-alpha/cacheflush.h | 9 | ||||
| -rw-r--r-- | include/asm-alpha/pgtable.h | 1 |
2 files changed, 9 insertions, 1 deletions
diff --git a/include/asm-alpha/cacheflush.h b/include/asm-alpha/cacheflush.h index 1604d6cd22df..68babfa19303 100644 --- a/include/asm-alpha/cacheflush.h +++ b/include/asm-alpha/cacheflush.h @@ -10,6 +10,8 @@ #define flush_cache_range(vma, start, end) do { } while (0) #define flush_cache_page(vma, vmaddr) do { } while (0) #define flush_dcache_page(page) do { } while (0) +#define flush_cache_vmap(start, end) do { } while (0) +#define flush_cache_vunmap(start, end) do { } while (0) /* Note that the following two definitions are _highly_ dependent on the contexts in which they are used in the kernel. I personally @@ -60,4 +62,11 @@ extern void flush_icache_user_range(struct vm_area_struct *vma, #define flush_icache_page(vma, page) \ flush_icache_user_range((vma), (page), 0, 0) +#define copy_to_user_page(vma, page, vaddr, dst, src, len) \ +do { memcpy(dst, src, len); \ + flush_icache_user_range(vma, page, vaddr, len); \ +} while (0) +#define copy_from_user_page(vma, page, vaddr, dst, src, len) \ + memcpy(dst, src, len) + #endif /* _ALPHA_CACHEFLUSH_H */ diff --git a/include/asm-alpha/pgtable.h b/include/asm-alpha/pgtable.h index 60bf13e10b4e..62954be6f0e4 100644 --- a/include/asm-alpha/pgtable.h +++ b/include/asm-alpha/pgtable.h @@ -49,7 +49,6 @@ #else #define VMALLOC_START (-2*PGDIR_SIZE) #endif -#define VMALLOC_VMADDR(x) ((unsigned long)(x)) #define VMALLOC_END (-PGDIR_SIZE) /* |
