From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:47836 "EHLO mx0b-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726716AbgDWJKb (ORCPT ); Thu, 23 Apr 2020 05:10:31 -0400 Received: from pps.filterd (m0127361.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 03N95NMj008334 for ; Thu, 23 Apr 2020 05:10:30 -0400 Received: from e06smtp05.uk.ibm.com (e06smtp05.uk.ibm.com [195.75.94.101]) by mx0a-001b2d01.pphosted.com with ESMTP id 30jvfu9e6w-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 23 Apr 2020 05:10:30 -0400 Received: from localhost by e06smtp05.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 23 Apr 2020 10:09:32 +0100 From: Janosch Frank Subject: [PATCH v2 05/10] s390x: smp: Loop if secondary cpu returns into cpu setup again Date: Thu, 23 Apr 2020 05:10:08 -0400 In-Reply-To: <20200423091013.11587-1-frankja@linux.ibm.com> References: <20200423091013.11587-1-frankja@linux.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-Id: <20200423091013.11587-6-frankja@linux.ibm.com> Sender: linux-s390-owner@vger.kernel.org List-ID: To: kvm@vger.kernel.org Cc: thuth@redhat.com, linux-s390@vger.kernel.org, david@redhat.com, borntraeger@de.ibm.com, cohuck@redhat.com Up to now a secondary cpu could have returned from the function it was executing and ending up somewhere in cstart64.S. This was mostly circumvented by an endless loop in the function that it executed. Let's add a loop to the end of the cpu setup, so we don't have to rely on added loops in the tests. Signed-off-by: Janosch Frank Reviewed-by: Cornelia Huck --- s390x/cstart64.S | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/s390x/cstart64.S b/s390x/cstart64.S index 9af6bb3..ecffbe0 100644 --- a/s390x/cstart64.S +++ b/s390x/cstart64.S @@ -161,7 +161,9 @@ smp_cpu_setup_state: lctlg %c0, %c0, GEN_LC_SW_INT_CRS /* We should only go once through cpu setup and not for every restart */ stg %r14, GEN_LC_RESTART_NEW_PSW + 8 - br %r14 + brasl %r14, %r14 + /* If the function returns, just loop here */ +0: j 0 pgm_int: SAVE_REGS -- 2.25.1