Serialize multiline printks
authorBarret Rhoden <brho@cs.berkeley.edu>
Thu, 19 Jul 2018 19:59:48 +0000 (15:59 -0400)
committerBarret Rhoden <brho@cs.berkeley.edu>
Thu, 19 Jul 2018 19:59:48 +0000 (15:59 -0400)
commitbd1a5d9803b95c110a1fdfc10c2b629fcca3e61d
treec19f1c4e2c2ded03094d5eed627dffb10548d61a
parent08fa82611b848478af8b43e3fc898516c9d9b6c9
Serialize multiline printks

A lot of times the kernel will do a series of printks as part of a larger
call.  Backtraces, tabs for formatting, ASCII giraffes, you name it.

To prevent these prints from interleaving with other (atomic) printks, we
can use the print_lock().  There were at least two cases where the
print_lock() replaced an already-existing spinlock that served a similar
purpose.

Additionally, there were a few places that just lacked a \n, which would be
hard to read.  Those usually needed to be warn() anyway.  And of course
there was a printk("YOU SHOULD PANIC (stuff)"), which is now a panic.

Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
22 files changed:
kern/arch/x86/bitmask.h
kern/arch/x86/ioapic.c
kern/arch/x86/kdebug.c
kern/arch/x86/pmap64.c
kern/arch/x86/trap.c
kern/arch/x86/trap.h
kern/arch/x86/vmm/intel/vmx.c
kern/drivers/dev/kfs.c
kern/drivers/net/mlx4/en_main.c
kern/drivers/net/r8169.c
kern/src/hexdump.c
kern/src/kdebug.c
kern/src/mm.c
kern/src/monitor.c
kern/src/ns/allocb.c
kern/src/ns/convM2D.c
kern/src/ns/sysfile.c
kern/src/ns/tree_file.c
kern/src/process.c
kern/src/rcu_tree_helper.c
kern/src/smp.c
kern/src/syscall.c