From 333e1b4f6db07f8c27fc3f55d4fce12c0877b3b0 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sat, 1 Jun 2013 18:00:09 +0200 Subject: [PATCH] backports: fix DEFINE_DYNAMIC_DEBUG_METADATA for RHEL 6.4 The struct _ddebug does not have a enabled attribute in RHEL 6.4. Signed-off-by: Hauke Mehrtens Signed-off-by: Luis R. Rodriguez --- backport/backport-include/linux/dynamic_debug.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/backport/backport-include/linux/dynamic_debug.h b/backport/backport-include/linux/dynamic_debug.h index 00ab160d6b4c..eb6fa8177d5e 100644 --- a/backport/backport-include/linux/dynamic_debug.h +++ b/backport/backport-include/linux/dynamic_debug.h @@ -8,6 +8,7 @@ #if LINUX_VERSION_CODE < KERNEL_VERSION(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 = { \ @@ -19,6 +20,18 @@ .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 */ -- 2.30.2