summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorReza Arbab <arbab@linux.ibm.com>2018-08-01 15:01:14 -0500
committerStewart Smith <stewart@linux.ibm.com>2018-08-06 02:57:42 -0500
commit167fcb20aa9752e19c4f381cdec7baa63e675a38 (patch)
tree0a4b800e5981047526ba20073c7e797caf4df890 /include
parent8a8cc857fa3f4a635cd9ef4acbd5abdfbe7872bd (diff)
downloadblackbird-skiboot-167fcb20aa9752e19c4f381cdec7baa63e675a38.tar.gz
blackbird-skiboot-167fcb20aa9752e19c4f381cdec7baa63e675a38.zip
pci: Move logging macros to pci.h
Move the PCI{TRACE,DBG,NOTICE,ERR} logging macros from pci.c to pci.h so they can be used in other files. Signed-off-by: Reza Arbab <arbab@linux.ibm.com> Reviewed-by: Alistair Popple <alistair@popple.id.au> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
Diffstat (limited to 'include')
-rw-r--r--include/pci.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/include/pci.h b/include/pci.h
index 253dbd8b..c6aa664a 100644
--- a/include/pci.h
+++ b/include/pci.h
@@ -23,6 +23,27 @@
#include <bitmap.h>
#include <ccan/list/list.h>
+#define PCITRACE(_p, _bdfn, fmt, a...) \
+ prlog(PR_TRACE, "PHB#%04x:%02x:%02x.%x " fmt, \
+ (_p)->opal_id, \
+ ((_bdfn) >> 8) & 0xff, \
+ ((_bdfn) >> 3) & 0x1f, (_bdfn) & 0x7, ## a)
+#define PCIDBG(_p, _bdfn, fmt, a...) \
+ prlog(PR_DEBUG, "PHB#%04x:%02x:%02x.%x " fmt, \
+ (_p)->opal_id, \
+ ((_bdfn) >> 8) & 0xff, \
+ ((_bdfn) >> 3) & 0x1f, (_bdfn) & 0x7, ## a)
+#define PCINOTICE(_p, _bdfn, fmt, a...) \
+ prlog(PR_NOTICE, "PHB#%04x:%02x:%02x.%x " fmt, \
+ (_p)->opal_id, \
+ ((_bdfn) >> 8) & 0xff, \
+ ((_bdfn) >> 3) & 0x1f, (_bdfn) & 0x7, ## a)
+#define PCIERR(_p, _bdfn, fmt, a...) \
+ prlog(PR_ERR, "PHB#%04x:%02x:%02x.%x " fmt, \
+ (_p)->opal_id, \
+ ((_bdfn) >> 8) & 0xff, \
+ ((_bdfn) >> 3) & 0x1f, (_bdfn) & 0x7, ## a)
+
struct pci_device;
struct pci_cfg_reg_filter;
OpenPOWER on IntegriCloud