venkatesh.pallipadi@intel.com | be5a0c1 | 2010-02-10 11:57:06 -0800 | [diff] [blame^] | 1 | #ifndef __PAT_INTERNAL_H_ |
| 2 | #define __PAT_INTERNAL_H_ |
| 3 | |
| 4 | extern int pat_debug_enable; |
| 5 | |
| 6 | #define dprintk(fmt, arg...) \ |
| 7 | do { if (pat_debug_enable) printk(KERN_INFO fmt, ##arg); } while (0) |
| 8 | |
| 9 | struct memtype { |
| 10 | u64 start; |
| 11 | u64 end; |
| 12 | unsigned long type; |
| 13 | struct list_head nd; |
| 14 | struct rb_node rb; |
| 15 | }; |
| 16 | |
| 17 | static inline char *cattr_name(unsigned long flags) |
| 18 | { |
| 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"; |
| 25 | } |
| 26 | } |
| 27 | |
| 28 | #endif /* __PAT_INTERNAL_H_ */ |