Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 #ifndef CIO_DEBUG_H
0003 #define CIO_DEBUG_H
0004 
0005 #include <asm/debug.h>
0006 
0007 /* for use of debug feature */
0008 extern debug_info_t *cio_debug_msg_id;
0009 extern debug_info_t *cio_debug_trace_id;
0010 extern debug_info_t *cio_debug_crw_id;
0011 
0012 #define CIO_TRACE_EVENT(imp, txt) do {              \
0013         debug_text_event(cio_debug_trace_id, imp, txt); \
0014     } while (0)
0015 
0016 #define CIO_MSG_EVENT(imp, args...) do {                \
0017         debug_sprintf_event(cio_debug_msg_id, imp , ##args);    \
0018     } while (0)
0019 
0020 #define CIO_CRW_EVENT(imp, args...) do {                \
0021         debug_sprintf_event(cio_debug_crw_id, imp , ##args);    \
0022     } while (0)
0023 
0024 static inline void CIO_HEX_EVENT(int level, void *data, int length)
0025 {
0026     debug_event(cio_debug_trace_id, level, data, length);
0027 }
0028 
0029 /* For the CIO debugfs related features */
0030 extern struct dentry *cio_debugfs_dir;
0031 
0032 #endif