From patchwork Mon Apr 22 16:49:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 162610 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp2801389jan; Mon, 22 Apr 2019 09:51:21 -0700 (PDT) X-Google-Smtp-Source: APXvYqwd2TiM8iYVYcC9S9g9FznEmHkPUDu23wezVN8c4zvLZxsC/fFxpjnHVq5UlSi8NEGpSnzC X-Received: by 2002:a81:218b:: with SMTP id h133mr16614814ywh.487.1555951881916; Mon, 22 Apr 2019 09:51:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555951881; cv=none; d=google.com; s=arc-20160816; b=AdfHNLzxn/ksyl9y8pI5yPNF2idOi/X5PAqsBz+2853vAltc3xt5c4RuIEWK/37m4P XoYtw7hEfG4teGACuxVzA+c/0mjNefdNPlkw7MvHqwF0kkjWb5rRPJppWAX0APFRLJe1 ABsFZ1FJkZwACaxbAsNzgm4wHwTQvpREkbQEB/rdQZkEn/7zmv5mHCjHIRRbWeIw7DcA Z83O6L+9BzspqMdihUai5NkKW2cg+M1yW8vkl8ml/wI51r9DVsWwOvm28i48ljoO4bLO 4q2c3FapQJqg5xKKOk5MFnotvUZ/M/B1bOff6WJi9vk1qwyThCyFjbXerlxHNYN7IMzk y9vw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc :list-subscribe:list-help:list-post:list-unsubscribe:list-id :precedence:subject:references:in-reply-to:message-id:date:to:from; bh=f/JxSIsRF+WoP1XJsAZbemOyljz9g+U0FtEnJjlNDNg=; b=C3UQEeSKHH+84NCvpp3jSIZAmxFLu5m6kn3V4OuDcba7yb4FQdsdPVQmEEHNQf/Uvj lSxyboUn1AE51I94FAVxtNxFbcRnvHBWIpif14eILW31wez7see0tfj6JZq1poHXYVmo Te7NumnlVfJyc72j91z1TJjvjkuwd1xrpJ4wwgxp4H2iG6jYq1XvnCJsgx8RhCjeIPCi 5cLTv7AJmzQyKz8fmW9aapwU8BhqkfzM5L6yQwN3Q3etOysLatmm1fSvo5J1hp6wSG8v h9Jsdknkt37MioNv2VmH4km1PR30LciCCPsTZf7FTIrZEOxhDSoEi26YD2RTF2DSfg+g NaHw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org. [192.237.175.120]) by mx.google.com with ESMTPS id l76si9090017ywc.186.2019.04.22.09.51.21 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 22 Apr 2019 09:51:21 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hIc8m-0004Tl-W9; Mon, 22 Apr 2019 16:50:00 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hIc8k-0004SK-V6 for xen-devel@lists.xenproject.org; Mon, 22 Apr 2019 16:49:58 +0000 X-Inumbo-ID: a9b1d358-651e-11e9-a8c6-93b1c3c83655 Received: from foss.arm.com (unknown [217.140.101.70]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTP id a9b1d358-651e-11e9-a8c6-93b1c3c83655; Mon, 22 Apr 2019 16:49:58 +0000 (UTC) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 0408A374; Mon, 22 Apr 2019 09:49:58 -0700 (PDT) Received: from e108454-lin.cambridge.arm.com (e108454-lin.cambridge.arm.com [10.1.196.50]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id E8C673F557; Mon, 22 Apr 2019 09:49:56 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xenproject.org Date: Mon, 22 Apr 2019 17:49:22 +0100 Message-Id: <20190422164937.21350-6-julien.grall@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190422164937.21350-1-julien.grall@arm.com> References: <20190422164937.21350-1-julien.grall@arm.com> Subject: [Xen-devel] [PATCH 05/20] xen/arm: Rework secondary_start prototype X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Oleksandr_Tyshchenko@epam.com, Julien Grall , sstabellini@kernel.org, Andrii_Anisov@epam.com MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" None of the parameters of secondary_start are actually used. So turn secondary_start to a function with no parameters. Also modify the assembly code to avoid setting-up the registers before calling secondary_start. Signed-off-by: Julien Grall Reviewed-by: Andrii Anisov --- xen/arch/arm/arm32/head.S | 6 +++--- xen/arch/arm/arm64/head.S | 3 ++- xen/arch/arm/smpboot.c | 4 +--- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/xen/arch/arm/arm32/head.S b/xen/arch/arm/arm32/head.S index 8a98607459..b71d7fb11d 100644 --- a/xen/arch/arm/arm32/head.S +++ b/xen/arch/arm/arm32/head.S @@ -445,10 +445,10 @@ launch: ldr sp, [r0] add sp, #STACK_SIZE /* (which grows down from the top). */ sub sp, #CPUINFO_sizeof /* Make room for CPU save record */ - mov r0, r10 /* Marshal args: - phys_offset */ - mov r1, r8 /* - DTB address */ - mov r2, r7 /* - CPU ID */ teq r12, #0 + moveq r0, r10 /* Marshal args: - phys_offset */ + moveq r1, r8 /* - DTB address */ + moveq r2, r7 /* - CPU ID */ beq start_xen /* and disappear into the land of C */ b start_secondary /* (to the appropriate entry point) */ diff --git a/xen/arch/arm/arm64/head.S b/xen/arch/arm/arm64/head.S index 4fe904c51d..b26126de53 100644 --- a/xen/arch/arm/arm64/head.S +++ b/xen/arch/arm/arm64/head.S @@ -582,10 +582,11 @@ launch: sub x0, x0, #CPUINFO_sizeof /* Make room for CPU save record */ mov sp, x0 + cbnz x22, 1f + mov x0, x20 /* Marshal args: - phys_offset */ mov x1, x21 /* - FDT */ mov x2, x24 /* - CPU ID */ - cbnz x22, 1f b start_xen /* and disappear into the land of C */ 1: b start_secondary /* (to the appropriate entry point) */ diff --git a/xen/arch/arm/smpboot.c b/xen/arch/arm/smpboot.c index f756444362..00b64c3322 100644 --- a/xen/arch/arm/smpboot.c +++ b/xen/arch/arm/smpboot.c @@ -297,9 +297,7 @@ smp_prepare_cpus(void) } /* Boot the current CPU */ -void start_secondary(unsigned long boot_phys_offset, - unsigned long fdt_paddr, - unsigned long hwid) +void start_secondary(void) { unsigned int cpuid = init_data.cpuid;