From patchwork Fri Jul 3 07:29:06 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hanjun Guo X-Patchwork-Id: 50610 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f197.google.com (mail-lb0-f197.google.com [209.85.217.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 594F222916 for ; Fri, 3 Jul 2015 07:32:39 +0000 (UTC) Received: by lbbui3 with SMTP id ui3sf19005765lbb.2 for ; Fri, 03 Jul 2015 00:32:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=/tfvYny+ponhzY48Hm089bU3NWqpI9l4sInG/kiCR9Q=; b=TueAVCnttT90FHqZfFpa3pYu5hPf/1hzMe0qOJJ4eVEMz3ibJf0E1O0TTCbShT0hCk xCztmbLToStYmR0NhCvbkzrhWtGe1j/Hl9+UOjnVqEEAEhXlZt9UjXbVxiGa0kK6Fkmv HXGmZKf7EVvnve3142R+uXmcZX5w/7Na6eDLWi9d0kdVQ/wlYOafghSxcyEmpY2fSln3 MNwnasDOQNlp0fwk1XG2LwzPhKg/ZfiLyrefzYu/j0BI6F0BzhsnkRQ8BB3cMe8tL4tw rsdfwDVJ61XpoSnhf+w3Ocp3Qc4zOzZIg0gOp6tC9TQCJh0im4GG0FzjM0pG49K5ceZ6 jHSA== X-Gm-Message-State: ALoCoQnLOgXsKhfDnm6lhgDiBxRDI68CSKl/5qJipF6l7QQVph22oBxnNujzZyhzh4Kkv6PDYWQQ X-Received: by 10.112.142.67 with SMTP id ru3mr21831415lbb.1.1435908758288; Fri, 03 Jul 2015 00:32:38 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.36.34 with SMTP id n2ls417986laj.15.gmail; Fri, 03 Jul 2015 00:32:37 -0700 (PDT) X-Received: by 10.112.138.199 with SMTP id qs7mr24292399lbb.21.1435908757926; Fri, 03 Jul 2015 00:32:37 -0700 (PDT) Received: from mail-lb0-f179.google.com (mail-lb0-f179.google.com. [209.85.217.179]) by mx.google.com with ESMTPS id ml17si6507661lbb.116.2015.07.03.00.32.37 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 03 Jul 2015 00:32:37 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.179 as permitted sender) client-ip=209.85.217.179; Received: by lbbpo10 with SMTP id po10so45060252lbb.3 for ; Fri, 03 Jul 2015 00:32:37 -0700 (PDT) X-Received: by 10.112.198.74 with SMTP id ja10mr34481405lbc.19.1435908757785; Fri, 03 Jul 2015 00:32:37 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.108.230 with SMTP id hn6csp970991lbb; Fri, 3 Jul 2015 00:32:36 -0700 (PDT) X-Received: by 10.70.102.11 with SMTP id fk11mr73844952pdb.144.1435908755909; Fri, 03 Jul 2015 00:32:35 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id xy9si13005835pac.198.2015.07.03.00.32.35; Fri, 03 Jul 2015 00:32:35 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-acpi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754105AbbGCHce (ORCPT + 6 others); Fri, 3 Jul 2015 03:32:34 -0400 Received: from mail-pd0-f178.google.com ([209.85.192.178]:32925 "EHLO mail-pd0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754575AbbGCHcd (ORCPT ); Fri, 3 Jul 2015 03:32:33 -0400 Received: by pdjd13 with SMTP id d13so59288568pdj.0 for ; Fri, 03 Jul 2015 00:32:32 -0700 (PDT) X-Received: by 10.70.40.164 with SMTP id y4mr74491057pdk.25.1435908752861; Fri, 03 Jul 2015 00:32:32 -0700 (PDT) Received: from localhost ([180.150.148.224]) by mx.google.com with ESMTPSA id de2sm7995765pdb.15.2015.07.03.00.32.31 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 03 Jul 2015 00:32:31 -0700 (PDT) From: Hanjun Guo To: Catalin Marinas , Will Deacon , Lorenzo Pieralisi Cc: Mark Salter , linux-arm-kernel@lists.infradead.org, linux-acpi@vger.kernel.org, Hanjun Guo Subject: [PATCH v2] ARM64 / SMP: Switch pr_err() to pr_debug() for disabled GICC entry Date: Fri, 3 Jul 2015 15:29:06 +0800 Message-Id: <1435908546-11457-1-git-send-email-hanjun.guo@linaro.org> X-Mailer: git-send-email 1.9.1 Sender: linux-acpi-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: hanjun.guo@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.179 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , It is normal that firmware presents GICC entry or entries (processors) with disabled flag in ACPI MADT, taking a system of 16 cpus for example, ACPI firmware may present 8 ebabled first with another 8 cpus disabled in MADT, the disabled cpus can be hot-added later. Firmware may also present more cpus than the hardware actually has, but disabled the unused ones, and easily enable it when the hardware has such cpus to make the firmware code scalable. So that's not an error for disabled cpus in MADT, we can switch pr_err() to pr_debug() to make the boot a little quieter by default. Since hwid for disabled cpus often are invalid, and we check invalid hwid fisrt in the code, for use case that hot add cpus later will be filtered out and will not be counted in possible cups, so move this check before the hwid one to prepare the code to count for disabeld cpus when cpu hot-plug is introduced. Signed-off-by: Hanjun Guo --- arch/arm64/kernel/smp.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c index 4b2121b..49d00da 100644 --- a/arch/arm64/kernel/smp.c +++ b/arch/arm64/kernel/smp.c @@ -396,13 +396,13 @@ acpi_map_gic_cpu_interface(struct acpi_madt_generic_interrupt *processor) { u64 hwid = processor->arm_mpidr; - if (hwid & ~MPIDR_HWID_BITMASK || hwid == INVALID_HWID) { - pr_err("skipping CPU entry with invalid MPIDR 0x%llx\n", hwid); + if (!(processor->flags & ACPI_MADT_ENABLED)) { + pr_debug("skipping disabled CPU entry with 0x%llx MPIDR\n", hwid); return; } - if (!(processor->flags & ACPI_MADT_ENABLED)) { - pr_err("skipping disabled CPU entry with 0x%llx MPIDR\n", hwid); + if (hwid & ~MPIDR_HWID_BITMASK || hwid == INVALID_HWID) { + pr_err("skipping CPU entry with invalid MPIDR 0x%llx\n", hwid); return; }