summaryrefslogtreecommitdiff
path: root/include/linux/page-flags.h
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/linux/page-flags.h
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/linux/page-flags.h')
-rw-r--r--include/linux/page-flags.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h
index 6ab9cc46640f..f257c4c0d706 100644
--- a/include/linux/page-flags.h
+++ b/include/linux/page-flags.h
@@ -75,7 +75,7 @@
#define PG_mappedtodisk 17 /* Has blocks allocated on-disk */
#define PG_reclaim 18 /* To be reclaimed asap */
#define PG_nosave_free 19 /* Free, should not be written */
-
+#define PG_uncached 20 /* Page has been mapped as uncached */
/*
* Global page accounting. One instance per CPU. Only unsigned longs are
@@ -301,6 +301,10 @@ extern void __mod_page_state(unsigned offset, unsigned long delta);
#define PageSwapCache(page) 0
#endif
+#define PageUncached(page) test_bit(PG_uncached, &(page)->flags)
+#define SetPageUncached(page) set_bit(PG_uncached, &(page)->flags)
+#define ClearPageUncached(page) clear_bit(PG_uncached, &(page)->flags)
+
struct page; /* forward declaration */
int test_clear_page_dirty(struct page *page);