[PATCH 02/10] accel/amdxdna: Support hardware mailbox

Markus Elfring Markus.Elfring at web.de
Fri Jul 19 20:04:52 UTC 2024


…
> +++ b/drivers/accel/amdxdna/amdxdna_mailbox.c
> @@ -0,0 +1,582 @@
…
> +static int mailbox_acquire_msgid(struct mailbox_channel *mb_chann, struct mailbox_msg *mb_msg)
> +{
…
> +	spin_lock_irqsave(&mb_chann->chan_idr_lock, flags);
> +	msg_id = idr_alloc_cyclic(&mb_chann->chan_idr, mb_msg, 0,
> +				  MAX_MSG_ID_ENTRIES, GFP_NOWAIT);
> +	spin_unlock_irqrestore(&mb_chann->chan_idr_lock, flags);
…

Under which circumstances would you become interested to apply a statement
like “guard(spinlock_irqsave)(&mb_chann->chan_idr_lock);”?
https://elixir.bootlin.com/linux/v6.10/source/include/linux/spinlock.h#L574

Regards,
Markus


More information about the dri-devel mailing list