diff options
author | Jordan Niethe <jniethe5@gmail.com> | 2019-04-02 10:43:20 +1100 |
---|---|---|
committer | Stewart Smith <stewart@linux.ibm.com> | 2019-05-20 14:21:47 +1000 |
commit | 8a566ff62037b574beb529e3b801916062e9234d (patch) | |
tree | 2f0de66919ea351b7132c742073a5269aba63976 /core/trace.c | |
parent | 9825301b3fe615462b718fb427c3382b04114cd7 (diff) | |
download | skiboot-8a566ff62037b574beb529e3b801916062e9234d.zip skiboot-8a566ff62037b574beb529e3b801916062e9234d.tar.gz skiboot-8a566ff62037b574beb529e3b801916062e9234d.tar.bz2 |
core/trace: Add pir number to debug_descriptor
The names given to the trace buffers when exported to sysfs should show
what cpu they are associated with to make it easier to understand there
output. The debug_descriptor currently stores the address and length of
each trace buffer and this is used for adding properties to the device
tree. Extend debug_descriptor to include a cpu associated with each
trace. This will be used for creating properties in the device-tree
under /ibm,opal/firmware/exports/.
Signed-off-by: Jordan Niethe <jniethe5@gmail.com>
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
Diffstat (limited to 'core/trace.c')
-rw-r--r-- | core/trace.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/core/trace.c b/core/trace.c index 4b7d570..169282e 100644 --- a/core/trace.c +++ b/core/trace.c @@ -183,7 +183,7 @@ static void trace_add_dt_props(void) dt_add_property_u64(opal_node, "ibm,opal-trace-mask", tmask); } -static void trace_add_desc(struct trace_info *t, uint64_t size) +static void trace_add_desc(struct trace_info *t, uint64_t size, uint16_t pir) { unsigned int i = debug_descriptor.num_traces; @@ -196,6 +196,7 @@ static void trace_add_desc(struct trace_info *t, uint64_t size) debug_descriptor.trace_phys[i] = (uint64_t)t; debug_descriptor.trace_tce[i] = 0; /* populated later */ debug_descriptor.trace_size[i] = size; + debug_descriptor.trace_pir[i] = pir; } /* Allocate trace buffers once we know memory topology */ @@ -206,7 +207,7 @@ void init_trace_buffers(void) uint64_t size; /* Boot the boot trace in the debug descriptor */ - trace_add_desc(any, sizeof(boot_tracebuf)); + trace_add_desc(any, sizeof(boot_tracebuf), this_cpu()->pir); /* Allocate a trace buffer for each primary cpu. */ for_each_cpu(t) { @@ -223,7 +224,7 @@ void init_trace_buffers(void) t->trace->tb.max_size = cpu_to_be32(MAX_SIZE); t->trace->tb.buf_size = cpu_to_be64(TBUF_SZ); trace_add_desc(any, sizeof(t->trace->tb) + - tracebuf_extra()); + tracebuf_extra(), t->pir); } else prerror("TRACE: cpu 0x%x allocation failed\n", t->pir); } |