Re: [PATCH v2] powerpc/powernv: Cache OPAL check_token() results

From
Aditya Gupta <hidden>
Date
2026-09-23 06:15:03
Also in
lkml
Reply to
Shivang Upadhyay, 2026-09-23
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:
quoted
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


Thread (8 messages) 8 messages, 4 authors, last reply 2026-09-23
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help