From patchwork Tue May 14 12:24:43 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 164179 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp2555009ili; Tue, 14 May 2019 05:26:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqyoEbwrBBaGPpE3YgnN8fp0ycErApts488qG4YuHVM6UyuSdsXPF4TpYUAafHD//BpTtpom X-Received: by 2002:a24:fc46:: with SMTP id b67mr3197316ith.4.1557836769136; Tue, 14 May 2019 05:26:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557836769; cv=none; d=google.com; s=arc-20160816; b=T5XgKbKoK6krLDzhLnNDMVE0zhGRdWk5AmUUMumJAwhCJfPw2Abx00jW9fNUGNDErf pCd2o0/w+NUBLlfulGzc/k8w7cTeUnLty1EGBvnBU3HDw+9HHLCA3CTdPpH3yQizfr3P DNiGD5RoctCjV0BNHKevFjlOG5idcnvvlswJyqpo/mZ/EdH/fQQEUL+LOijVrxVGU+j+ E5Ao0URjCX/UYY4fJxXeOlvtSUVcVNV6mlltEjxmey8XzRQ0qNl/IKx2YmQOuBnChc+e uuvxy60KwaM5DztCbP797eYOAeWO3LJC+ZY/lzITEHF+ODPedMqzf2aEQGWOs6bNExEt 0ejw== 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=pZ74j0y0SrNT9yb7tlhXi/Tp+d/LhFuEPIFPuJfSjOc=; b=riaz6X29Og/lcWmnpwdDDgnWNz4HggdSaAgXQoByBd1ZJu3E2m2RZaVMvvbYv+tV7y yq3FZun241NRw2GA7FiDUwiFZMffuTYuaSb5d1o/25qCBgHSX5vVWHADD8N9WqKgM+Ai fi7CeoBadR9rLUdgX619C9phjRwTlAoz9cQ4YekmJx67kd+vZlRxnKrE0EZi95cRCa0R sDPbVx/yWgjI9kV8HEypePHz8E3pV+6dc0SLOFGlfU/w4JyG4QHpe2kISbxXxcYJIqvp 52VyKdUxCSdxdm4e+gyVykNvSEQwrPq+A+oOoktYztSMxS9bIi8KCeirJrBk6Kg8TzVG 1czQ== 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 b2si1499704iti.141.2019.05.14.05.26.09 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 14 May 2019 05:26:09 -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 1hQWUb-0002Zf-Ks; Tue, 14 May 2019 12:25:13 +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 1hQWUa-0002YK-ED for xen-devel@lists.xenproject.org; Tue, 14 May 2019 12:25:12 +0000 X-Inumbo-ID: 51bd4778-7643-11e9-bc63-e3472027ce0e Received: from foss.arm.com (unknown [217.140.101.70]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTP id 51bd4778-7643-11e9-bc63-e3472027ce0e; Tue, 14 May 2019 12:25:11 +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 96F6E15AD; Tue, 14 May 2019 05:25:11 -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 871733F71E; Tue, 14 May 2019 05:25:10 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xenproject.org Date: Tue, 14 May 2019 13:24:43 +0100 Message-Id: <20190514122456.28559-7-julien.grall@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190514122456.28559-1-julien.grall@arm.com> References: <20190514122456.28559-1-julien.grall@arm.com> Subject: [Xen-devel] [PATCH MM-PART2 RESEND v2 06/19] 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 , Stefano Stabellini , 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 - Re-order the patch with "xen/arm: Remove parameter cpuid from start_xen". Reviewed-by: Stefano Stabellini Reviewed-by: Andrii Anisov --- xen/arch/arm/arm32/head.S | 4 ++-- xen/arch/arm/arm64/head.S | 3 ++- xen/arch/arm/smpboot.c | 4 +--- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/xen/arch/arm/arm32/head.S b/xen/arch/arm/arm32/head.S index cb8a3bf829..9f40face98 100644 --- a/xen/arch/arm/arm32/head.S +++ b/xen/arch/arm/arm32/head.S @@ -445,9 +445,9 @@ 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 */ teq r12, #0 + moveq r0, r10 /* Marshal args: - phys_offset */ + moveq r1, r8 /* - DTB address */ 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 075013878e..cb30d6f22e 100644 --- a/xen/arch/arm/arm64/head.S +++ b/xen/arch/arm/arm64/head.S @@ -582,9 +582,10 @@ 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 */ - 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;