linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Prakash, Prashanth" <pprakash@codeaurora.org>
To: "Rafael J. Wysocki" <rafael@kernel.org>, Al Stone <ahs3@redhat.com>
Cc: ACPI Devel Maling List <linux-acpi@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Jassi Brar <jassisinghbrar@gmail.com>,
	"Rafael J . Wysocki" <rjw@rjwysocki.net>,
	Len Brown <lenb@kernel.org>
Subject: Re: [PATCH v4 3/3] mailbox: ACPI: erroneous error message when parsing the ACPI, PCCT
Date: Thu, 17 May 2018 13:48:39 -0600	[thread overview]
Message-ID: <85c95aad-fefb-50f4-8a06-eec25415db2a@codeaurora.org> (raw)
In-Reply-To: <CAJZ5v0i7fR+rAk4eRm0jV8Ot93juq8NZarsoJRX+7RV6-yELKw@mail.gmail.com>


On 5/17/2018 4:24 AM, Rafael J. Wysocki wrote:
> On Thu, May 17, 2018 at 12:01 AM, Al Stone <ahs3@redhat.com> 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 <pprakash@codeaurora.org>

--
Thanks,
Prashanth

  reply	other threads:[~2018-05-17 19:48 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-01  0:39 [PATCH v3 0/3] mailbox: ACPI: Remove incorrect error message about parsing PCCT Al Stone
2018-05-01  0:39 ` [PATCH v3 1/3] ACPI: improve function documentation for acpi_parse_entries_array() Al Stone
2018-05-01  0:39 ` [PATCH v3 2/3] ACPI: ensure acpi_parse_entries_array() does not access non-existent table data Al Stone
2018-05-15 17:19   ` Rafael J. Wysocki
2018-05-15 21:53     ` Al Stone
2018-05-16 15:09       ` Al Stone
2018-05-01  0:39 ` [PATCH v3 3/3] mailbox: ACPI: erroneous error message when parsing the ACPI PCCT Al Stone
2018-05-12 11:49   ` Rafael J. Wysocki
2018-05-14 21:04   ` Prakash, Prashanth
2018-05-14 22:49     ` Al Stone
2018-05-15  8:00       ` Rafael J. Wysocki
2018-05-16 22:01         ` [PATCH v4 3/3] mailbox: ACPI: erroneous error message when parsing the ACPI, PCCT Al Stone
2018-05-17 10:24           ` Rafael J. Wysocki
2018-05-17 19:48             ` Prakash, Prashanth [this message]
2018-05-23 11:34               ` Rafael J. Wysocki
2018-05-16 22:03         ` [PATCH v3 3/3] mailbox: ACPI: erroneous error message when parsing the ACPI PCCT Al Stone
2018-05-13  8:30 ` [PATCH v3 0/3] mailbox: ACPI: Remove incorrect error message about parsing PCCT Rafael J. Wysocki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=85c95aad-fefb-50f4-8a06-eec25415db2a@codeaurora.org \
    --to=pprakash@codeaurora.org \
    --cc=ahs3@redhat.com \
    --cc=jassisinghbrar@gmail.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rafael@kernel.org \
    --cc=rjw@rjwysocki.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).