[SCSI] zfcp: allocate gid_pn_data objects from gid_pn_cache
[linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git] / drivers / s390 / cio / cio_debug.h
blobc9bf8989930ff9d3c4fa1b08b1c95513997cf906
1 #ifndef CIO_DEBUG_H
2 #define CIO_DEBUG_H
4 #include <asm/debug.h>
6 /* for use of debug feature */
7 extern debug_info_t *cio_debug_msg_id;
8 extern debug_info_t *cio_debug_trace_id;
9 extern debug_info_t *cio_debug_crw_id;
11 #define CIO_TRACE_EVENT(imp, txt) do { \
12 debug_text_event(cio_debug_trace_id, imp, txt); \
13 } while (0)
15 #define CIO_MSG_EVENT(imp, args...) do { \
16 debug_sprintf_event(cio_debug_msg_id, imp , ##args); \
17 } while (0)
19 #define CIO_CRW_EVENT(imp, args...) do { \
20 debug_sprintf_event(cio_debug_crw_id, imp , ##args); \
21 } while (0)
23 static inline void
24 CIO_HEX_EVENT(int level, void *data, int length)
26 if (unlikely(!cio_debug_trace_id))
27 return;
28 while (length > 0) {
29 debug_event(cio_debug_trace_id, level, data, length);
30 length -= cio_debug_trace_id->buf_size;
31 data += cio_debug_trace_id->buf_size;
35 #define CIO_DEBUG(printk_level,event_level,msg...) ({ \
36 if (cio_show_msg) printk(printk_level msg); \
37 CIO_MSG_EVENT (event_level, msg); \
40 #endif