1 #ifndef __PAT_INTERNAL_H_
2 #define __PAT_INTERNAL_H_
4 extern int pat_debug_enable
;
6 #define dprintk(fmt, arg...) \
7 do { if (pat_debug_enable) pr_info("x86/PAT: " fmt, ##arg); } while (0)
13 enum page_cache_mode type
;
17 static inline char *cattr_name(enum page_cache_mode pcm
)
20 case _PAGE_CACHE_MODE_UC
: return "uncached";
21 case _PAGE_CACHE_MODE_UC_MINUS
: return "uncached-minus";
22 case _PAGE_CACHE_MODE_WB
: return "write-back";
23 case _PAGE_CACHE_MODE_WC
: return "write-combining";
24 case _PAGE_CACHE_MODE_WT
: return "write-through";
25 case _PAGE_CACHE_MODE_WP
: return "write-protected";
26 default: return "broken";
31 extern int rbt_memtype_check_insert(struct memtype
*new,
32 enum page_cache_mode
*new_type
);
33 extern struct memtype
*rbt_memtype_erase(u64 start
, u64 end
);
34 extern struct memtype
*rbt_memtype_lookup(u64 addr
);
35 extern int rbt_memtype_copy_nth_element(struct memtype
*out
, loff_t pos
);
37 static inline int rbt_memtype_check_insert(struct memtype
*new,
38 enum page_cache_mode
*new_type
)
40 static inline struct memtype
*rbt_memtype_erase(u64 start
, u64 end
)
42 static inline struct memtype
*rbt_memtype_lookup(u64 addr
)
44 static inline int rbt_memtype_copy_nth_element(struct memtype
*out
, loff_t pos
)
48 #endif /* __PAT_INTERNAL_H_ */