aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2020-09-13 08:52:21 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2020-09-13 08:52:21 -0700
commit2a1a4bee5ef277c7dc2906d9268db61478876288 (patch)
treef2b135b509af654c70cf962b630107a99ae0893e /include
parentMerge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm (diff)
parentRevert "dyndbg: accept query terms like file=bar and module=foo" (diff)
downloadwireguard-linux-2a1a4bee5ef277c7dc2906d9268db61478876288.tar.xz
wireguard-linux-2a1a4bee5ef277c7dc2906d9268db61478876288.zip
Merge tag 'char-misc-5.9-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc
Pull char / misc driver fixes from Greg KH: "Here are a number of small driver fixes for 5.9-rc5 Included in here are: - habanalabs driver fixes - interconnect driver fixes - soundwire driver fixes - dyndbg fixes for reported issues, and then reverts to fix it all up to a sane state. - phy driver fixes All of these have been in linux-next for a while with no reported issues" * tag 'char-misc-5.9-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: Revert "dyndbg: accept query terms like file=bar and module=foo" Revert "dyndbg: fix problem parsing format="foo bar"" scripts/tags.sh: exclude tools directory from tags generation video: fbdev: fix OOB read in vga_8planes_imageblit() dyndbg: fix problem parsing format="foo bar" dyndbg: refine export, rename to dynamic_debug_exec_queries() dyndbg: give %3u width in pr-format, cosmetic only interconnect: qcom: Fix small BW votes being truncated to zero soundwire: fix double free of dangling pointer interconnect: Show bandwidth for disabled paths as zero in debugfs habanalabs: fix report of RAZWI initiator coordinates habanalabs: prevent user buff overflow phy: omap-usb2-phy: disable PHY charger detect phy: qcom-qmp: Use correct values for ipq8074 PCIe Gen2 PHY init soundwire: bus: fix typo in comment on INTSTAT registers phy: qualcomm: fix return value check in qcom_ipq806x_usb_phy_probe() phy: qualcomm: fix platform_no_drv_owner.cocci warnings
Diffstat (limited to 'include')
-rw-r--r--include/linux/dynamic_debug.h20
1 files changed, 16 insertions, 4 deletions
diff --git a/include/linux/dynamic_debug.h b/include/linux/dynamic_debug.h
index aa9ff9e1c0b3..8aa0c7c2608c 100644
--- a/include/linux/dynamic_debug.h
+++ b/include/linux/dynamic_debug.h
@@ -49,6 +49,10 @@ struct _ddebug {
#if defined(CONFIG_DYNAMIC_DEBUG_CORE)
+
+/* exported for module authors to exercise >control */
+int dynamic_debug_exec_queries(const char *query, const char *modname);
+
int ddebug_add_module(struct _ddebug *tab, unsigned int n,
const char *modname);
extern int ddebug_remove_module(const char *mod_name);
@@ -105,7 +109,7 @@ void __dynamic_ibdev_dbg(struct _ddebug *descriptor,
static_branch_unlikely(&descriptor.key.dd_key_false)
#endif
-#else /* !HAVE_JUMP_LABEL */
+#else /* !CONFIG_JUMP_LABEL */
#define _DPRINTK_KEY_INIT
@@ -117,7 +121,7 @@ void __dynamic_ibdev_dbg(struct _ddebug *descriptor,
unlikely(descriptor.flags & _DPRINTK_FLAGS_PRINT)
#endif
-#endif
+#endif /* CONFIG_JUMP_LABEL */
#define __dynamic_func_call(id, fmt, func, ...) do { \
DEFINE_DYNAMIC_DEBUG_METADATA(id, fmt); \
@@ -172,10 +176,11 @@ void __dynamic_ibdev_dbg(struct _ddebug *descriptor,
KERN_DEBUG, prefix_str, prefix_type, \
rowsize, groupsize, buf, len, ascii)
-#else
+#else /* !CONFIG_DYNAMIC_DEBUG_CORE */
#include <linux/string.h>
#include <linux/errno.h>
+#include <linux/printk.h>
static inline int ddebug_add_module(struct _ddebug *tab, unsigned int n,
const char *modname)
@@ -210,6 +215,13 @@ static inline int ddebug_dyndbg_module_param_cb(char *param, char *val,
print_hex_dump(KERN_DEBUG, prefix_str, prefix_type, \
rowsize, groupsize, buf, len, ascii); \
} while (0)
-#endif
+
+static inline int dynamic_debug_exec_queries(const char *query, const char *modname)
+{
+ pr_warn("kernel not built with CONFIG_DYNAMIC_DEBUG_CORE\n");
+ return 0;
+}
+
+#endif /* !CONFIG_DYNAMIC_DEBUG_CORE */
#endif