pci_debug.h 676 B

1234567891011121314151617181920212223242526272829
  1. #ifndef _S390_ASM_PCI_DEBUG_H
  2. #define _S390_ASM_PCI_DEBUG_H
  3. #include <asm/debug.h>
  4. extern debug_info_t *pci_debug_msg_id;
  5. extern debug_info_t *pci_debug_err_id;
  6. #define zpci_dbg(imp, fmt, args...) \
  7. debug_sprintf_event(pci_debug_msg_id, imp, fmt, ##args)
  8. #define zpci_err(text...) \
  9. do { \
  10. char debug_buffer[16]; \
  11. snprintf(debug_buffer, 16, text); \
  12. debug_text_event(pci_debug_err_id, 0, debug_buffer); \
  13. } while (0)
  14. static inline void zpci_err_hex(void *addr, int len)
  15. {
  16. while (len > 0) {
  17. debug_event(pci_debug_err_id, 0, (void *) addr, len);
  18. len -= pci_debug_err_id->buf_size;
  19. addr += pci_debug_err_id->buf_size;
  20. }
  21. }
  22. #endif