Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 /*
0003  *  Copyright IBM Corp. 2022
0004  *
0005  * Author(s): Tony Krowiak <akrowiak@linux.ibm.com>
0006  */
0007 #ifndef VFIO_AP_DEBUG_H
0008 #define VFIO_AP_DEBUG_H
0009 
0010 #include <asm/debug.h>
0011 
0012 #define DBF_ERR     3   /* error conditions   */
0013 #define DBF_WARN    4   /* warning conditions */
0014 #define DBF_INFO    5   /* informational      */
0015 #define DBF_DEBUG   6   /* for debugging only */
0016 
0017 #define DBF_MAX_SPRINTF_ARGS 10
0018 
0019 #define VFIO_AP_DBF(...)                    \
0020     debug_sprintf_event(vfio_ap_dbf_info, ##__VA_ARGS__)
0021 #define VFIO_AP_DBF_ERR(...)                    \
0022     debug_sprintf_event(vfio_ap_dbf_info, DBF_ERR, ##__VA_ARGS__)
0023 #define VFIO_AP_DBF_WARN(...)                   \
0024     debug_sprintf_event(vfio_ap_dbf_info, DBF_WARN, ##__VA_ARGS__)
0025 #define VFIO_AP_DBF_INFO(...)                   \
0026     debug_sprintf_event(vfio_ap_dbf_info, DBF_INFO, ##__VA_ARGS__)
0027 #define VFIO_AP_DBF_DBG(...)                    \
0028     debug_sprintf_event(vfio_ap_dbf_info, DBF_DEBUG, ##__VA_ARGS__)
0029 
0030 extern debug_info_t *vfio_ap_dbf_info;
0031 
0032 #endif /* VFIO_AP_DEBUG_H */