summaryrefslogtreecommitdiff
path: root/include/asm-alpha
diff options
context:
space:
mode:
authorJes Sorensen <jes@wildopensource.com>2005-03-13 00:16:33 -0800
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-03-13 00:16:33 -0800
commitafb7359a63fc8812064ff4bdbe7ea34325d8a361 (patch)
tree5be39014fec16c5a60d4687b5dbcc83ede6bccd8 /include/asm-alpha
parent939034527a64b84ae4c727fce011d7a7d335b87b (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-alpha')
-rw-r--r--include/asm-alpha/io.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/asm-alpha/io.h b/include/asm-alpha/io.h
index 68907d940af1..871dd7ad909d 100644
--- a/include/asm-alpha/io.h
+++ b/include/asm-alpha/io.h
@@ -666,6 +666,17 @@ isa_memcpy_toio(unsigned long offset, const void *src, long n)
#define writeq writeq
#define readq readq
+/*
+ * 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 /* __ALPHA_IO_H */