[PATCH v5 1/6] lib: sbi: select expected trap handler per hart
Troy Mitchell
troy.mitchell at linux.spacemit.com
Thu Oct 22 23:14:02 PDT 2026
Hi Anup,
On Fri, Oct 23, 2026 at 09:38:29AM +0530, Anup Patel wrote:
> > diff --git a/include/sbi/sbi_scratch.h b/include/sbi/sbi_scratch.h
> > index 06097c8a..20e7dcd0 100644
> > --- a/include/sbi/sbi_scratch.h
> > +++ b/include/sbi/sbi_scratch.h
> > [...]
> > @@ -91,6 +93,8 @@ struct sbi_scratch {
> > unsigned long options;
> > /** Index of the hart */
> > unsigned long hartindex;
> > + /** Address of the expected trap handler for this HART */
> > + unsigned long expected_trap;
>
> Instead of adding in struct sbi_scratch please add this to
> struct sbi_hart_features.
>
> Typically, we add stuff to struct sbi_scratch only when we
> expect it to be accessed by low-level assembly entry/exit
> routines.
Thanks!
I'll move the handler into struct sbi_hart_features in v6 and drop the
scratch layout and allocator changes
--
Troy Mitchell
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/opensbi/attachments/20261023/20e8199c/attachment.sig>
More information about the opensbi
mailing list