Check booting during trace_printk()
authorBarret Rhoden <brho@cs.berkeley.edu>
Sun, 6 Nov 2016 16:18:52 +0000 (11:18 -0500)
committerBarret Rhoden <brho@cs.berkeley.edu>
Tue, 29 Nov 2016 16:27:40 +0000 (11:27 -0500)
commitf20d41b22b6b605a2e0299bb9cd371f2b168060e
tree8f72e16e48c7064f98758728b04ea7be88107608
parent8fafee9413e4810aab069421af70f9835f5eef67
Check booting during trace_printk()

Instead of num_cores.  This is safer, in case we set num_cores before
various per-cpu structures are set up.

The reason for this is that the memory allocator will need to know about
num_cores, and that will happen very early in the booting process.

trace_printk() will be fine if it just uses the boot object instead of
per-cpu objects during boot.

Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
kern/drivers/dev/kprof.c