diff options
author | Jordan Niethe <jniethe5@gmail.com> | 2019-04-02 10:43:19 +1100 |
---|---|---|
committer | Stewart Smith <stewart@linux.ibm.com> | 2019-05-20 14:21:31 +1000 |
commit | 9825301b3fe615462b718fb427c3382b04114cd7 (patch) | |
tree | bef4854f36e363f3b6e8fd41119a5ac53ff21035 /include | |
parent | 2717c6b8ddcd631dcf27eaed0f76b662be36a569 (diff) | |
download | skiboot-9825301b3fe615462b718fb427c3382b04114cd7.zip skiboot-9825301b3fe615462b718fb427c3382b04114cd7.tar.gz skiboot-9825301b3fe615462b718fb427c3382b04114cd7.tar.bz2 |
core/trace: Change trace buffer size
We want to be able to mmap the trace buffers to be used by the
dump_trace tool. As mmaping is done in terms of pages it makes sense
that the size of the trace buffers should be page aligned. This is
slightly complicated by the space taken up by the header at the
beginning of the trace and the room left for an extra trace entry at the
end of the buffer. Change the size of the buffer itself so that the
entire trace buffer size will be page aligned.
Signed-off-by: Jordan Niethe <jniethe5@gmail.com>
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/trace.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/trace.h b/include/trace.h index 2b65e90..665817a 100644 --- a/include/trace.h +++ b/include/trace.h @@ -21,7 +21,6 @@ #include <lock.h> #include <trace_types.h> -#define TBUF_SZ (1024 * 1024) struct cpu_thread; @@ -35,6 +34,8 @@ struct trace_info { struct tracebuf tb; }; +#define TBUF_SZ ((1024 * 1024) - sizeof(struct trace_info) - sizeof(union trace)) + /* Allocate trace buffers once we know memory topology */ void init_trace_buffers(void); |