From: Shivang Upadhyay <shivangu@linux.ibm.com>
To: Aditya Gupta <adityag@linux.ibm.com>
Cc: chleroy@kernel.org, linux-kernel@vger.kernel.org,
linuxppc-dev@lists.ozlabs.org, maddy@linux.ibm.com,
mahesh@linux.ibm.com, mpe@ellerman.id.au, npiggin@gmail.com,
sourabhjain@linux.ibm.com, thuth@redhat.com
Subject: Re: [PATCH v2] powerpc/powernv: Cache OPAL check_token() results
Date: Wed, 23 Sep 2026 11:43:34 +0530 [thread overview]
Message-ID: <c0cd49cf78a1f1ffe8768c48785df0c3f6a2f528.camel@linux.ibm.com> (raw)
In-Reply-To: <arD9skpQHxR6a8A4@li-3c92a0cc-27cf-11b2-a85c-b804d9ca68fa.ibm.com>
Hi Aditya,
Thanks for the review.
On Tue, 2026-09-22 at 11:06 +0530, Aditya Gupta wrote:
> not a suggestion to change anything, just an observation:
>
> based on this in skiboot:
> ```
> void __opal_register(uint64_t token, void *func, unsigned int nargs)
> {
> assert(token <= OPAL_LAST);
> ...
>
> static int64_t opal_check_token(uint64_t token)
> {
> if (token > OPAL_LAST)
> return OPAL_TOKEN_ABSENT;
> ```
>
> along with other usages of OPAL_LAST in skiboot, OPAL_LAST is being
> treated as a valid token.
>
> there are no handlers for OPAL_LAST and kernel doesn't do
> opal_check_token for this
>
> I feel the logic should better be fixed in opal to not consider
> OPAL_LAST
>
As per my current understanding, I assume OPAL_LAST is meant to be the
length of all valid opal tokens, Not a valid call itself.
> at the same time it maybe safer to have length as OPAL_LAST+1 here,
> though it is not necessary, so the patch looks good to me
>
> Reviewed-by: Aditya Gupta <adityag@linux.ibm.com>
>
Thanks.
~Shivang.
next prev parent reply other threads:[~2026-09-23 6:14 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-26 12:35 Shivang Upadhyay
2026-06-30 13:50 ` Sourabh Jain
2026-09-22 5:36 ` Aditya Gupta
2026-09-23 6:13 ` Shivang Upadhyay [this message]
2026-09-23 6:14 ` Aditya Gupta
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=c0cd49cf78a1f1ffe8768c48785df0c3f6a2f528.camel@linux.ibm.com \
--to=shivangu@linux.ibm.com \
--cc=adityag@linux.ibm.com \
--cc=chleroy@kernel.org \
--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=sourabhjain@linux.ibm.com \
--cc=thuth@redhat.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®