Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1677386ybb; Thu, 2 Apr 2020 05:30:55 -0700 (PDT) X-Google-Smtp-Source: APiQypLaUvggSTASJ0Z2gSRHfui6FSM9t9EdDelHX2JIgk9b7EHjUg1RTRaNFHMWaLr10XKTsyiN X-Received: by 2002:a9d:67c6:: with SMTP id c6mr2142990otn.11.1585830655402; Thu, 02 Apr 2020 05:30:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585830655; cv=none; d=google.com; s=arc-20160816; b=TQsKtpCjz+rDztpG26gdXrVsTzlTlKpFt95DPxoRBsj/MUUYTaL2KYTyfl45In0cRW FeTXBPPmCSpsxh6+tvCQSYIfy0Yc/BKj5oyEom85sUjg8PRjsOhSy1WZ9gk0hdGPHolh vdP1VgH4ZpbL6kYI2JLWbUlL2csLlOgBym0SaCkdwK0970wkxSeqynHCYvgyURG2zABL sM2CCNhEYYY2hdaaU320ONKWn0zpPNqyFhx5oU+YwAF//yzVDk6jmmy2kgXqVbcZuO8c 0Xtppn2s7P5gKPqQYvowIpTYE8HzbnenQKx2Sm4xT5pqzZea4qdGLJc88qPQko/qU7e5 YG6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=iQpRh3/rOXOFGIbWcV8qiRrcr0Ysw4TaURkfbtnAWOA=; b=NekhoIzDZVlfbjAvRVYJACPXtqs4qywKSUgBHJ/u1YHo4vkosxz240u2teqBMepRfj UcSFw2lqctBhXnFOkYRfIHxk/OObGyGMD67/81xPRLtmayNQzVlgOcu4pwwR/PiO4WGS D09WdfOP8klDsIQN051m8q//kMNUIjalYjUv9SUru6QHtg51UEelbRs2mHTFexsisWvu 0ZwKC3jbcxDjrlx36NPHNdRVxDeqNwq2Vb/+SJbU1VMGBzXSvCVjgiHkJ9wdZbFret1c +x/NOnXF7N/iX/RzMGar1Ypj6OyFkGS+pq7PKl/CRNIYHL14EmKvU8xIKq128ymholnu 1m3w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i20si2220671oik.180.2020.04.02.05.30.41; Thu, 02 Apr 2020 05:30:55 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733276AbgDBM0U (ORCPT + 99 others); Thu, 2 Apr 2020 08:26:20 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:12673 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726252AbgDBM0U (ORCPT ); Thu, 2 Apr 2020 08:26:20 -0400 Received: from DGGEMS402-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id E461D2164003D8894B6D; Thu, 2 Apr 2020 20:26:16 +0800 (CST) Received: from localhost.localdomain (10.69.192.58) by DGGEMS402-HUB.china.huawei.com (10.3.19.202) with Microsoft SMTP Server id 14.3.487.0; Thu, 2 Apr 2020 20:26:09 +0800 From: John Garry To: , CC: , , , , , , John Garry Subject: [PATCH] ACPI: PPTT: Inform user that table offset used for Physical processor node ID Date: Thu, 2 Apr 2020 20:22:25 +0800 Message-ID: <1585830145-208714-1-git-send-email-john.garry@huawei.com> X-Mailer: git-send-email 2.8.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.69.192.58] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org If the the Processor ID valid is not set for a Physical Processor Package node, then the node table offset is used as a substitute. As such, we may get info like this from sysfs: root@(none)$ pwd /sys/devices/system/cpu/cpu0/topology root@(none)$ more physical_package_id 56 Inform the user of this in the bootlog, as it is much less than ideal, and they can remedy this in their FW. This topic was originally discussed in: https://lore.kernel.org/linux-acpi/c325cfe2-7dbf-e341-7f0f-081b6545e890@huawei.com/T/#m0ec18637d8586f832084a8a6af22580e6174669a Signed-off-by: John Garry diff --git a/drivers/acpi/pptt.c b/drivers/acpi/pptt.c index 4ae93350b70d..b4ed3c818e00 100644 --- a/drivers/acpi/pptt.c +++ b/drivers/acpi/pptt.c @@ -515,6 +515,8 @@ static int topology_get_acpi_cpu_tag(struct acpi_table_header *table, if (level == 0 || cpu_node->flags & ACPI_PPTT_ACPI_PROCESSOR_ID_VALID) return cpu_node->acpi_processor_id; + if (level == PPTT_ABORT_PACKAGE) + pr_notice_once("Physical package node Processor ID valid not set, will use table offset as substitute\n"); return ACPI_PTR_DIFF(cpu_node, table); } pr_warn_once("PPTT table found, but unable to locate core %d (%d)\n", -- 2.16.4