diff options
Diffstat (limited to 'arch/s390/include/asm/debug.h')
-rw-r--r-- | arch/s390/include/asm/debug.h | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/arch/s390/include/asm/debug.h b/arch/s390/include/asm/debug.h index 530c15eb01e9..0206c8052328 100644 --- a/arch/s390/include/asm/debug.h +++ b/arch/s390/include/asm/debug.h | |||
@@ -151,9 +151,21 @@ debug_text_event(debug_info_t* id, int level, const char* txt) | |||
151 | * stored in the s390dbf. See Documentation/s390/s390dbf.txt for more details! | 151 | * stored in the s390dbf. See Documentation/s390/s390dbf.txt for more details! |
152 | */ | 152 | */ |
153 | extern debug_entry_t * | 153 | extern debug_entry_t * |
154 | debug_sprintf_event(debug_info_t* id,int level,char *string,...) | 154 | __debug_sprintf_event(debug_info_t *id, int level, char *string, ...) |
155 | __attribute__ ((format(printf, 3, 4))); | 155 | __attribute__ ((format(printf, 3, 4))); |
156 | 156 | ||
157 | #define debug_sprintf_event(_id, _level, _fmt, ...) \ | ||
158 | ({ \ | ||
159 | debug_entry_t *__ret; \ | ||
160 | debug_info_t *__id = _id; \ | ||
161 | int __level = _level; \ | ||
162 | if ((!__id) || (__level > __id->level)) \ | ||
163 | __ret = NULL; \ | ||
164 | else \ | ||
165 | __ret = __debug_sprintf_event(__id, __level, \ | ||
166 | _fmt, ## __VA_ARGS__); \ | ||
167 | __ret; \ | ||
168 | }) | ||
157 | 169 | ||
158 | static inline debug_entry_t* | 170 | static inline debug_entry_t* |
159 | debug_exception(debug_info_t* id, int level, void* data, int length) | 171 | debug_exception(debug_info_t* id, int level, void* data, int length) |
@@ -194,9 +206,22 @@ debug_text_exception(debug_info_t* id, int level, const char* txt) | |||
194 | * stored in the s390dbf. See Documentation/s390/s390dbf.txt for more details! | 206 | * stored in the s390dbf. See Documentation/s390/s390dbf.txt for more details! |
195 | */ | 207 | */ |
196 | extern debug_entry_t * | 208 | extern debug_entry_t * |
197 | debug_sprintf_exception(debug_info_t* id,int level,char *string,...) | 209 | __debug_sprintf_exception(debug_info_t *id, int level, char *string, ...) |
198 | __attribute__ ((format(printf, 3, 4))); | 210 | __attribute__ ((format(printf, 3, 4))); |
199 | 211 | ||
212 | #define debug_sprintf_exception(_id, _level, _fmt, ...) \ | ||
213 | ({ \ | ||
214 | debug_entry_t *__ret; \ | ||
215 | debug_info_t *__id = _id; \ | ||
216 | int __level = _level; \ | ||
217 | if ((!__id) || (__level > __id->level)) \ | ||
218 | __ret = NULL; \ | ||
219 | else \ | ||
220 | __ret = __debug_sprintf_exception(__id, __level, \ | ||
221 | _fmt, ## __VA_ARGS__);\ | ||
222 | __ret; \ | ||
223 | }) | ||
224 | |||
200 | int debug_register_view(debug_info_t* id, struct debug_view* view); | 225 | int debug_register_view(debug_info_t* id, struct debug_view* view); |
201 | int debug_unregister_view(debug_info_t* id, struct debug_view* view); | 226 | int debug_unregister_view(debug_info_t* id, struct debug_view* view); |
202 | 227 | ||