ap_debug.h 649 B

12345678910111213141516171819202122232425262728
  1. /*
  2. * Copyright IBM Corp. 2016
  3. * Author(s): Harald Freudenberger <freude@de.ibm.com>
  4. */
  5. #ifndef AP_DEBUG_H
  6. #define AP_DEBUG_H
  7. #include <asm/debug.h>
  8. #define DBF_ERR 3 /* error conditions */
  9. #define DBF_WARN 4 /* warning conditions */
  10. #define DBF_INFO 5 /* informational */
  11. #define DBF_DEBUG 6 /* for debugging only */
  12. #define RC2ERR(rc) ((rc) ? DBF_ERR : DBF_INFO)
  13. #define RC2WARN(rc) ((rc) ? DBF_WARN : DBF_INFO)
  14. #define DBF_MAX_SPRINTF_ARGS 5
  15. #define AP_DBF(...) \
  16. debug_sprintf_event(ap_dbf_info, ##__VA_ARGS__)
  17. extern debug_info_t *ap_dbf_info;
  18. int ap_debug_init(void);
  19. void ap_debug_exit(void);
  20. #endif /* AP_DEBUG_H */