dynamic_debug: use a single printk() to emit messages
dynamic_debug: use a single printk() to emit messages

We were using KERN_CONT to combine messages with their prefix.  However,
KERN_CONT is not smp safe, in the sense that it can interleave messages.
This interleaving can result in printks coming out at the wrong loglevel.
With the high frequency of printks that dynamic debug can produce this is
not desirable.

So make dynamic_emit_prefix() fill a char buf[64] instead of doing a
printk directly.  If we enable printing out of function, module, line, or
pid info, they are placed in this 64 byte buffer.  In my testing 64 bytes
was enough size to fulfill all requests.  Even if it's not, we can match
up the printk itself to see where it's from, so to me this is no big deal.

[akpm@linux-foundation.org: convert dangerous macro to C]
Signed-off-by: Jason Baron <af9bd1db766a43cb09b647251c97dbddcd2e59dc@redhat.com>
Cc: Arnd Bergmann <f2c659f01951776204a6c5b902787d9019fbeebd@arndb.de>
Signed-off-by: Andrew Morton <5c1e68b099950c134891f0b6e179498a8ebe9cf9@google.com>
Signed-off-by: Greg Kroah-Hartman <4645f7897fd33786a2ee1264d590b3c400559d85@suse.de>

KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs