-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
x86, pat: Preparatory changes in pat.c for bigger rbtree change
Minor changes in pat.c to cleanup code and make it smoother to introduce bigger rbtree only change in the following patch. The changes are cleaup only and should not have any functional impact. Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> LKML-Reference: <20100210195909.792781000@intel.com> Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
- Loading branch information
venkatesh.pallipadi@intel.com
authored and
H. Peter Anvin
committed
Feb 18, 2010
1 parent
17d9ddc
commit be5a0c1
Showing
2 changed files
with
116 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#ifndef __PAT_INTERNAL_H_ | ||
#define __PAT_INTERNAL_H_ | ||
|
||
extern int pat_debug_enable; | ||
|
||
#define dprintk(fmt, arg...) \ | ||
do { if (pat_debug_enable) printk(KERN_INFO fmt, ##arg); } while (0) | ||
|
||
struct memtype { | ||
u64 start; | ||
u64 end; | ||
unsigned long type; | ||
struct list_head nd; | ||
struct rb_node rb; | ||
}; | ||
|
||
static inline char *cattr_name(unsigned long flags) | ||
{ | ||
switch (flags & _PAGE_CACHE_MASK) { | ||
case _PAGE_CACHE_UC: return "uncached"; | ||
case _PAGE_CACHE_UC_MINUS: return "uncached-minus"; | ||
case _PAGE_CACHE_WB: return "write-back"; | ||
case _PAGE_CACHE_WC: return "write-combining"; | ||
default: return "broken"; | ||
} | ||
} | ||
|
||
#endif /* __PAT_INTERNAL_H_ */ |