xref: /linux/drivers/s390/crypto/vfio_ap_debug.h (revision 4f2c0a4acffbec01079c28f839422e64ddeff004)
1*a084c44eSTony Krowiak /* SPDX-License-Identifier: GPL-2.0 */
2*a084c44eSTony Krowiak /*
3*a084c44eSTony Krowiak  *  Copyright IBM Corp. 2022
4*a084c44eSTony Krowiak  *
5*a084c44eSTony Krowiak  * Author(s): Tony Krowiak <akrowiak@linux.ibm.com>
6*a084c44eSTony Krowiak  */
7*a084c44eSTony Krowiak #ifndef VFIO_AP_DEBUG_H
8*a084c44eSTony Krowiak #define VFIO_AP_DEBUG_H
9*a084c44eSTony Krowiak 
10*a084c44eSTony Krowiak #include <asm/debug.h>
11*a084c44eSTony Krowiak 
12*a084c44eSTony Krowiak #define DBF_ERR		3	/* error conditions   */
13*a084c44eSTony Krowiak #define DBF_WARN	4	/* warning conditions */
14*a084c44eSTony Krowiak #define DBF_INFO	5	/* informational      */
15*a084c44eSTony Krowiak #define DBF_DEBUG	6	/* for debugging only */
16*a084c44eSTony Krowiak 
17*a084c44eSTony Krowiak #define DBF_MAX_SPRINTF_ARGS 10
18*a084c44eSTony Krowiak 
19*a084c44eSTony Krowiak #define VFIO_AP_DBF(...)					\
20*a084c44eSTony Krowiak 	debug_sprintf_event(vfio_ap_dbf_info, ##__VA_ARGS__)
21*a084c44eSTony Krowiak #define VFIO_AP_DBF_ERR(...)					\
22*a084c44eSTony Krowiak 	debug_sprintf_event(vfio_ap_dbf_info, DBF_ERR, ##__VA_ARGS__)
23*a084c44eSTony Krowiak #define VFIO_AP_DBF_WARN(...)					\
24*a084c44eSTony Krowiak 	debug_sprintf_event(vfio_ap_dbf_info, DBF_WARN, ##__VA_ARGS__)
25*a084c44eSTony Krowiak #define VFIO_AP_DBF_INFO(...)					\
26*a084c44eSTony Krowiak 	debug_sprintf_event(vfio_ap_dbf_info, DBF_INFO, ##__VA_ARGS__)
27*a084c44eSTony Krowiak #define VFIO_AP_DBF_DBG(...)					\
28*a084c44eSTony Krowiak 	debug_sprintf_event(vfio_ap_dbf_info, DBF_DEBUG, ##__VA_ARGS__)
29*a084c44eSTony Krowiak 
30*a084c44eSTony Krowiak extern debug_info_t *vfio_ap_dbf_info;
31*a084c44eSTony Krowiak 
32*a084c44eSTony Krowiak #endif /* VFIO_AP_DEBUG_H */
33