[PATCH] lib: sbi: Order the publication of IPI device nodes

Nickolai Zeldovich nickolai at csail.mit.edu
Sun Nov 15 18:19:45 PST 2026


On Wed, Nov 4, 2026 at 1:21 AM Anup Patel <anup at brainfault.org> wrote:
> This looks unmaintainable.
>
> Why not introduce read-write spinlock and use that to
> protect ipi_dev_node_list ? Basically, sbi_ipi_add_device()
> will take write-lock whereas sbi_ipi_raw_clear() and
> sbi_ipi_raw_send() will take read-lock.

Fair enough; I was wrongly assuming the code was written lock-free on
purpose.  Do you think it's worth adding a rwlock implementation to
OpenSBI for this?  Alternatively, it would be easy to grab a regular
spinlock in the relevant functions.

Thanks,

Nickolai.



More information about the opensbi mailing list