All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 0/3] lib: sbi: Ensure SBI extension is available
@ 2023-05-11 16:11 Andrew Jones
  2023-05-11 16:11 ` [PATCH v4 1/3] lib: sbi: Don't register unavailable single ID extensions Andrew Jones
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Andrew Jones @ 2023-05-11 16:11 UTC (permalink / raw)
  To: opensbi

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



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-05-15  6:01 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-11 16:11 [PATCH v4 0/3] lib: sbi: Ensure SBI extension is available Andrew Jones
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

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.