From patchwork Thu Jun 22 16:22:23 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Herrenschmidt X-Patchwork-Id: 779613 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3wtn6w6vkbz9s9Y for ; Fri, 23 Jun 2017 02:27:36 +1000 (AEST) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3wtn6w5wSczDr3H for ; Fri, 23 Jun 2017 02:27:36 +1000 (AEST) X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3wtn5d3gKnzDr73 for ; Fri, 23 Jun 2017 02:26:29 +1000 (AEST) Received: from pasglop.austin.ibm.com (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.13.8) with ESMTP id v5MGMaCg024844; Thu, 22 Jun 2017 11:25:46 -0500 From: Benjamin Herrenschmidt To: skiboot@lists.ozlabs.org Date: Thu, 22 Jun 2017 11:22:23 -0500 Message-Id: <20170622162225.26344-22-benh@kernel.crashing.org> X-Mailer: git-send-email 2.9.4 In-Reply-To: <20170622162225.26344-1-benh@kernel.crashing.org> References: <20170622162225.26344-1-benh@kernel.crashing.org> Subject: [Skiboot] [PATCH 22/24] cpu: Make init_hid() local to cpu.c X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" 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 --- 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);