From: Andrew Jones <ajones@ventanamicro.com>
To: opensbi@lists.infradead.org
Subject: [PATCH v2] lib: sbi: Ensure SBI extension is available
Date: Mon, 1 May 2023 14:09:17 +0200 [thread overview]
Message-ID: <20230501-9d2aee781ad1dfa437c28adf@orel> (raw)
In-Reply-To: <20230427094138.349029-1-ajones@ventanamicro.com>
On Thu, Apr 27, 2023 at 11:41:38AM +0200, Andrew Jones wrote:
> Ensure attempts to invoke SBI extension functions fail with
> SBI_ERR_NOT_SUPPORTED when the extension's probe function has
> reported that the extension is not available. By adding a new status
> member to the extension, which has three states (uninitialized,
> available, unavailable), we can ensure that the probe functions of
> single ID extensions, i.e. extid_start == extid_end, are only
> invoked once, lazily, upon first use. Extensions that have multiple
> IDs cannot use a single status field to avoid making probe calls, as
> probe functions are extension ID specific. It's expected that these
> multi-ID extension probe functions implement their own optimizations
> in order to ensure extension lookups are fast.
>
> Signed-off-by: Andrew Jones <ajones@ventanamicro.com>
> ---
> include/sbi/sbi_ecall.h | 14 ++++++++++++++
> lib/sbi/sbi_ecall.c | 26 ++++++++++++++++++++++----
> 2 files changed, 36 insertions(+), 4 deletions(-)
>
self-nack. Sent a v3 based on feedback I got on v1.
Thanks,
drew
prev parent reply other threads:[~2023-05-01 12:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-27 9:41 [PATCH v2] lib: sbi: Ensure SBI extension is available Andrew Jones
2023-05-01 12:09 ` Andrew Jones [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=20230501-9d2aee781ad1dfa437c28adf@orel \
--to=ajones@ventanamicro.com \
--cc=opensbi@lists.infradead.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.