aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/edac/edac_mc.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/edac/edac_mc.h')
-rw-r--r--drivers/edac/edac_mc.h23
1 files changed, 21 insertions, 2 deletions
diff --git a/drivers/edac/edac_mc.h b/drivers/edac/edac_mc.h
index 75ecf484a43a..4bd8375a8d7e 100644
--- a/drivers/edac/edac_mc.h
+++ b/drivers/edac/edac_mc.h
@@ -43,10 +43,29 @@
43#define PAGES_TO_MiB( pages ) ( ( pages ) << ( PAGE_SHIFT - 20 ) ) 43#define PAGES_TO_MiB( pages ) ( ( pages ) << ( PAGE_SHIFT - 20 ) )
44#endif 44#endif
45 45
46#define edac_printk(level, prefix, fmt, arg...) \
47 printk(level "EDAC " prefix ": " fmt, ##arg)
48
49#define edac_mc_printk(mci, level, fmt, arg...) \
50 printk(level "EDAC MC%d: " fmt, mci->mc_idx, ##arg)
51
52#define edac_mc_chipset_printk(mci, level, prefix, fmt, arg...) \
53 printk(level "EDAC " prefix " MC%d: " fmt, mci->mc_idx, ##arg)
54
55/* prefixes for edac_printk() and edac_mc_printk() */
56#define EDAC_MC "MC"
57#define EDAC_PCI "PCI"
58#define EDAC_DEBUG "DEBUG"
59
46#ifdef CONFIG_EDAC_DEBUG 60#ifdef CONFIG_EDAC_DEBUG
47extern int edac_debug_level; 61extern int edac_debug_level;
48#define edac_debug_printk(level, fmt, args...) \ 62
49do { if (level <= edac_debug_level) printk(KERN_DEBUG fmt, ##args); } while(0) 63#define edac_debug_printk(level, fmt, arg...) \
64 do { \
65 if (level <= edac_debug_level) \
66 edac_printk(KERN_DEBUG, EDAC_DEBUG, fmt, ##arg); \
67 } while(0)
68
50#define debugf0( ... ) edac_debug_printk(0, __VA_ARGS__ ) 69#define debugf0( ... ) edac_debug_printk(0, __VA_ARGS__ )
51#define debugf1( ... ) edac_debug_printk(1, __VA_ARGS__ ) 70#define debugf1( ... ) edac_debug_printk(1, __VA_ARGS__ )
52#define debugf2( ... ) edac_debug_printk(2, __VA_ARGS__ ) 71#define debugf2( ... ) edac_debug_printk(2, __VA_ARGS__ )