Go to the documentation of this file.
14 #include <asm/debug.h>
22 #define do_debug_ccw 1
25 #define do_debug_ccw 0
28 #define do_debug_data 1
30 #define do_debug_data 0
34 #define CTC_DBF_ALWAYS 0
35 #define CTC_DBF_EMERG 0
36 #define CTC_DBF_ALERT 1
37 #define CTC_DBF_CRIT 2
38 #define CTC_DBF_ERROR 3
39 #define CTC_DBF_WARN 4
40 #define CTC_DBF_NOTICE 5
41 #define CTC_DBF_INFO 5
42 #define CTC_DBF_DEBUG 6
69 static inline const char *strtail(
const char *
s,
int n)
72 return (l > n) ? s + (l -
n) : s;
75 #define CTCM_FUNTAIL strtail((char *)__func__, 16)
77 #define CTCM_DBF_TEXT(name, level, text) \
79 debug_text_event(ctcm_dbf[CTCM_DBF_##name].id, level, text); \
82 #define CTCM_DBF_HEX(name, level, addr, len) \
84 debug_event(ctcm_dbf[CTCM_DBF_##name].id, \
85 level, (void *)(addr), len); \
88 #define CTCM_DBF_TEXT_(name, level, text...) \
89 ctcm_dbf_longtext(CTCM_DBF_##name, level, text)
96 #define CTCM_DBF_DEV_NAME(cat, dev, text) \
98 CTCM_DBF_TEXT_(cat, CTC_DBF_INFO, "%s(%s) :- %s", \
99 CTCM_FUNTAIL, dev->name, text); \
102 #define MPC_DBF_DEV_NAME(cat, dev, text) \
104 CTCM_DBF_TEXT_(MPC_##cat, CTC_DBF_INFO, "%s(%s) := %s", \
105 CTCM_FUNTAIL, dev->name, text); \
108 #define CTCMY_DBF_DEV_NAME(cat, dev, text) \
110 if (IS_MPCDEV(dev)) \
111 MPC_DBF_DEV_NAME(cat, dev, text); \
113 CTCM_DBF_DEV_NAME(cat, dev, text); \
121 #define CTCM_DBF_DEV(cat, dev, text) \
123 CTCM_DBF_TEXT_(cat, CTC_DBF_INFO, "%s(%p) :-: %s", \
124 CTCM_FUNTAIL, dev, text); \
127 #define MPC_DBF_DEV(cat, dev, text) \
129 CTCM_DBF_TEXT_(MPC_##cat, CTC_DBF_INFO, "%s(%p) :=: %s", \
130 CTCM_FUNTAIL, dev, text); \
133 #define CTCMY_DBF_DEV(cat, dev, text) \
135 if (IS_MPCDEV(dev)) \
136 MPC_DBF_DEV(cat, dev, text); \
138 CTCM_DBF_DEV(cat, dev, text); \