From: Narayana Murty N <nnmlinux@linux.ibm.com>
To: Sourabh Jain <sourabhjain@linux.ibm.com>,
mahesh@linux.ibm.com, maddy@linux.ibm.com, mpe@ellerman.id.au,
christophe.leroy@csgroup.eu, gregkh@linuxfoundation.org,
oohall@gmail.com, npiggin@gmail.com
Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org,
tyreld@linux.ibm.com, vaibhav@linux.ibm.com, sbhat@linux.ibm.com,
ganeshgr@linux.ibm.com, haren@linux.ibm.com, thuth@redhat.com
Subject: Re: [PATCH v2 4/5] powerpc/pseries: Implement RTAS error injection via pseries_eeh_err_inject
Date: Tue, 4 Aug 2026 12:00:30 +0530 [thread overview]
Message-ID: <92f64054-0419-4a87-a69d-f920aff1bcfd@linux.ibm.com> (raw)
In-Reply-To: <5388c50b-e43b-4a3a-bd59-28568f5d84cb@linux.ibm.com>
Hi Sourabh,
Thanks for the review.
On 07/06/26 7:05 PM, Sourabh Jain wrote:
>>
>
> session_token 0 is considered valid here. Where as it was considered
> invalid in other
> function above.
Agreed. |rtas_open_errinjct_session()|is expected to return a positive
session token on
success, while zero is not considered a valid token by
|rtas_close_errinjct_session()|.
>
>> + return session_token;
>> +
>> + /* get errinjct token */
>> + errinjct_token = rtas_function_token(RTAS_FN_IBM_ERRINJCT);
>> + if (errinjct_token == RTAS_UNKNOWN_SERVICE) {
> How about checking this before getting the session token?
Agreed. I will obtain and validate the |ibm,errinjct|RTAS token before
opening the error-injection session. This avoids opening a session when
the injection service is unavailable.
>
>> + pr_err("RTAS: ibm,errinjct not available\n");
>> + rc = -ENODEV;
>> + goto out_close;
>> + }
>> +
>> + /* prepare shared buffer while holding lock */
>> + spin_lock(&rtas_errinjct_buf_lock);
>> + rc = prepare_errinjct_buffer(pe, type, func, addr, mask);
>> + if (rc) {
>> + spin_unlock(&rtas_errinjct_buf_lock);
>> + goto out_close;
>> + }
>> +
>> + /* perform the errinjct RTAS call */
>> + rc = do_errinjct_call(errinjct_token, type, session_token);
>> + spin_unlock(&rtas_errinjct_buf_lock);
>> +
>> +out_close:
>> + /* always attempt close if we opened a session */
>> + rtas_close_errinjct_session(session_token);
>> + return rc;
>> }
>> +
>
> This new line seems unnecessary.
Agreed. I will remove the extra blank line.
Thanks,
Narayana
>
>
>> static struct eeh_ops pseries_eeh_ops = {
>> .name = "pseries",
>> .probe = pseries_eeh_probe,
next prev parent reply other threads:[~2026-08-04 6:30 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-27 7:24 [PATCH v2 0/5] powerpc/pseries: Add full RTAS-based error injection support Narayana Murty N
2026-05-27 7:24 ` [PATCH v2 1/5] powerpc/rtas: Handle special return format for RTAS_FN_IBM_OPEN_ERRINJCT Narayana Murty N
2026-06-07 11:19 ` Sourabh Jain
2026-08-04 5:54 ` Narayana Murty N
2026-05-27 7:24 ` [PATCH v2 2/5] powerpc/pseries: Add RTAS error injection buffer infrastructure Narayana Murty N
2026-06-10 3:27 ` Sourabh Jain
2026-08-04 5:57 ` Narayana Murty N
2026-05-27 7:24 ` [PATCH v2 3/5] powerpc/pseries: Add RTAS error injection validation helpers Narayana Murty N
2026-06-07 12:17 ` Sourabh Jain
2026-08-04 6:07 ` Narayana Murty N
2026-05-27 7:24 ` [PATCH v2 4/5] powerpc/pseries: Implement RTAS error injection via pseries_eeh_err_inject Narayana Murty N
2026-06-07 13:35 ` Sourabh Jain
2026-08-04 6:30 ` Narayana Murty N [this message]
2026-06-10 3:45 ` Sourabh Jain
2026-08-04 6:37 ` Narayana Murty N
2026-05-27 7:24 ` [PATCH v2 5/5] powerpc/powernv: Map EEH error types to OPAL error injection types Narayana Murty N
2026-06-07 13:46 ` Sourabh Jain
2026-08-04 6:42 ` Narayana Murty N
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=92f64054-0419-4a87-a69d-f920aff1bcfd@linux.ibm.com \
--to=nnmlinux@linux.ibm.com \
--cc=christophe.leroy@csgroup.eu \
--cc=ganeshgr@linux.ibm.com \
--cc=gregkh@linuxfoundation.org \
--cc=haren@linux.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=maddy@linux.ibm.com \
--cc=mahesh@linux.ibm.com \
--cc=mpe@ellerman.id.au \
--cc=npiggin@gmail.com \
--cc=oohall@gmail.com \
--cc=sbhat@linux.ibm.com \
--cc=sourabhjain@linux.ibm.com \
--cc=thuth@redhat.com \
--cc=tyreld@linux.ibm.com \
--cc=vaibhav@linux.ibm.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