#ifndef _DYNAMIC_DEBUG_H
#define _DYNAMIC_DEBUG_H
#if defined(CONFIG_JUMP_LABEL)
#include <linux/jump_label.h>
#endif
#include <linux/build_bug.h>
struct _ddebug { … } __attribute__((aligned …));
enum class_map_type { … };
struct ddebug_class_map { … };
#define DECLARE_DYNDBG_CLASSMAP(_var, _maptype, _base, ...) …
#define NUM_TYPE_ARGS(eltype, ...) …
struct _ddebug_info { … };
struct ddebug_class_param { … };
#if defined(CONFIG_DYNAMIC_DEBUG) || \
(defined(CONFIG_DYNAMIC_DEBUG_CORE) && defined(DYNAMIC_DEBUG_MODULE))
extern __printf(2, 3)
void __dynamic_pr_debug(struct _ddebug *descriptor, const char *fmt, ...);
struct device;
extern __printf(3, 4)
void __dynamic_dev_dbg(struct _ddebug *descriptor, const struct device *dev,
const char *fmt, ...);
struct net_device;
extern __printf(3, 4)
void __dynamic_netdev_dbg(struct _ddebug *descriptor,
const struct net_device *dev,
const char *fmt, ...);
struct ib_device;
extern __printf(3, 4)
void __dynamic_ibdev_dbg(struct _ddebug *descriptor,
const struct ib_device *ibdev,
const char *fmt, ...);
#define DEFINE_DYNAMIC_DEBUG_METADATA_CLS(name, cls, fmt) …
#define DEFINE_DYNAMIC_DEBUG_METADATA(name, fmt) …
#ifdef CONFIG_JUMP_LABEL
#ifdef DEBUG
#define _DPRINTK_KEY_INIT …
#define DYNAMIC_DEBUG_BRANCH …
#else
#define _DPRINTK_KEY_INIT …
#define DYNAMIC_DEBUG_BRANCH(descriptor) …
#endif
#else
#define _DPRINTK_KEY_INIT
#ifdef DEBUG
#define DYNAMIC_DEBUG_BRANCH …
#else
#define DYNAMIC_DEBUG_BRANCH …
#endif
#endif
#define __dynamic_func_call_cls(id, cls, fmt, func, ...) …
#define __dynamic_func_call(id, fmt, func, ...) …
#define __dynamic_func_call_cls_no_desc(id, cls, fmt, func, ...) …
#define __dynamic_func_call_no_desc(id, fmt, func, ...) …
#define _dynamic_func_call_cls(cls, fmt, func, ...) …
#define _dynamic_func_call(fmt, func, ...) …
#define _dynamic_func_call_cls_no_desc(cls, fmt, func, ...) …
#define _dynamic_func_call_no_desc(fmt, func, ...) …
#define dynamic_pr_debug_cls(cls, fmt, ...) …
#define dynamic_pr_debug(fmt, ...) …
#define dynamic_dev_dbg(dev, fmt, ...) …
#define dynamic_netdev_dbg(dev, fmt, ...) …
#define dynamic_ibdev_dbg(dev, fmt, ...) …
#define dynamic_hex_dump(prefix_str, prefix_type, rowsize, \
groupsize, buf, len, ascii) …
#define __pr_debug_cls(cls, fmt, ...) …
#else
#include <linux/string.h>
#include <linux/errno.h>
#include <linux/printk.h>
#define DEFINE_DYNAMIC_DEBUG_METADATA …
#define DYNAMIC_DEBUG_BRANCH …
#define dynamic_pr_debug …
#define dynamic_dev_dbg …
#define dynamic_hex_dump …
#endif
#ifdef CONFIG_DYNAMIC_DEBUG_CORE
extern int ddebug_dyndbg_module_param_cb(char *param, char *val,
const char *modname);
struct kernel_param;
int param_set_dyndbg_classes(const char *instr, const struct kernel_param *kp);
int param_get_dyndbg_classes(char *buffer, const struct kernel_param *kp);
#else
static inline int ddebug_dyndbg_module_param_cb(char *param, char *val,
const char *modname)
{
if (!strcmp(param, "dyndbg")) {
printk(KERN_WARNING "dyndbg param is supported only in "
"CONFIG_DYNAMIC_DEBUG builds\n");
return 0;
}
return -EINVAL;
}
struct kernel_param;
static inline int param_set_dyndbg_classes(const char *instr, const struct kernel_param *kp)
{ return 0; }
static inline int param_get_dyndbg_classes(char *buffer, const struct kernel_param *kp)
{ return 0; }
#endif
extern const struct kernel_param_ops param_ops_dyndbg_classes;
#endif