[Skiboot] [PATCH 06/34] Disable mcount on some early functions

Benjamin Herrenschmidt benh at kernel.crashing.org
Sun Jul 24 09:27:00 AEST 2016


It doesn't work well to call it before the boot CPU structure
is initialized.

Signed-off-by: Benjamin Herrenschmidt <benh at kernel.crashing.org>
---
 core/cpu.c  |  2 +-
 core/init.c | 14 +++++++-------
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/core/cpu.c b/core/cpu.c
index b525573..a3e96b1 100644
--- a/core/cpu.c
+++ b/core/cpu.c
@@ -438,7 +438,7 @@ void init_hid(void)
 	disable_attn();
 }
 
-void pre_init_boot_cpu(void)
+void __nomcount pre_init_boot_cpu(void)
 {
 	struct cpu_thread *cpu = this_cpu();
 
diff --git a/core/init.c b/core/init.c
index ca3ad55..0a25d95 100644
--- a/core/init.c
+++ b/core/init.c
@@ -563,12 +563,9 @@ static void setup_branch_null_catcher(void)
 	memcpy(0, bn, 16);
 }
 
-/* Called from head.S, thus no prototype. */
-void __noreturn main_cpu_entry(const void *fdt, u32 master_cpu);
-
 typedef void (*ctorcall_t)(void);
 
-static void do_ctors(void)
+static void __nomcount do_ctors(void)
 {
 	extern ctorcall_t __ctors_start[], __ctors_end[];
 	ctorcall_t *call;
@@ -577,7 +574,10 @@ static void do_ctors(void)
 		(*call)();
 }
 
-void __noreturn main_cpu_entry(const void *fdt, u32 master_cpu)
+/* Called from head.S, thus no prototype. */
+void main_cpu_entry(const void *fdt, u32 master_cpu);
+
+void __noreturn __nomcount main_cpu_entry(const void *fdt, u32 master_cpu)
 {
 	/*
 	 * WARNING: At this point. the timebases have
@@ -848,9 +848,9 @@ void __noreturn __secondary_cpu_entry(void)
 }
 
 /* Called from head.S, thus no prototype. */
-void __noreturn secondary_cpu_entry(void);
+void secondary_cpu_entry(void);
 
-void __noreturn secondary_cpu_entry(void)
+void __noreturn __nomcount secondary_cpu_entry(void)
 {
 	struct cpu_thread *cpu = this_cpu();
 
-- 
2.7.4



More information about the Skiboot mailing list