[Skiboot] [PATCH] Move boot_tracebuf to BSS
Stewart Smith
stewart at linux.vnet.ibm.com
Mon Jun 1 17:10:38 AEST 2015
this saves 65720 bytes from skiboot.lid
Signed-off-by: Stewart Smith <stewart at linux.vnet.ibm.com>
---
core/trace.c | 15 +++++----------
1 file changed, 5 insertions(+), 10 deletions(-)
diff --git a/core/trace.c b/core/trace.c
index 6dc1e65..15e505a 100644
--- a/core/trace.c
+++ b/core/trace.c
@@ -35,19 +35,14 @@
static struct {
struct trace_info trace_info;
char buf[BOOT_TBUF_SZ + MAX_SIZE];
-} boot_tracebuf __section(".data.boot_trace") = {
- .trace_info = {
- .lock = LOCK_UNLOCKED,
- .tb = {
- .mask = BOOT_TBUF_SZ - 1,
- .max_size = MAX_SIZE
- },
- },
- .buf = { 0 }
-};
+} boot_tracebuf;
void init_boot_tracebuf(struct cpu_thread *boot_cpu)
{
+ init_lock(&boot_tracebuf.trace_info.lock);
+ boot_tracebuf.trace_info.tb.mask = BOOT_TBUF_SZ - 1;
+ boot_tracebuf.trace_info.tb.max_size = MAX_SIZE;
+
boot_cpu->trace = &boot_tracebuf.trace_info;
}
--
1.7.10.4
More information about the Skiboot
mailing list