From patchwork Wed Apr 29 14:35:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Janosch Frank X-Patchwork-Id: 11517705 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id EDD8492C for ; Wed, 29 Apr 2020 14:36:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E240D20B80 for ; Wed, 29 Apr 2020 14:36:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727121AbgD2OgO (ORCPT ); Wed, 29 Apr 2020 10:36:14 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:24700 "EHLO mx0b-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726348AbgD2OgO (ORCPT ); Wed, 29 Apr 2020 10:36:14 -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 03TEYBlV158435; Wed, 29 Apr 2020 10:36:13 -0400 Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 30q802pues-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 29 Apr 2020 10:36:10 -0400 Received: from m0127361.ppops.net (m0127361.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 03TEYiw3159407; Wed, 29 Apr 2020 10:36:02 -0400 Received: from ppma05fra.de.ibm.com (6c.4a.5195.ip4.static.sl-reverse.com [149.81.74.108]) by mx0a-001b2d01.pphosted.com with ESMTP id 30q802pu5v-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 29 Apr 2020 10:36:02 -0400 Received: from pps.filterd (ppma05fra.de.ibm.com [127.0.0.1]) by ppma05fra.de.ibm.com (8.16.0.27/8.16.0.27) with SMTP id 03TEUVE5018511; Wed, 29 Apr 2020 14:35:35 GMT Received: from b06cxnps3075.portsmouth.uk.ibm.com (d06relay10.portsmouth.uk.ibm.com [9.149.109.195]) by ppma05fra.de.ibm.com with ESMTP id 30mcu51v40-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 29 Apr 2020 14:35:35 +0000 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 03TEZUx139387166 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 29 Apr 2020 14:35:30 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6F7874C052; Wed, 29 Apr 2020 14:35:30 +0000 (GMT) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B60B94C04A; Wed, 29 Apr 2020 14:35:29 +0000 (GMT) Received: from linux01.pok.stglabs.ibm.com (unknown [9.114.17.81]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTP; Wed, 29 Apr 2020 14:35:29 +0000 (GMT) From: Janosch Frank To: kvm@vger.kernel.org Cc: thuth@redhat.com, linux-s390@vger.kernel.org, david@redhat.com, borntraeger@de.ibm.com, cohuck@redhat.com Subject: [PATCH v3 06/10] s390x: smp: Remove unneeded cpu loops Date: Wed, 29 Apr 2020 10:35:14 -0400 Message-Id: <20200429143518.1360468-7-frankja@linux.ibm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200429143518.1360468-1-frankja@linux.ibm.com> References: <20200429143518.1360468-1-frankja@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138,18.0.676 definitions=2020-04-29_07:2020-04-29,2020-04-29 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 malwarescore=0 suspectscore=1 phishscore=0 adultscore=0 lowpriorityscore=0 priorityscore=1501 bulkscore=0 spamscore=0 clxscore=1015 mlxlogscore=947 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2004290117 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org Now that we have a loop which is executed after we return from the main function of a secondary cpu, we can remove the surplus loops. Signed-off-by: Janosch Frank Reviewed-by: Cornelia Huck Acked-by: David Hildenbrand --- s390x/smp.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/s390x/smp.c b/s390x/smp.c index 5e2e517..c7ff0ee 100644 --- a/s390x/smp.c +++ b/s390x/smp.c @@ -35,15 +35,9 @@ static void set_flag(int val) mb(); } -static void cpu_loop(void) -{ - for (;;) {} -} - static void test_func(void) { set_flag(1); - cpu_loop(); } static void test_start(void) @@ -293,7 +287,7 @@ int main(void) /* Setting up the cpu to give it a stack and lowcore */ psw.mask = extract_psw_mask(); - psw.addr = (unsigned long)cpu_loop; + psw.addr = (unsigned long)test_func; smp_cpu_setup(1, psw); smp_cpu_stop(1);