From 52409fae3e4b8d16b68b61902fc09075cd97b75d Mon Sep 17 00:00:00 2001 From: Dominik Sliwa Date: Sun, 2 Jul 2017 16:41:37 +0200 Subject: Backports generated from 4.11 kernel Initial commit. Signed-off-by: Dominik Sliwa --- backport-include/linux/dynamic_debug.h | 36 ++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 backport-include/linux/dynamic_debug.h (limited to 'backport-include/linux/dynamic_debug.h') diff --git a/backport-include/linux/dynamic_debug.h b/backport-include/linux/dynamic_debug.h new file mode 100644 index 0000000..1ff204b --- /dev/null +++ b/backport-include/linux/dynamic_debug.h @@ -0,0 +1,36 @@ +#ifndef __BACKPORT_LINUX_DYNAMIC_DEBUG_H +#define __BACKPORT_LINUX_DYNAMIC_DEBUG_H +#include +#include_next + +#if LINUX_VERSION_IS_LESS(3,2,0) +/* backports 07613b0b */ +#if defined(CONFIG_DYNAMIC_DEBUG) +#if (RHEL_RELEASE_CODE < RHEL_RELEASE_VERSION(6,4)) +#define DEFINE_DYNAMIC_DEBUG_METADATA(name, fmt) \ + static struct _ddebug __used __aligned(8) \ + __attribute__((section("__verbose"))) name = { \ + .modname = KBUILD_MODNAME, \ + .function = __func__, \ + .filename = __FILE__, \ + .format = (fmt), \ + .lineno = __LINE__, \ + .flags = _DPRINTK_FLAGS_DEFAULT, \ + .enabled = false, \ + } +#else +#define DEFINE_DYNAMIC_DEBUG_METADATA(name, fmt) \ + static struct _ddebug __used __aligned(8) \ + __attribute__((section("__verbose"))) name = { \ + .modname = KBUILD_MODNAME, \ + .function = __func__, \ + .filename = __FILE__, \ + .format = (fmt), \ + .lineno = __LINE__, \ + .flags = _DPRINTK_FLAGS_DEFAULT, \ + } +#endif /* RHEL_RELEASE_CODE < 6.4 */ +#endif /* defined(CONFIG_DYNAMIC_DEBUG) */ +#endif /* < 3.2 */ + +#endif /* __BACKPORT_LINUX_DYNAMIC_DEBUG_H */ -- cgit v1.2.3