vfio_ap_debug.h 967 B

1234567891011121314151617181920212223242526272829303132
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /*
  3. * Copyright IBM Corp. 2022
  4. *
  5. * Author(s): Tony Krowiak <[email protected]>
  6. */
  7. #ifndef VFIO_AP_DEBUG_H
  8. #define VFIO_AP_DEBUG_H
  9. #include <asm/debug.h>
  10. #define DBF_ERR 3 /* error conditions */
  11. #define DBF_WARN 4 /* warning conditions */
  12. #define DBF_INFO 5 /* informational */
  13. #define DBF_DEBUG 6 /* for debugging only */
  14. #define DBF_MAX_SPRINTF_ARGS 10
  15. #define VFIO_AP_DBF(...) \
  16. debug_sprintf_event(vfio_ap_dbf_info, ##__VA_ARGS__)
  17. #define VFIO_AP_DBF_ERR(...) \
  18. debug_sprintf_event(vfio_ap_dbf_info, DBF_ERR, ##__VA_ARGS__)
  19. #define VFIO_AP_DBF_WARN(...) \
  20. debug_sprintf_event(vfio_ap_dbf_info, DBF_WARN, ##__VA_ARGS__)
  21. #define VFIO_AP_DBF_INFO(...) \
  22. debug_sprintf_event(vfio_ap_dbf_info, DBF_INFO, ##__VA_ARGS__)
  23. #define VFIO_AP_DBF_DBG(...) \
  24. debug_sprintf_event(vfio_ap_dbf_info, DBF_DEBUG, ##__VA_ARGS__)
  25. extern debug_info_t *vfio_ap_dbf_info;
  26. #endif /* VFIO_AP_DEBUG_H */