[Skiboot] [PATCH 22/24] cpu: Make init_hid() local to cpu.c

Benjamin Herrenschmidt benh at kernel.crashing.org
Fri Jun 23 02:22:23 AEST 2017


No point doing that from init on the main CPU while it's
done already inside cpu.c for secondaries.

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

diff --git a/core/cpu.c b/core/cpu.c
index 8448dfd..a083ed7 100644
--- a/core/cpu.c
+++ b/core/cpu.c
@@ -657,7 +657,7 @@ void trigger_attn(void)
 	__trigger_attn();
 }
 
-void init_hid(void)
+static void init_hid(void)
 {
 	/* attn is enabled even when HV=0, so make sure it's off */
 	disable_attn();
@@ -929,6 +929,8 @@ void cpu_callin(struct cpu_thread *cpu)
 {
 	cpu->state = cpu_state_active;
 	cpu->job_has_no_return = false;
+
+	init_hid();
 }
 
 static void opal_start_thread_job(void *data)
diff --git a/core/init.c b/core/init.c
index 206b1ab..244a78f 100644
--- a/core/init.c
+++ b/core/init.c
@@ -1055,8 +1055,6 @@ void __noreturn __secondary_cpu_entry(void)
 	/* Secondary CPU called in */
 	cpu_callin(cpu);
 
-	init_hid();
-
 	/* Some XIVE setup */
 	xive_cpu_callin(cpu);
 
diff --git a/include/cpu.h b/include/cpu.h
index 2d69699..0cb6389 100644
--- a/include/cpu.h
+++ b/include/cpu.h
@@ -129,7 +129,6 @@ static inline void __nomcount cpu_relax(void)
 void pre_init_boot_cpu(void);
 void init_boot_cpu(void);
 void init_all_cpus(void);
-void init_hid(void);
 
 /* This brings up our secondaries */
 extern void cpu_bringup(void);
-- 
2.9.4



More information about the Skiboot mailing list