diff options
| author | Arnd Bergmann <arnd@arndb.de> | 2012-02-13 06:30:04 +0000 |
|---|---|---|
| committer | Arnd Bergmann <arnd@arndb.de> | 2012-02-13 06:30:04 +0000 |
| commit | eaa5699e3bff8e8335757cf401451ffbd4a88109 (patch) | |
| tree | a5a23148d26f9d083080d94991e8ceed12c0857b /include/linux/dynamic_debug.h | |
| parent | d65b4e98d7ea3038b767b70fe8be959b2913f16d (diff) | |
| parent | da5a70f3519fd6f73ece3eea261a861c9a4d6bbd (diff) | |
Merge branch 'depends/driver-core' into next/soc2
* depends/driver-core: (55 commits)
Documentation: add information for new sysfs soc bus functionality
drivers/base: add bus for System-on-Chip devices
DWC3: use module_pci_driver
PCI: Add helper macro for pci_register_driver boilerplate
w1: Use linux/gpio.h rather than asm/gpio.h
drivers: hv: Increase the number of VCPUs supported in the guest
drivers: hv: kvp: Cleanup the kernel/user protocol
tools: hv: Use hyperv.h to get the KVP definitions
drivers: hv: Cleanup the kvp related state in hyperv.h
ACPI: remove duplicated lines of merging problems with acpi_processor_start
cpufreq/gx: Fix the compile error
drivers: hv: kvp: Move the contents of hv_kvp.h to hyperv.h
drivers: hv: kvp: Add/cleanup connector defines
sysfs: Update the name hash when renaming sysfs entries
PCI/XEN: Fix bug introduced by a recent change
USB/PCI/PCMCIA: Clean up new_id and remove_id sysfs attribute routines
CPU: Introduce ARCH_HAS_CPU_AUTOPROBE and X86 parts
x86: autoload microcode driver on Intel and AMD systems v2
cpufreq: Add support for x86 cpuinfo auto loading v4
X86: Introduce HW-Pstate scattered cpuid feature
...
Diffstat (limited to 'include/linux/dynamic_debug.h')
| -rw-r--r-- | include/linux/dynamic_debug.h | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/include/linux/dynamic_debug.h b/include/linux/dynamic_debug.h index 0564e3c39882..7e3c53a900d8 100644 --- a/include/linux/dynamic_debug.h +++ b/include/linux/dynamic_debug.h @@ -15,20 +15,24 @@ struct _ddebug { const char *function; const char *filename; const char *format; - unsigned int lineno:24; + unsigned int lineno:18; /* * The flags field controls the behaviour at the callsite. * The bits here are changed dynamically when the user * writes commands to <debugfs>/dynamic_debug/control */ -#define _DPRINTK_FLAGS_PRINT (1<<0) /* printk() a message using the format */ +#define _DPRINTK_FLAGS_NONE 0 +#define _DPRINTK_FLAGS_PRINT (1<<0) /* printk() a message using the format */ #define _DPRINTK_FLAGS_INCL_MODNAME (1<<1) #define _DPRINTK_FLAGS_INCL_FUNCNAME (1<<2) #define _DPRINTK_FLAGS_INCL_LINENO (1<<3) #define _DPRINTK_FLAGS_INCL_TID (1<<4) +#if defined DEBUG +#define _DPRINTK_FLAGS_DEFAULT _DPRINTK_FLAGS_PRINT +#else #define _DPRINTK_FLAGS_DEFAULT 0 +#endif unsigned int flags:8; - char enabled; } __attribute__((aligned(8))); @@ -62,21 +66,20 @@ int __dynamic_netdev_dbg(struct _ddebug *descriptor, .format = (fmt), \ .lineno = __LINE__, \ .flags = _DPRINTK_FLAGS_DEFAULT, \ - .enabled = false, \ } #define dynamic_pr_debug(fmt, ...) \ do { \ DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \ - if (unlikely(descriptor.enabled)) \ + if (unlikely(descriptor.flags & _DPRINTK_FLAGS_PRINT)) \ __dynamic_pr_debug(&descriptor, pr_fmt(fmt), \ ##__VA_ARGS__); \ } while (0) #define dynamic_dev_dbg(dev, fmt, ...) \ do { \ - DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \ - if (unlikely(descriptor.enabled)) \ + DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \ + if (unlikely(descriptor.flags & _DPRINTK_FLAGS_PRINT)) \ __dynamic_dev_dbg(&descriptor, dev, fmt, \ ##__VA_ARGS__); \ } while (0) @@ -84,7 +87,7 @@ do { \ #define dynamic_netdev_dbg(dev, fmt, ...) \ do { \ DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \ - if (unlikely(descriptor.enabled)) \ + if (unlikely(descriptor.flags & _DPRINTK_FLAGS_PRINT)) \ __dynamic_netdev_dbg(&descriptor, dev, fmt, \ ##__VA_ARGS__); \ } while (0) |
