0001
0002
0003
0004
0005
0006 #ifndef AP_DEBUG_H
0007 #define AP_DEBUG_H
0008
0009 #include <asm/debug.h>
0010
0011 #define DBF_ERR 3
0012 #define DBF_WARN 4
0013 #define DBF_INFO 5
0014 #define DBF_DEBUG 6
0015
0016 #define RC2ERR(rc) ((rc) ? DBF_ERR : DBF_INFO)
0017 #define RC2WARN(rc) ((rc) ? DBF_WARN : DBF_INFO)
0018
0019 #define DBF_MAX_SPRINTF_ARGS 6
0020
0021 #define AP_DBF(...) \
0022 debug_sprintf_event(ap_dbf_info, ##__VA_ARGS__)
0023 #define AP_DBF_ERR(...) \
0024 debug_sprintf_event(ap_dbf_info, DBF_ERR, ##__VA_ARGS__)
0025 #define AP_DBF_WARN(...) \
0026 debug_sprintf_event(ap_dbf_info, DBF_WARN, ##__VA_ARGS__)
0027 #define AP_DBF_INFO(...) \
0028 debug_sprintf_event(ap_dbf_info, DBF_INFO, ##__VA_ARGS__)
0029 #define AP_DBF_DBG(...) \
0030 debug_sprintf_event(ap_dbf_info, DBF_DEBUG, ##__VA_ARGS__)
0031
0032 extern debug_info_t *ap_dbf_info;
0033
0034 #endif