From patchwork Thu Apr 7 10:59:54 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 65286 Delivered-To: patch@linaro.org Received: by 10.112.43.237 with SMTP id z13csp3249lbl; Thu, 7 Apr 2016 04:01:24 -0700 (PDT) X-Received: by 10.159.34.40 with SMTP id 37mr1040613uad.20.1460026884764; Thu, 07 Apr 2016 04:01:24 -0700 (PDT) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org. [192.237.175.120]) by mx.google.com with ESMTPS id e7si1585192uae.71.2016.04.07.04.01.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 Apr 2016 04:01:24 -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 1ao7fZ-0003vm-97; Thu, 07 Apr 2016 11:00:13 +0000 Received: from mail6.bemta6.messagelabs.com ([85.158.143.247]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ao7fX-0003up-W9 for xen-devel@lists.xen.org; Thu, 07 Apr 2016 11:00:12 +0000 Received: from [85.158.143.35] by server-3.bemta-6.messagelabs.com id A7/B8-07120-BBD36075; Thu, 07 Apr 2016 11:00:11 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrILMWRWlGSWpSXmKPExsVysyfVTXeHLVu 4weajKhZLPi5mcWD0OLr7N1MAYxRrZl5SfkUCa8buQz8YC46xV+xfc4q1gbGLrYuRi0NIYBOj xOH+DijnNKNEx8XvLF2MnBxsApoSdz5/YgKxRQSkJa59vswIYjMLREms39TNCmILC/hIXHy9H KyeRUBV4tiFHnYQm1fAReLqovtgvRICchInj00Gqufg4BRwlfh0LwAkLARU8qpxJssERu4FjA yrGNWLU4vKUot0DfWSijLTM0pyEzNzdA0NzPRyU4uLE9NTcxKTivWS83M3MQK9ywAEOxh3Pnc 6xCjJwaQkyntWii1ciC8pP6UyI7E4I76oNCe1+BCjDAeHkgTvJBugnGBRanpqRVpmDjDMYNIS HDxKIrz7QNK8xQWJucWZ6RCpU4y6HAt+3F7LJMSSl5+XKiXOux+kSACkKKM0D24ELOQvMcpKC fMyAh0lxFOQWpSbWYIq/4pRnINRSZj3NMgUnsy8ErhNr4COYAI64gI/2BEliQgpqQbGSeVd9+ cX/eTzP9Tw+Ezsqsjpv5WC12/nvFfrdMRwwiwll5S65X9UvpptmmyjYqmwlfVrwIcZexInS/w NvbhyYlDvEuZbzr84l349+GCN7729n6dsuXLHYlvtRTX+1L3nGHYyVF5cGs8zN3/Brq338qf8 nH34QciDnxNa5zaqKNb3czJNnbzbok6JpTgj0VCLuag4EQB08V+pdAIAAA== X-Env-Sender: julien.grall@arm.com X-Msg-Ref: server-6.tower-21.messagelabs.com!1460026808!7998295!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 26918 invoked from network); 7 Apr 2016 11:00:08 -0000 Received: from foss.arm.com (HELO foss.arm.com) (217.140.101.70) by server-6.tower-21.messagelabs.com with SMTP; 7 Apr 2016 11:00:08 -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 BA7E942D; Thu, 7 Apr 2016 03:58:53 -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 20A283F25E; Thu, 7 Apr 2016 04:00:03 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xen.org Date: Thu, 7 Apr 2016 11:59:54 +0100 Message-Id: <1460026796-10899-4-git-send-email-julien.grall@arm.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1460026796-10899-1-git-send-email-julien.grall@arm.com> References: <1460026796-10899-1-git-send-email-julien.grall@arm.com> Cc: Julien Grall , sstabellini@kernel.org, shannon.zhao@linaro.org Subject: [Xen-devel] [for-4.7 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 --- 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 2a71660..fd29bdc 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;