From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Jiri Slaby <jslaby@suse.cz>
Cc: lenb@kernel.org, linux-acpi@vger.kernel.org,
linux-kernel@vger.kernel.org,
"Rafael J . Wysocki" <rafael.j.wysocki@intel.com>
Subject: Re: [PATCH] ACPI / processor: don't print errors for processorIDs == 0xff
Date: Mon, 26 Aug 2019 11:05:33 +0200 [thread overview]
Message-ID: <5372815.QC7b48KNX5@kreacher> (raw)
In-Reply-To: <20190807111037.27182-1-jslaby@suse.cz>
On Wednesday, August 7, 2019 1:10:37 PM CEST Jiri Slaby wrote:
> Some platforms define their processors in this manner:
> Device (SCK0)
> {
> Name (_HID, "ACPI0004" /* Module Device */) // _HID: Hardware ID
> Name (_UID, "CPUSCK0") // _UID: Unique ID
> Processor (CP00, 0x00, 0x00000410, 0x06){}
> Processor (CP01, 0x02, 0x00000410, 0x06){}
> Processor (CP02, 0x04, 0x00000410, 0x06){}
> Processor (CP03, 0x06, 0x00000410, 0x06){}
> Processor (CP04, 0x01, 0x00000410, 0x06){}
> Processor (CP05, 0x03, 0x00000410, 0x06){}
> Processor (CP06, 0x05, 0x00000410, 0x06){}
> Processor (CP07, 0x07, 0x00000410, 0x06){}
> Processor (CP08, 0xFF, 0x00000410, 0x06){}
> Processor (CP09, 0xFF, 0x00000410, 0x06){}
> Processor (CP0A, 0xFF, 0x00000410, 0x06){}
> Processor (CP0B, 0xFF, 0x00000410, 0x06){}
> ...
>
> The processors marked as 0xff are invalid, there are only 8 of them in
> this case.
>
> So do not print an error on ids == 0xff, just print an info message.
> Actually, we could return ENODEV even on the first CPU with ID 0xff, but
> ACPI spec does not forbid the 0xff value to be a processor ID. Given
> 0xff could be a correct one, we would break working systems if we
> returned ENODEV.
>
> Signed-off-by: Jiri Slaby <jslaby@suse.cz>
> Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> ---
> drivers/acpi/acpi_processor.c | 10 +++++++---
> 1 file changed, 7 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/acpi/acpi_processor.c b/drivers/acpi/acpi_processor.c
> index 24f065114d42..2c4dda0787e8 100644
> --- a/drivers/acpi/acpi_processor.c
> +++ b/drivers/acpi/acpi_processor.c
> @@ -279,9 +279,13 @@ static int acpi_processor_get_info(struct acpi_device *device)
> }
>
> if (acpi_duplicate_processor_id(pr->acpi_id)) {
> - dev_err(&device->dev,
> - "Failed to get unique processor _UID (0x%x)\n",
> - pr->acpi_id);
> + if (pr->acpi_id == 0xff)
> + dev_info_once(&device->dev,
> + "Entry not well-defined, consider updating BIOS\n");
> + else
> + dev_err(&device->dev,
> + "Failed to get unique processor _UID (0x%x)\n",
> + pr->acpi_id);
> return -ENODEV;
> }
>
>
Applied, thanks!
prev parent reply other threads:[~2019-08-26 9:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-07 11:10 [PATCH] ACPI / processor: don't print errors for processorIDs == 0xff Jiri Slaby
2019-08-26 9:05 ` Rafael J. Wysocki [this message]
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=5372815.QC7b48KNX5@kreacher \
--to=rjw@rjwysocki.net \
--cc=jslaby@suse.cz \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rafael.j.wysocki@intel.com \
/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