diff options
| author | Jes Sorensen <jes@wildopensource.com> | 2005-03-13 00:16:33 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-03-13 00:16:33 -0800 |
| commit | afb7359a63fc8812064ff4bdbe7ea34325d8a361 (patch) | |
| tree | 5be39014fec16c5a60d4687b5dbcc83ede6bccd8 /include/asm-arm26 | |
| parent | 939034527a64b84ae4c727fce011d7a7d335b87b (diff) | |
[PATCH] ia64 specific /dev/mem handlers
Convert /dev/mem read/write calls to use arch_translate_mem_ptr if
available. Needed on ia64 for pages converted fo uncached mappings to
avoid it being accessed in cached mode after the conversion which can lead
to memory corruption. Introduces PG_uncached page flag for marking pages
uncached.
Also folds do_write_mem into write_mem as it was it's only user.
Use __ARCH_HAS_NO_PAGE_ZERO_MAPPED for architectures to indicate they
require magic handling of the zero page (Sparc and m68k).
Signed-off-by: Jes Sorensen <jes@wildopensource.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/asm-arm26')
| -rw-r--r-- | include/asm-arm26/io.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/asm-arm26/io.h b/include/asm-arm26/io.h index bc20793f9f4f..02f94d88a124 100644 --- a/include/asm-arm26/io.h +++ b/include/asm-arm26/io.h @@ -420,5 +420,16 @@ extern void consistent_sync(void *vaddr, size_t size, int rw); #define BIOVEC_MERGEABLE(vec1, vec2) \ ((bvec_to_phys((vec1)) + (vec1)->bv_len) == bvec_to_phys((vec2))) +/* + * Convert a physical pointer to a virtual kernel pointer for /dev/mem + * access + */ +#define xlate_dev_mem_ptr(p) __va(p) + +/* + * Convert a virtual cached pointer to an uncached pointer + */ +#define xlate_dev_kmem_ptr(p) p + #endif /* __KERNEL__ */ #endif /* __ASM_ARM_IO_H */ |
