From: Shuai Xue <xueshuai@linux.alibaba.com>
To: "Luck, Tony" <tony.luck@intel.com>
Cc: "baolin.wang@linux.alibaba.com" <baolin.wang@linux.alibaba.com>,
"benjamin.cheatham@amd.com" <benjamin.cheatham@amd.com>,
"bp@alien8.de" <bp@alien8.de>,
"Williams, Dan J" <dan.j.williams@intel.com>,
"james.morse@arm.com" <james.morse@arm.com>,
"jaylu102@amd.com" <jaylu102@amd.com>,
"lenb@kernel.org" <lenb@kernel.org>,
"linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"rafael@kernel.org" <rafael@kernel.org>,
"zhuo.song@linux.alibaba.com" <zhuo.song@linux.alibaba.com>
Subject: Re: [PATCH] ACPI: APEI: EINJ: warn on invalid argument when explicitly indicated by platform
Date: Wed, 22 Mar 2023 10:37:34 +0800 [thread overview]
Message-ID: <78481cfe-ce74-58c4-20ab-caf6de0c4125@linux.alibaba.com> (raw)
In-Reply-To: <SJ1PR11MB6083C029A3C014DD5D09A30BFC819@SJ1PR11MB6083.namprd11.prod.outlook.com>
On 2023/3/22 AM12:09, Luck, Tony wrote:
>> Actually, firmware will do some platform dependent sanity checks and returns
>> different error codes. In this case, user injects to a invalid device, platform
>> returns "Invalid Access". And user is expected to see:
>>
>> # select a invalid core or device to inject
>> # echo 1 > error_inject
>> echo: write error: Invalid argument
>>
>> Then user is expected to check his injection argument first.
>
> Thanks. This makes sense. You want EINVAL when the user chose
> bad arguments, and some other code for problem in BIOS.
Yes, exactly.
>
> If the BIOS has an issue, is it possible, or likely, that it is a temporary
> problem? If so, EBUSY may be OK. The message " Device or resource busy"
> might encourage the user to wait and try again.
>
> If it is not going to get better by itself, then one of:
>
> #define EIO 5 /* I/O error */
> #define ENXIO 6 /* No such device or address */
>
> might be a better choice.
Yes, BIOS may temporarily not complete error injection (ACPI_EINJ_EXECUTE_OPERATION)
on time, in which case, kernel return EIO.
for (;;) {
rc = apei_exec_run(&ctx, ACPI_EINJ_CHECK_BUSY_STATUS);
if (rc)
return rc;
val = apei_exec_ctx_get_output(&ctx);
if (!(val & EINJ_OP_BUSY))
break;
if (einj_timedout(&timeout))
return -EIO;
In summary, you are asking that:
- report -EINVAL for "Invalid Access" case
- keeps reporting -EBUSY for "Unknown Failure" case unchanged.
- and keeps EIO for temporarily time out unchanged.
right? (This patch is doing so)
>
> -Tony
Thanks.
Best Regards,
Shuai
next prev parent reply other threads:[~2023-03-22 2:37 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-17 7:33 Shuai Xue
2023-03-17 21:24 ` Luck, Tony
2023-03-20 2:25 ` Shuai Xue
2023-03-20 16:32 ` Luck, Tony
2023-03-21 2:00 ` Shuai Xue
2023-03-21 16:09 ` Luck, Tony
2023-03-22 2:37 ` Shuai Xue [this message]
2023-03-22 16:07 ` Luck, Tony
2023-03-22 16:52 ` Rafael J. Wysocki
2023-03-23 1:19 ` Shuai Xue
2023-03-23 1:18 ` Shuai Xue
2023-03-23 1:53 ` [PATCH v2] " Shuai Xue
2023-03-27 18:47 ` 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=78481cfe-ce74-58c4-20ab-caf6de0c4125@linux.alibaba.com \
--to=xueshuai@linux.alibaba.com \
--cc=baolin.wang@linux.alibaba.com \
--cc=benjamin.cheatham@amd.com \
--cc=bp@alien8.de \
--cc=dan.j.williams@intel.com \
--cc=james.morse@arm.com \
--cc=jaylu102@amd.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=tony.luck@intel.com \
--cc=zhuo.song@linux.alibaba.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
all inboxes | Powered by JetHome®