mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
s390/pci: performance statistics and debug infrastructure
Add support for reading the PCI function measurement block counters provided by the hypervisor. Add two s390 debug features, one for critical errors and one for tracing and provide wrappers to log data. Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
This commit is contained in:
committed by
Martin Schwidefsky
parent
7313264b89
commit
d0b0885316
36
arch/s390/include/asm/pci_debug.h
Normal file
36
arch/s390/include/asm/pci_debug.h
Normal file
@@ -0,0 +1,36 @@
|
||||
#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;
|
||||
|
||||
#ifdef CONFIG_PCI_DEBUG
|
||||
#define zpci_dbg(fmt, args...) \
|
||||
do { \
|
||||
if (pci_debug_msg_id->level >= 2) \
|
||||
debug_sprintf_event(pci_debug_msg_id, 2, fmt , ## args);\
|
||||
} while (0)
|
||||
|
||||
#else /* !CONFIG_PCI_DEBUG */
|
||||
#define zpci_dbg(fmt, args...) do { } while (0)
|
||||
#endif
|
||||
|
||||
#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
|
||||
Reference in New Issue
Block a user