The patch titled Subject: linux/device.h: use unique identifier for each struct _ddebug has been removed from the -mm tree. Its filename was linux-deviceh-use-unique-identifier-for-each-struct-_ddebug.patch This patch was dropped because an updated version will be merged ------------------------------------------------------ From: Rasmus Villemoes <linux@xxxxxxxxxxxxxxxxxx> Subject: linux/device.h: use unique identifier for each struct _ddebug Patch series "implement DYNAMIC_DEBUG_RELATIVE_POINTERS". Similar to CONFIG_GENERIC_BUG_RELATIVE_POINTERS that replaces (8 byte) const char* members by (4 byte) signed offsets from the bug_entry, this implements the similar thing for struct _ddebug, the descriptors underlying pr_debug() and friends in a CONFIG_DYNAMIC_DEBUG kernel. Since struct _ddebug has four string members, we save 16 byte per instance. The total savings seem to be comparable to what is saved by an architecture selecting GENERIC_BUG_RELATIVE_POINTERS (see patch 8 for some numbers for a common distro config). While refreshing these patches, which were orignally just targeted at x86-64, it occurred to me that despite the implementation relying on inline asm, there's nothing x86 specific about it, and indeed it seems to work out-of-the-box for ppc64 and arm64 as well, but those have only been compile-tested. The first 6 patches are rather pedestrian preparations. The fun stuff is in patch 7, and the remaining three patches are just the minimal boilerplate to hook up the config option and asm-generic header on the three architectures. This patch (of 10): Changes on x86-64 later in this series require that all struct _ddebug descriptors in a translation unit uses distinct identifiers. Realize that for dev_dbg_ratelimited by generating such an identifier via __UNIQUE_ID and pass that to an extra level of macros. No functional change. Link: http://lkml.kernel.org/r/20190409212517.7321-2-linux@xxxxxxxxxxxxxxxxxx Signed-off-by: Rasmus Villemoes <linux@xxxxxxxxxxxxxxxxxx> Reviewed-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> Acked-by: Jason Baron <jbaron@xxxxxxxxxx> Cc: Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx> Cc: Catalin Marinas <catalin.marinas@xxxxxxx> Cc: Christophe Leroy <christophe.leroy@xxxxxx> Cc: David Miller <davem@xxxxxxxxxxxxx> Cc: "H. Peter Anvin" <hpa@xxxxxxxxx> Cc: Ingo Molnar <mingo@xxxxxxx> Cc: Michael Ellerman <mpe@xxxxxxxxxxxxxx> Cc: Paul Mackerras <paulus@xxxxxxxxx> Cc: Petr Mladek <pmladek@xxxxxxxx> Cc: Sergey Senozhatsky <sergey.senozhatsky@xxxxxxxxx> Cc: Steven Rostedt <rostedt@xxxxxxxxxxx> Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx> Cc: Will Deacon <will.deacon@xxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- include/linux/device.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- a/include/linux/device.h~linux-deviceh-use-unique-identifier-for-each-struct-_ddebug +++ a/include/linux/device.h @@ -1563,7 +1563,7 @@ do { \ dev_level_ratelimited(dev_info, dev, fmt, ##__VA_ARGS__) #if defined(CONFIG_DYNAMIC_DEBUG) /* descriptor check is first to prevent flooding with "callbacks suppressed" */ -#define dev_dbg_ratelimited(dev, fmt, ...) \ +#define _dev_dbg_ratelimited(descriptor, dev, fmt, ...) \ do { \ static DEFINE_RATELIMIT_STATE(_rs, \ DEFAULT_RATELIMIT_INTERVAL, \ @@ -1574,6 +1574,8 @@ do { \ __dynamic_dev_dbg(&descriptor, dev, dev_fmt(fmt), \ ##__VA_ARGS__); \ } while (0) +#define dev_dbg_ratelimited(dev, fmt, ...) \ + _dev_dbg_ratelimited(__UNIQUE_ID(ddebug), dev, fmt, ##__VA_ARGS__) #elif defined(DEBUG) #define dev_dbg_ratelimited(dev, fmt, ...) \ do { \ _ Patches currently in -mm which might be from linux@xxxxxxxxxxxxxxxxxx are linux-neth-use-unique-identifier-for-each-struct-_ddebug.patch linux-printkh-use-unique-identifier-for-each-struct-_ddebug.patch dynamic_debug-introduce-accessors-for-string-members-of-struct-_ddebug.patch dynamic_debug-drop-use-of-bitfields-in-struct-_ddebug.patch