mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-28 11:18:45 +07:00
af0b129294
Add debugfs entries regardless of CONFIG_PCI_DEBUG. Reviewed-by: Gerald Schaefer <gerald.schaefer@de.ibm.com> Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
29 lines
676 B
C
29 lines
676 B
C
#ifndef _S390_ASM_PCI_DEBUG_H
|
|
#define _S390_ASM_PCI_DEBUG_H
|
|
|
|
#include <asm/debug.h>
|
|
|
|
extern debug_info_t *pci_debug_msg_id;
|
|
extern debug_info_t *pci_debug_err_id;
|
|
|
|
#define zpci_dbg(imp, fmt, args...) \
|
|
debug_sprintf_event(pci_debug_msg_id, imp, fmt, ##args)
|
|
|
|
#define zpci_err(text...) \
|
|
do { \
|
|
char debug_buffer[16]; \
|
|
snprintf(debug_buffer, 16, text); \
|
|
debug_text_event(pci_debug_err_id, 0, debug_buffer); \
|
|
} while (0)
|
|
|
|
static inline void zpci_err_hex(void *addr, int len)
|
|
{
|
|
while (len > 0) {
|
|
debug_event(pci_debug_err_id, 0, (void *) addr, len);
|
|
len -= pci_debug_err_id->buf_size;
|
|
addr += pci_debug_err_id->buf_size;
|
|
}
|
|
}
|
|
|
|
#endif
|