From: Andrew Jones <ajones@ventanamicro.com>
To: opensbi@lists.infradead.org
Subject: [PATCH v4 0/3] lib: sbi: Ensure SBI extension is available
Date: Thu, 11 May 2023 18:11:01 +0200 [thread overview]
Message-ID: <20230511161104.115168-1-ajones@ventanamicro.com> (raw)
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. To avoid invoking
probe too frequently, we check single extension ID extensions at
init time and even drop them from the extension list when their
probe fails. If the probe succeeds, we keep it, and then later
seeing that it's a single extension ID extension is enough to know
it's available. Extensions which have multiple IDs must have its probe
called for each, so rather than try probing at init time we provide
another callback allowing the extension to narrow its range or even
vanish.
v4:
Almost a total redesign. Patch1 of the v4 (now series) does keep
hunk 2 of the v3 patch, but the changes to sbi_ecall_find_extension()
of the v3 patch have been dropped. Instead multi-ID extensions can
now make use of a new extension callback (Patch2) which gets invoked
at init time. This new callback has been applied to vendor extensions
with Patch3.
v3: http://lists.infradead.org/pipermail/opensbi/2023-May/004894.html
Andrew Jones (3):
lib: sbi: Don't register unavailable single ID extensions
lib: sbi: Introduce register_extensions extension callback
lib: sbi: Apply register_extensions to vendor extensions
include/sbi/sbi_ecall.h | 1 +
lib/sbi/sbi_ecall.c | 17 ++++++++++++-----
lib/sbi/sbi_ecall_vendor.c | 17 +++++++++++++++++
3 files changed, 30 insertions(+), 5 deletions(-)
--
2.40.0
next reply other threads:[~2023-05-11 16:11 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-11 16:11 Andrew Jones [this message]
2023-05-11 16:11 ` [PATCH v4 1/3] lib: sbi: Don't register unavailable single ID extensions Andrew Jones
2023-05-11 16:11 ` [PATCH v4 2/3] lib: sbi: Introduce register_extensions extension callback Andrew Jones
2023-05-12 14:25 ` Anup Patel
2023-05-12 15:06 ` Andrew Jones
2023-05-12 16:47 ` Anup Patel
2023-05-15 6:01 ` Andrew Jones
2023-05-11 16:11 ` [PATCH v4 3/3] lib: sbi: Apply register_extensions to vendor extensions Andrew Jones
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=20230511161104.115168-1-ajones@ventanamicro.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox