Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp720816imm; Wed, 23 May 2018 04:36:37 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoEGyEULsKJJdNxdpB01V2TX7bwqb3PTg0wikXVyEHIAwQL4etboxi5MaOHiHsQWgx3dq0S X-Received: by 2002:a62:9056:: with SMTP id a83-v6mr2557470pfe.186.1527075397615; Wed, 23 May 2018 04:36:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527075397; cv=none; d=google.com; s=arc-20160816; b=eqe/v7TXXyFZfzCXq9+25wKJ6GO4TNfPdVIk1Fgv+ujKgd4qvEHf9Yebmq+7fWSSra WpA+9H/9RX7cQvbdFA56gKnAp7ToYqIegtUgvFBuJ2qa1ddKimOuE5RqxMD01kEW5M7F fAD4jHrDZmE1FTY5KRys3HMSsWCJ48yAJGJWJau/RtRoIFZANLAJ1+iKdY0xI1e+/qEy WkARZezb77FUB9pTThL+JP3wr2Xj1ktNrIH8jlP/XQNq2oypVaU5k2YRm635JmYNk3ZN +CffyJ6okkW/7wEpLtB6SbSbnfrXy0BhSCv6BjBd6qmY8HeKSiIkSkIIkewozdBV66H/ AaVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=+AL4ywF7CUkf3S9gx4qejcEs6VxWpkam7HCDl9o/HPY=; b=w0uquU4pWNn2Cd/Y92ocqg4drB1Hmj/T1RXnDB1VLDl8F/yUpSCK1d9S7LRJcoffZv CcbYuR00N+pIcMk/X7VfBFRTXGjpJ06C+dtUq6mnVcEehLBJEQS+nRTKPk7+3U604syx wIxq41fsPDhzlNGxswfV6Y4ImgFmx1nOC1G/7SNEUNizzTZJdwJNwo6lMXUjfja3WqMP /9V5HyH5gBYNwngk1VYdrEV9pZloFhyJq8ne6zu1Cf2PfkNmAAbpYFUhS4C8vsN96C5o 5kSkns46Qwh4CnxLHA6AyuXDLH8yd4EvOL4YTuvl0C7QHyPlkiQxgigPOUDFtHt/BenD pZCw== 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 n10-v6si14290913pgq.472.2018.05.23.04.36.23; Wed, 23 May 2018 04:36:37 -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 S932708AbeEWLfg (ORCPT + 99 others); Wed, 23 May 2018 07:35:36 -0400 Received: from cloudserver094114.home.pl ([79.96.170.134]:43399 "EHLO cloudserver094114.home.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932391AbeEWLfd (ORCPT ); Wed, 23 May 2018 07:35:33 -0400 Received: from 79.184.253.39.ipv4.supernova.orange.pl (79.184.253.39) (HELO aspire.rjw.lan) by serwer1319399.home.pl (79.96.170.134) with SMTP (IdeaSmtpServer 0.83) id db1d19adc4e51d2e; Wed, 23 May 2018 13:35:31 +0200 From: "Rafael J. Wysocki" To: "Prakash, Prashanth" , Al Stone Cc: ACPI Devel Maling List , Linux Kernel Mailing List , Jassi Brar , Len Brown Subject: Re: [PATCH v4 3/3] mailbox: ACPI: erroneous error message when parsing the ACPI, PCCT Date: Wed, 23 May 2018 13:34:52 +0200 Message-ID: <2687795.J2teDkkjhM@aspire.rjw.lan> In-Reply-To: <85c95aad-fefb-50f4-8a06-eec25415db2a@codeaurora.org> References: <20180501003907.4322-1-ahs3@redhat.com> <85c95aad-fefb-50f4-8a06-eec25415db2a@codeaurora.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thursday, May 17, 2018 9:48:39 PM CEST Prakash, Prashanth wrote: > > On 5/17/2018 4:24 AM, Rafael J. Wysocki wrote: > > On Thu, May 17, 2018 at 12:01 AM, Al Stone wrote: > >> There have been multiple reports of the following error message: > >> > >> [ 0.068293] Error parsing PCC subspaces from PCCT > >> > >> This error message is not correct. In multiple cases examined, the PCCT > >> (Platform Communications Channel Table) concerned is actually properly > >> constructed; the problem is that acpi_pcc_probe() which reads the PCCT > >> is making the assumption that the only valid PCCT is one that contains > >> subtables of one of two types: ACPI_PCCT_TYPE_HW_REDUCED_SUBSPACE or > >> ACPI_PCCT_TYPE_HW_REDUCED_TYPE2. The number of subtables of these > >> types are counted and as long as there is at least one of the desired > >> types, the acpi_pcc_probe() succeeds. When no subtables of these types > >> are found, regardless of whether or not any other subtable types are > >> present, the error mentioned above is reported. > >> > >> In the cases reported to me personally, the PCCT contains exactly one > >> subtable of type ACPI_PCCT_TYPE_GENERIC_SUBSPACE. The function > >> acpi_pcc_probe() does not count it as a valid subtable, so believes > >> there to be no valid subtables, and hence outputs the error message. > >> > >> An example of the PCCT being reported as erroneous yet perfectly fine > >> is the following: > >> > >> Signature : "PCCT" > >> Table Length : 0000006E > >> Revision : 05 > >> Checksum : A9 > >> Oem ID : "XXXXXX" > >> Oem Table ID : "XXXXX " > >> Oem Revision : 00002280 > >> Asl Compiler ID : "XXXX" > >> Asl Compiler Revision : 00000002 > >> > >> Flags (decoded below) : 00000001 > >> Platform : 1 > >> Reserved : 0000000000000000 > >> > >> Subtable Type : 00 [Generic Communications Subspace] > >> Length : 3E > >> > >> Reserved : 000000000000 > >> Base Address : 00000000DCE43018 > >> Address Length : 0000000000001000 > >> > >> Doorbell Register : [Generic Address Structure] > >> Space ID : 01 [SystemIO] > >> Bit Width : 08 > >> Bit Offset : 00 > >> Encoded Access Width : 01 [Byte Access:8] > >> Address : 0000000000001842 > >> > >> Preserve Mask : 00000000000000FD > >> Write Mask : 0000000000000002 > >> Command Latency : 00001388 > >> Maximum Access Rate : 00000000 > >> Minimum Turnaround Time : 0000 > >> > >> To fix this, we count up all of the possible subtable types for the > >> PCCT, and only report an error when there are none (which could mean > >> either no subtables, or no valid subtables), or there are too many. > >> We also change the logic so that if there is a valid subtable, we > >> do try to initialize it per the PCCT subtable contents. This is a > >> change in functionality; previously, the probe would have returned > >> right after the error message and would not have tried to use any > >> other subtable definition. > >> > >> Tested on my personal laptop which showed the error previously; the > >> error message no longer appears and the laptop appears to operate > >> normally. > > I'd like to know the Prashanth's opinion here. > > Looks good. > > Reviewed-by: Prashanth Prakash Applied, thanks!