-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel…
…/git/s390/linux Pull s390 update #2 from Martin Schwidefsky: "The main patch is the function measurement blocks extension for PCI to do performance statistics and help with debugging. The other patch is a small cleanup in ccwdev.h." * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390/ccwdev: Include asm/schid.h. s390/pci: performance statistics and debug infrastructure
- Loading branch information
Showing
9 changed files
with
350 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.