• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #ifndef _S390_ASM_PCI_DEBUG_H
2 #define _S390_ASM_PCI_DEBUG_H
3 
4 #include <asm/debug.h>
5 
6 extern debug_info_t *pci_debug_msg_id;
7 extern debug_info_t *pci_debug_err_id;
8 
9 #ifdef CONFIG_PCI_DEBUG
10 #define zpci_dbg(imp, fmt, args...)				\
11 	debug_sprintf_event(pci_debug_msg_id, imp, fmt, ##args)
12 
13 #else /* !CONFIG_PCI_DEBUG */
14 #define zpci_dbg(imp, fmt, args...) do { } while (0)
15 #endif
16 
17 #define zpci_err(text...)							\
18 	do {									\
19 		char debug_buffer[16];						\
20 		snprintf(debug_buffer, 16, text);				\
21 		debug_text_event(pci_debug_err_id, 0, debug_buffer);		\
22 	} while (0)
23 
zpci_err_hex(void * addr,int len)24 static inline void zpci_err_hex(void *addr, int len)
25 {
26 	while (len > 0) {
27 		debug_event(pci_debug_err_id, 0, (void *) addr, len);
28 		len -= pci_debug_err_id->buf_size;
29 		addr += pci_debug_err_id->buf_size;
30 	}
31 }
32 
33 #endif
34