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: 6713151 Return-Path: X-Original-To: patchwork-linux-acpi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 7452EC05AC for ; Fri, 3 Jul 2015 07:32:38 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0540D2077B for ; Fri, 3 Jul 2015 07:32:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0CED620651 for ; Fri, 3 Jul 2015 07:32:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754105AbbGCHce (ORCPT ); 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-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=OCNXgQXRrap8uR5jmqzV3C3gpALCHIkktYzxyZLccTE=; b=UBJnEi4hUOzoC1V0PchGtWpdSTlsRypER7kLRMx2dCOZALZHzhcci5uPBuztP0cMDW b4TbvCB2UprqpndqpIgyCmJ+NT9o1AKiyHy23cRC3jROdsEWUL+p5uPvwA6vsWIJo8ow 8z1CPR2XFUUZCQkYUmI17VZTWZzERfep1G1VV57RNmQxEHXeW48UkW4k7Z3BbvKfK/cr eSLbXFISxLFhxpc9nFFl67LbLTWM4rxp7GFEsoQk02E41zdcQ6epwUeNUmuNCxTQJz3H bu4D5Yu5phDcK+9kDDDH2th4q7AsWou/PQKj2vmWzwImy3h6+kDq10DpeyzqmcwK+/A1 wJ/w== X-Gm-Message-State: ALoCoQnl4knIrEaj+CjqIgvbtbpwyik56ANSPlvWCSou999yPzuiVP3t6hR1bKslnrRwOEIlIk74 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: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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; }