From patchwork Thu Apr 7 10:59:55 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 65290 Delivered-To: patch@linaro.org Received: by 10.112.43.237 with SMTP id z13csp3338lbl; Thu, 7 Apr 2016 04:01:33 -0700 (PDT) X-Received: by 10.176.64.66 with SMTP id h60mr1033588uad.121.1460026889660; Thu, 07 Apr 2016 04:01:29 -0700 (PDT) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org. [192.237.175.120]) by mx.google.com with ESMTPS id a35si1588996uaa.81.2016.04.07.04.01.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 Apr 2016 04:01:29 -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 1ao7fV-0003rU-FX; Thu, 07 Apr 2016 11:00:09 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ao7fT-0003jU-Sd for xen-devel@lists.xen.org; Thu, 07 Apr 2016 11:00:07 +0000 Received: from [85.158.137.68] by server-13.bemta-3.messagelabs.com id 83/18-03443-7BD36075; Thu, 07 Apr 2016 11:00:07 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrKLMWRWlGSWpSXmKPExsVysyfVTXebLVu 4wfxVOhZLPi5mcWD0OLr7N1MAYxRrZl5SfkUCa8bG80/ZC5ZyVyyd3sHewPico4uRi0NIYBOj REvjNBYI5zSjxPq9Cxi7GDk52AQ0Je58/sQEYosISEtc+3wZLM4sECWxflM3K4gtDGT3LL8DV MPBwSKgKvF6uQ1ImFfARWLX7I3MILaEgJzEyWOTWUFKOAVcJT7dCwAJCwGVvGqcyTKBkXsBI8 MqRo3i1KKy1CJdQ1O9pKLM9IyS3MTMHF1DA2O93NTi4sT01JzEpGK95PzcTYxA7zIAwQ7GNds 9DzFKcjApifKelWILF+JLyk+pzEgszogvKs1JLT7EKMPBoSTBO8kGKCdYlJqeWpGWmQMMM5i0 BAePkgjvPpA0b3FBYm5xZjpE6hSjopQ4736QhABIIqM0D64NFtqXGGWlhHkZgQ4R4ilILcrNL EGVf8UozsGoJMwbBjKFJzOvBG76K6DFTECLL/CDLS5JREhJNTA+WJa9I9ite8GGs9v57dXrK5 O95b8/XzOd6b/i97VW/xRXnJ4voOw9sfWU2fMPG63XntzwuE6eU+ux87lW5SVLv5Tzy+T1y9n 5qoZXTp49vbAqz17gv/rMTCX1LaZ/VTzXfjTtmFhvd+dRwn4GFW31edcFlRzmn62xmtDhM6nf Poi1jT2j5IkSS3FGoqEWc1FxIgBgBAbHaAIAAA== X-Env-Sender: julien.grall@arm.com X-Msg-Ref: server-14.tower-31.messagelabs.com!1460026806!33488714!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 17599 invoked from network); 7 Apr 2016 11:00:06 -0000 Received: from foss.arm.com (HELO foss.arm.com) (217.140.101.70) by server-14.tower-31.messagelabs.com with SMTP; 7 Apr 2016 11:00:06 -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 C304D43B; Thu, 7 Apr 2016 03:58:54 -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 28F603F25E; Thu, 7 Apr 2016 04:00:05 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xen.org Date: Thu, 7 Apr 2016 11:59:55 +0100 Message-Id: <1460026796-10899-5-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 4/5] xen/arm: acpi: Remove uncessary check in acpi_map_gic_cpu_interface 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" This part of the code will never be executed when the entry corresponds to the boot CPU. Also print an error message rather when arch_cpu_init has failed. Signed-off-by: Julien Grall --- xen/arch/arm/acpi/boot.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/xen/arch/arm/acpi/boot.c b/xen/arch/arm/acpi/boot.c index fd29bdc..602ab39 100644 --- a/xen/arch/arm/acpi/boot.c +++ b/xen/arch/arm/acpi/boot.c @@ -51,6 +51,7 @@ static void __init acpi_map_gic_cpu_interface(struct acpi_madt_generic_interrupt *processor) { int i; + int rc; u64 mpidr = processor->arm_mpidr & MPIDR_HWID_MASK; bool_t enabled = !!(processor->flags & ACPI_MADT_ENABLED); @@ -102,16 +103,16 @@ acpi_map_gic_cpu_interface(struct acpi_madt_generic_interrupt *processor) if ( !acpi_psci_present() ) return; - /* CPU 0 was already initialized */ - if ( enabled_cpus ) + if ( (rc = arch_cpu_init(enabled_cpus, NULL)) < 0 ) { - if ( arch_cpu_init(enabled_cpus, NULL) < 0 ) - return; - - /* map the logical cpu id to cpu MPIDR */ - cpu_logical_map(enabled_cpus) = mpidr; + printk("cpu%d: init failed (0x%"PRIx64" MPIDR): %d\n", + enabled_cpus, mpidr, rc); + return; } + /* map the logical cpu id to cpu MPIDR */ + cpu_logical_map(enabled_cpus) = mpidr; + enabled_cpus++; }