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) printk(KERN_INFO fmt, ##arg); } while (0)
17 static inline char *cattr_name(unsigned long flags
)
19 switch (flags
& _PAGE_CACHE_MASK
) {
20 case _PAGE_CACHE_UC
: return "uncached";
21 case _PAGE_CACHE_UC_MINUS
: return "uncached-minus";
22 case _PAGE_CACHE_WB
: return "write-back";
23 case _PAGE_CACHE_WC
: return "write-combining";
24 default: return "broken";
29 extern int rbt_memtype_check_insert(struct memtype
*new,
30 unsigned long *new_type
);
31 extern struct memtype
*rbt_memtype_erase(u64 start
, u64 end
);
32 extern struct memtype
*rbt_memtype_lookup(u64 addr
);
33 extern int rbt_memtype_copy_nth_element(struct memtype
*out
, loff_t pos
);
35 static inline int rbt_memtype_check_insert(struct memtype
*new,
36 unsigned long *new_type
)
38 static inline struct memtype
*rbt_memtype_erase(u64 start
, u64 end
)
40 static inline struct memtype
*rbt_memtype_lookup(u64 addr
)
42 static inline int rbt_memtype_copy_nth_element(struct memtype
*out
, loff_t pos
)
46 #endif /* __PAT_INTERNAL_H_ */