mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Aditya Gupta <adityag@linux.ibm.com>
To: Shivang Upadhyay <shivangu@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:44:41 +0530	[thread overview]
Message-ID: <1522da4b-b772-4278-a59e-c727de5027bf@linux.ibm.com> (raw)
In-Reply-To: <c0cd49cf78a1f1ffe8768c48785df0c3f6a2f528.camel@linux.ibm.com>


On 23/09/26 11:43, Shivang Upadhyay wrote:
> 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.

I agree, hence the current implementation looks good to me.

Thanks,
- Aditya G



      reply	other threads:[~2026-09-23  6:15 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
2026-09-23  6:14     ` Aditya Gupta [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=1522da4b-b772-4278-a59e-c727de5027bf@linux.ibm.com \
    --to=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=shivangu@linux.ibm.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®