cio_debug.h 734 B

1234567891011121314151617181920212223242526272829
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef CIO_DEBUG_H
  3. #define CIO_DEBUG_H
  4. #include <asm/debug.h>
  5. /* for use of debug feature */
  6. extern debug_info_t *cio_debug_msg_id;
  7. extern debug_info_t *cio_debug_trace_id;
  8. extern debug_info_t *cio_debug_crw_id;
  9. #define CIO_TRACE_EVENT(imp, txt) do { \
  10. debug_text_event(cio_debug_trace_id, imp, txt); \
  11. } while (0)
  12. #define CIO_MSG_EVENT(imp, args...) do { \
  13. debug_sprintf_event(cio_debug_msg_id, imp , ##args); \
  14. } while (0)
  15. #define CIO_CRW_EVENT(imp, args...) do { \
  16. debug_sprintf_event(cio_debug_crw_id, imp , ##args); \
  17. } while (0)
  18. static inline void CIO_HEX_EVENT(int level, void *data, int length)
  19. {
  20. debug_event(cio_debug_trace_id, level, data, length);
  21. }
  22. #endif