diff options
| author | Gal Pressman <galpress@amazon.com> | 2019-05-01 06:48:13 -0400 |
|---|---|---|
| committer | Doug Ledford <dledford@redhat.com> | 2019-05-01 12:29:28 -0400 |
| commit | 923abb9d797ba078f4e9eb3734dd71be5f567a2a (patch) | |
| tree | 31db9356a4c325ce3e1e106bb64b436b639a2e53 /include/linux/dynamic_debug.h | |
| parent | b9b0f34531e0f8ff7fd0b78adfbc0e8209900f83 (diff) | |
RDMA/core: Introduce RDMA subsystem ibdev_* print functions
Similarly to dev/netdev/etc printk helpers, add standard printk helpers
for the RDMA subsystem.
Example output:
efa 0000:00:06.0 efa_0: Hello World!
efa_0: Hello World! (no parent device set)
(NULL ib_device): Hello World! (ibdev is NULL)
Cc: Jason Baron <jbaron@akamai.com>
Suggested-by: Jason Gunthorpe <jgg@ziepe.ca>
Suggested-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Gal Pressman <galpress@amazon.com>
Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
Reviewed-by: Shiraz Saleem <shiraz.saleem@intel.com>
Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'include/linux/dynamic_debug.h')
| -rw-r--r-- | include/linux/dynamic_debug.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/dynamic_debug.h b/include/linux/dynamic_debug.h index c2be029b9b53..6c809440f319 100644 --- a/include/linux/dynamic_debug.h +++ b/include/linux/dynamic_debug.h | |||
| @@ -71,6 +71,13 @@ void __dynamic_netdev_dbg(struct _ddebug *descriptor, | |||
| 71 | const struct net_device *dev, | 71 | const struct net_device *dev, |
| 72 | const char *fmt, ...); | 72 | const char *fmt, ...); |
| 73 | 73 | ||
| 74 | struct ib_device; | ||
| 75 | |||
| 76 | extern __printf(3, 4) | ||
| 77 | void __dynamic_ibdev_dbg(struct _ddebug *descriptor, | ||
| 78 | const struct ib_device *ibdev, | ||
| 79 | const char *fmt, ...); | ||
| 80 | |||
| 74 | #define DEFINE_DYNAMIC_DEBUG_METADATA(name, fmt) \ | 81 | #define DEFINE_DYNAMIC_DEBUG_METADATA(name, fmt) \ |
| 75 | static struct _ddebug __aligned(8) \ | 82 | static struct _ddebug __aligned(8) \ |
| 76 | __attribute__((section("__verbose"))) name = { \ | 83 | __attribute__((section("__verbose"))) name = { \ |
| @@ -154,6 +161,10 @@ void __dynamic_netdev_dbg(struct _ddebug *descriptor, | |||
| 154 | _dynamic_func_call(fmt, __dynamic_netdev_dbg, \ | 161 | _dynamic_func_call(fmt, __dynamic_netdev_dbg, \ |
| 155 | dev, fmt, ##__VA_ARGS__) | 162 | dev, fmt, ##__VA_ARGS__) |
| 156 | 163 | ||
| 164 | #define dynamic_ibdev_dbg(dev, fmt, ...) \ | ||
| 165 | _dynamic_func_call(fmt, __dynamic_ibdev_dbg, \ | ||
| 166 | dev, fmt, ##__VA_ARGS__) | ||
| 167 | |||
| 157 | #define dynamic_hex_dump(prefix_str, prefix_type, rowsize, \ | 168 | #define dynamic_hex_dump(prefix_str, prefix_type, rowsize, \ |
| 158 | groupsize, buf, len, ascii) \ | 169 | groupsize, buf, len, ascii) \ |
| 159 | _dynamic_func_call_no_desc(__builtin_constant_p(prefix_str) ? prefix_str : "hexdump", \ | 170 | _dynamic_func_call_no_desc(__builtin_constant_p(prefix_str) ? prefix_str : "hexdump", \ |
