From patchwork Mon Apr 11 13:33:35 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 65515 Delivered-To: patch@linaro.org Received: by 10.112.43.237 with SMTP id z13csp1477120lbl; Mon, 11 Apr 2016 06:35:09 -0700 (PDT) X-Received: by 10.176.0.8 with SMTP id 8mr10052961uai.67.1460381707946; Mon, 11 Apr 2016 06:35:07 -0700 (PDT) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org. [192.237.175.120]) by mx.google.com with ESMTPS id f204si5843981vka.139.2016.04.11.06.35.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Apr 2016 06:35:07 -0700 (PDT) Received-SPF: neutral (google.com: 192.237.175.120 is neither permitted nor denied by best guess record for domain of xen-devel-bounces@lists.xen.org) client-ip=192.237.175.120; Authentication-Results: mx.google.com; spf=neutral (google.com: 192.237.175.120 is neither permitted nor denied by best guess record for domain of xen-devel-bounces@lists.xen.org) smtp.mailfrom=xen-devel-bounces@lists.xen.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1apbyO-0004wS-AR; Mon, 11 Apr 2016 13:33:48 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1apbyN-0004w2-J5 for xen-devel@lists.xen.org; Mon, 11 Apr 2016 13:33:47 +0000 Received: from [85.158.137.68] by server-13.bemta-3.messagelabs.com id 97/B9-03443-AB7AB075; Mon, 11 Apr 2016 13:33:46 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrCLMWRWlGSWpSXmKPExsVysyfVTXfXcu5 wg+dTpS2WfFzM4sDocXT3b6YAxijWzLyk/IoE1ow7U3oZC/5yVJw8H9jAuIi9i5GLQ0hgE6PE 7dPdUM5pRomlmyezdjFycrAJaErc+fyJCcQWEZCWuPb5MiOIzSwQJbF+UzdYjbCAv8Tryw1gN SwCqhIvG4+D1fAKOEs0v+sFi0sIyEmcPAYxk1PARWLh+U9ANgfQMqCaWcETGLkXMDKsYlQvTi 0qSy3SNdNLKspMzyjJTczM0TU0MNbLTS0uTkxPzUlMKtZLzs/dxAj0bT0DA+MOxittzocYJTm YlER5d87nDhfiS8pPqcxILM6ILyrNSS0+xCjDwaEkwVuzDCgnWJSanlqRlpkDDDKYtAQHj5II 7zyQNG9xQWJucWY6ROoUo6KUOG8TSEIAJJFRmgfXBgvsS4yyUsK8jAwMDEI8BalFuZklqPKvG MU5GJWEedNBpvBk5pXATX8FtJgJaPGzf5wgi0sSEVJSDYy9fAa261nt/tWdUryae4O7o2wl7x RnvpyvvWfNnl76lNvtqGj9cfVZ9aMa8i9e/IiyY5+SuMK87Fp59YZa1ppja2vjJ65W/X+3MD+ y4fnKh891oxb0lTR+rn0+9da6U5M3ve3cmed4Ky/Z/+yLRdxXX/1aNy+k3uHgnsbZugzvp11X DPOdLvFIiaU4I9FQi7moOBEA2lEzG2cCAAA= X-Env-Sender: julien.grall@arm.com X-Msg-Ref: server-10.tower-31.messagelabs.com!1460381625!33499926!1 X-Originating-IP: [217.140.101.70] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 8.28; banners=-,-,- X-VirusChecked: Checked Received: (qmail 1425 invoked from network); 11 Apr 2016 13:33:46 -0000 Received: from foss.arm.com (HELO foss.arm.com) (217.140.101.70) by server-10.tower-31.messagelabs.com with SMTP; 11 Apr 2016 13:33:46 -0000 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 BF9BF254; Mon, 11 Apr 2016 06:32:32 -0700 (PDT) Received: from e108454-lin.cambridge.arm.com (e108454-lin.cambridge.arm.com [10.1.215.28]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id E4E1C3F21A; Mon, 11 Apr 2016 06:33:44 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xen.org Date: Mon, 11 Apr 2016 14:33:35 +0100 Message-Id: <1460381617-5786-4-git-send-email-julien.grall@arm.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1460381617-5786-1-git-send-email-julien.grall@arm.com> References: <1460381617-5786-1-git-send-email-julien.grall@arm.com> Cc: Julien Grall , sstabellini@kernel.org, shannon.zhao@linaro.org Subject: [Xen-devel] [for-4.7 v2 3/5] xen/arm: acpi: Fix SMP support when booting with ACPI X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" The variable enabled_cpus is used to know the number of CPU enabled in the MADT. Currently this variable is used to check the validity of the boot CPU. It will be considered invalid when "enabled_cpus > 1". However, this condition also means that multiple CPUs are present on the system. So secondary will never be brought up. The correct way to check the validity of the boot CPU is to use the variable bootcpu_valid. Signed-off-by: Julien Grall Reviewed-by: Stefano Stabellini Reviewed-by: Shannon Zhao --- Changes in v2: - Add Stefano's and Shannon's reviewed-by --- xen/arch/arm/acpi/boot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/arm/acpi/boot.c b/xen/arch/arm/acpi/boot.c index 1bba1cf..a952efd 100644 --- a/xen/arch/arm/acpi/boot.c +++ b/xen/arch/arm/acpi/boot.c @@ -149,7 +149,7 @@ void __init acpi_smp_init_cpus(void) return; } - if ( enabled_cpus > 1 ) + if ( !bootcpu_valid ) { printk("MADT missing boot CPU MPIDR, not enabling secondaries\n"); return;